Show More
@@ -2500,22 +2500,21 b' def revert(ui, repo, ctx, parents, *pats' | |||
|
2500 | 2500 | for table, (xlist, msg), dobackup in disptable: |
|
2501 | 2501 | if abs not in table: |
|
2502 | 2502 | continue |
|
2503 | if xlist is None: | |
|
2504 |
|
|
|
2505 | ui.warn(_('no changes needed to %s\n') % rel) | |
|
2506 | break | |
|
2507 | xlist.append(abs) | |
|
2508 | if (dobackup and os.path.lexists(target) and | |
|
2509 | abs in ctx and repo[None][abs].cmp(ctx[abs])): | |
|
2510 | bakname = "%s.orig" % rel | |
|
2511 | ui.note(_('saving current version of %s as %s\n') % | |
|
2512 | (rel, bakname)) | |
|
2513 |
if not |
|
|
2514 | util.rename(target, bakname) | |
|
2515 | if ui.verbose or not exact: | |
|
2516 | if not isinstance(msg, basestring): | |
|
2517 | msg = msg(abs) | |
|
2518 | ui.status(msg % rel) | |
|
2503 | if xlist is not None: | |
|
2504 | xlist.append(abs) | |
|
2505 | if (dobackup and os.path.lexists(target) and | |
|
2506 | abs in ctx and repo[None][abs].cmp(ctx[abs])): | |
|
2507 | bakname = "%s.orig" % rel | |
|
2508 | ui.note(_('saving current version of %s as %s\n') % | |
|
2509 | (rel, bakname)) | |
|
2510 | if not opts.get('dry_run'): | |
|
2511 | util.rename(target, bakname) | |
|
2512 | if ui.verbose or not exact: | |
|
2513 | if not isinstance(msg, basestring): | |
|
2514 | msg = msg(abs) | |
|
2515 | ui.status(msg % rel) | |
|
2516 | elif exact: | |
|
2517 | ui.warn(_('no changes needed to %s\n') % rel) | |
|
2519 | 2518 | break |
|
2520 | 2519 | else: |
|
2521 | 2520 | # Not touched in current dirstate. |
General Comments 0
You need to be logged in to leave comments.
Login now