Show More
@@ -2541,6 +2541,7 b' def revert(ui, repo, ctx, parents, *pats' | |||||
2541 | needdata = ('revert', 'add', 'undelete') |
|
2541 | needdata = ('revert', 'add', 'undelete') | |
2542 | _revertprefetch(repo, ctx, *[actions[name][0] for name in needdata]) |
|
2542 | _revertprefetch(repo, ctx, *[actions[name][0] for name in needdata]) | |
2543 |
|
2543 | |||
|
2544 | wctx = repo[None] | |||
2544 | for abs, (rel, exact) in sorted(names.items()): |
|
2545 | for abs, (rel, exact) in sorted(names.items()): | |
2545 | # target file to be touch on disk (relative to cwd) |
|
2546 | # target file to be touch on disk (relative to cwd) | |
2546 | target = repo.wjoin(abs) |
|
2547 | target = repo.wjoin(abs) | |
@@ -2553,7 +2554,7 b' def revert(ui, repo, ctx, parents, *pats' | |||||
2553 | if xlist is not None: |
|
2554 | if xlist is not None: | |
2554 | xlist.append(abs) |
|
2555 | xlist.append(abs) | |
2555 | if (dobackup and os.path.lexists(target) |
|
2556 | if (dobackup and os.path.lexists(target) | |
2556 |
and |
|
2557 | and wctx[abs].cmp(ctx[abs])): | |
2557 | bakname = "%s.orig" % rel |
|
2558 | bakname = "%s.orig" % rel | |
2558 | ui.note(_('saving current version of %s as %s\n') % |
|
2559 | ui.note(_('saving current version of %s as %s\n') % | |
2559 | (rel, bakname)) |
|
2560 | (rel, bakname)) |
General Comments 0
You need to be logged in to leave comments.
Login now