Show More
@@ -3194,6 +3194,16 b' def _performrevert(repo, parents, ctx, n' | |||||
3194 | if node == parent and p2 == nullid: |
|
3194 | if node == parent and p2 == nullid: | |
3195 | normal = repo.dirstate.normal |
|
3195 | normal = repo.dirstate.normal | |
3196 | for f in actions['undelete'][0]: |
|
3196 | for f in actions['undelete'][0]: | |
|
3197 | if interactive: | |||
|
3198 | choice = repo.ui.promptchoice( | |||
|
3199 | _("add back removed file %s (Yn)?$$ &Yes $$ &No") % f) | |||
|
3200 | if choice == 0: | |||
|
3201 | prntstatusmsg('undelete', f) | |||
|
3202 | checkout(f) | |||
|
3203 | normal(f) | |||
|
3204 | else: | |||
|
3205 | excluded_files.append(f) | |||
|
3206 | else: | |||
3197 | prntstatusmsg('undelete', f) |
|
3207 | prntstatusmsg('undelete', f) | |
3198 | checkout(f) |
|
3208 | checkout(f) | |
3199 | normal(f) |
|
3209 | normal(f) |
@@ -424,3 +424,24 b' When specified pattern does not exist, w' | |||||
424 | b: no such file in rev b40d1912accf |
|
424 | b: no such file in rev b40d1912accf | |
425 |
|
425 | |||
426 | $ cd .. |
|
426 | $ cd .. | |
|
427 | ||||
|
428 | Prompt before undeleting file(issue6008) | |||
|
429 | $ hg init repo | |||
|
430 | $ cd repo | |||
|
431 | $ echo a > a | |||
|
432 | $ hg ci -qAm a | |||
|
433 | $ hg rm a | |||
|
434 | $ hg revert -i<<EOF | |||
|
435 | > y | |||
|
436 | > EOF | |||
|
437 | add back removed file a (Yn)? y | |||
|
438 | undeleting a | |||
|
439 | $ ls | |||
|
440 | a | |||
|
441 | $ hg rm a | |||
|
442 | $ hg revert -i<<EOF | |||
|
443 | > n | |||
|
444 | > EOF | |||
|
445 | add back removed file a (Yn)? n | |||
|
446 | $ ls | |||
|
447 | $ cd .. |
General Comments 0
You need to be logged in to leave comments.
Login now