Show More
@@ -3152,15 +3152,12 b' def _performrevert(repo, parents, ctx, n' | |||||
3152 | tobackup = set() |
|
3152 | tobackup = set() | |
3153 | # Apply changes |
|
3153 | # Apply changes | |
3154 | fp = stringio() |
|
3154 | fp = stringio() | |
3155 | # `fnames` keeps track of filenames for which we have initiated changes, |
|
3155 | # chunks are serialized per file, but files aren't sorted | |
3156 | # to make sure that we print status msg only once per file. |
|
3156 | for f in sorted(set(c.header.filename() for c in chunks if ishunk(c))): | |
3157 | fnames = set() |
|
3157 | prntstatusmsg('revert', f) | |
3158 | for c in chunks: |
|
3158 | for c in chunks: | |
3159 | if ishunk(c): |
|
3159 | if ishunk(c): | |
3160 | abs = c.header.filename() |
|
3160 | abs = c.header.filename() | |
3161 | if abs not in fnames: |
|
|||
3162 | fnames.add(abs) |
|
|||
3163 | prntstatusmsg('revert', abs) |
|
|||
3164 | # Create a backup file only if this hunk should be backed up |
|
3161 | # Create a backup file only if this hunk should be backed up | |
3165 | if c.header.filename() in tobackup: |
|
3162 | if c.header.filename() in tobackup: | |
3166 | target = repo.wjoin(abs) |
|
3163 | target = repo.wjoin(abs) |
@@ -112,8 +112,8 b' 10 run the same test than 8 from within ' | |||||
112 | 2 hunks, 2 lines changed |
|
112 | 2 hunks, 2 lines changed | |
113 | examine changes to 'folder2/h'? [Ynesfdaq?] n |
|
113 | examine changes to 'folder2/h'? [Ynesfdaq?] n | |
114 |
|
114 | |||
|
115 | reverting f | |||
115 | reverting folder1/g |
|
116 | reverting folder1/g | |
116 | reverting f |
|
|||
117 | $ cat f |
|
117 | $ cat f | |
118 | 1 |
|
118 | 1 | |
119 | 2 |
|
119 | 2 | |
@@ -243,8 +243,8 b' Test --no-backup' | |||||
243 | 2 hunks, 2 lines changed |
|
243 | 2 hunks, 2 lines changed | |
244 | examine changes to 'folder2/h'? [Ynesfdaq?] n |
|
244 | examine changes to 'folder2/h'? [Ynesfdaq?] n | |
245 |
|
245 | |||
|
246 | reverting f | |||
246 | reverting folder1/g |
|
247 | reverting folder1/g | |
247 | reverting f |
|
|||
248 | $ cat f |
|
248 | $ cat f | |
249 | 1 |
|
249 | 1 | |
250 | 2 |
|
250 | 2 |
General Comments 0
You need to be logged in to leave comments.
Login now