Show More
@@ -2470,7 +2470,7 b' def revert(ui, repo, ctx, parents, *pats' | |||||
2470 | 'add': ([], _('adding %s\n')), |
|
2470 | 'add': ([], _('adding %s\n')), | |
2471 | 'remove': ([], removeforget), |
|
2471 | 'remove': ([], removeforget), | |
2472 | 'undelete': ([], _('undeleting %s\n')), |
|
2472 | 'undelete': ([], _('undeleting %s\n')), | |
2473 | 'noop': None, |
|
2473 | 'noop': (None, None), | |
2474 | } |
|
2474 | } | |
2475 |
|
2475 | |||
2476 |
|
2476 | |||
@@ -2497,14 +2497,14 b' def revert(ui, repo, ctx, parents, *pats' | |||||
2497 | # search the entry in the dispatch table. |
|
2497 | # search the entry in the dispatch table. | |
2498 | # if the file is in any of these sets, it was touched in the working |
|
2498 | # if the file is in any of these sets, it was touched in the working | |
2499 | # directory parent and we are sure it needs to be reverted. |
|
2499 | # directory parent and we are sure it needs to be reverted. | |
2500 | for table, xlist, dobackup in disptable: |
|
2500 | for table, (xlist, msg), dobackup in disptable: | |
2501 | if abs not in table: |
|
2501 | if abs not in table: | |
2502 | continue |
|
2502 | continue | |
2503 | if xlist is None: |
|
2503 | if xlist is None: | |
2504 | if exact: |
|
2504 | if exact: | |
2505 | ui.warn(_('no changes needed to %s\n') % rel) |
|
2505 | ui.warn(_('no changes needed to %s\n') % rel) | |
2506 | break |
|
2506 | break | |
2507 |
xlist |
|
2507 | xlist.append(abs) | |
2508 | if (dobackup and os.path.lexists(target) and |
|
2508 | if (dobackup and os.path.lexists(target) and | |
2509 | abs in ctx and repo[None][abs].cmp(ctx[abs])): |
|
2509 | abs in ctx and repo[None][abs].cmp(ctx[abs])): | |
2510 | bakname = "%s.orig" % rel |
|
2510 | bakname = "%s.orig" % rel | |
@@ -2513,7 +2513,6 b' def revert(ui, repo, ctx, parents, *pats' | |||||
2513 | if not opts.get('dry_run'): |
|
2513 | if not opts.get('dry_run'): | |
2514 | util.rename(target, bakname) |
|
2514 | util.rename(target, bakname) | |
2515 | if ui.verbose or not exact: |
|
2515 | if ui.verbose or not exact: | |
2516 | msg = xlist[1] |
|
|||
2517 | if not isinstance(msg, basestring): |
|
2516 | if not isinstance(msg, basestring): | |
2518 | msg = msg(abs) |
|
2517 | msg = msg(abs) | |
2519 | ui.status(msg % rel) |
|
2518 | ui.status(msg % rel) |
General Comments 0
You need to be logged in to leave comments.
Login now