Show More
@@ -3130,12 +3130,25 b' def _performrevert(repo, parents, ctx, a' | |||
|
3130 | 3130 | """ |
|
3131 | 3131 | parent, p2 = parents |
|
3132 | 3132 | node = ctx.node() |
|
3133 | excluded_files = [] | |
|
3134 | matcher_opts = {"exclude": excluded_files} | |
|
3135 | ||
|
3133 | 3136 | def checkout(f): |
|
3134 | 3137 | fc = ctx[f] |
|
3135 | 3138 | repo.wwrite(f, fc.data(), fc.flags()) |
|
3136 | 3139 | |
|
3137 | 3140 | audit_path = pathutil.pathauditor(repo.root) |
|
3138 | 3141 | for f in actions['forget'][0]: |
|
3142 | if interactive: | |
|
3143 | choice = \ | |
|
3144 | repo.ui.promptchoice( | |
|
3145 | _("forget added file %s (yn)?$$ &Yes $$ &No") | |
|
3146 | % f) | |
|
3147 | if choice == 0: | |
|
3148 | repo.dirstate.drop(f) | |
|
3149 | else: | |
|
3150 | excluded_files.append(repo.wjoin(f)) | |
|
3151 | else: | |
|
3139 | 3152 | repo.dirstate.drop(f) |
|
3140 | 3153 | for f in actions['remove'][0]: |
|
3141 | 3154 | audit_path(f) |
@@ -3162,7 +3175,7 b' def _performrevert(repo, parents, ctx, a' | |||
|
3162 | 3175 | if interactive: |
|
3163 | 3176 | # Prompt the user for changes to revert |
|
3164 | 3177 | torevert = [repo.wjoin(f) for f in actions['revert'][0]] |
|
3165 |
m = scmutil.match(ctx, torevert, |
|
|
3178 | m = scmutil.match(ctx, torevert, matcher_opts) | |
|
3166 | 3179 | diffopts = patch.difffeatureopts(repo.ui, whitespace=True) |
|
3167 | 3180 | diffopts.nodates = True |
|
3168 | 3181 | diffopts.git = True |
@@ -15,6 +15,7 b' 10 run the same test than 8 from within ' | |||
|
15 | 15 | > interactive = true |
|
16 | 16 | > [extensions] |
|
17 | 17 | > record = |
|
18 | > purge = | |
|
18 | 19 | > EOF |
|
19 | 20 | |
|
20 | 21 | |
@@ -377,3 +378,26 b' Check the experimental config to invert ' | |||
|
377 | 378 | 5 |
|
378 | 379 | d |
|
379 | 380 | +lastline |
|
381 | ||
|
382 | $ hg update -C . | |
|
383 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
|
384 | $ hg purge | |
|
385 | $ touch newfile | |
|
386 | $ hg add newfile | |
|
387 | $ hg status | |
|
388 | A newfile | |
|
389 | $ hg revert -i <<EOF | |
|
390 | > n | |
|
391 | > EOF | |
|
392 | forgetting newfile | |
|
393 | forget added file newfile (yn)? n | |
|
394 | $ hg status | |
|
395 | A newfile | |
|
396 | $ hg revert -i <<EOF | |
|
397 | > y | |
|
398 | > EOF | |
|
399 | forgetting newfile | |
|
400 | forget added file newfile (yn)? y | |
|
401 | $ hg status | |
|
402 | ? newfile | |
|
403 |
General Comments 0
You need to be logged in to leave comments.
Login now