Comments
Patch
@@ -2549,12 +2549,12 @@ def revert(ui, repo, ctx, parents, *pats
for table, (xlist, msg), dobackup in disptable:
if abs not in table:
continue
if xlist is not None:
xlist.append(abs)
- if (dobackup and os.path.lexists(target) and
- abs in ctx and repo[None][abs].cmp(ctx[abs])):
+ if (dobackup and os.path.lexists(target)
+ and repo[None][abs].cmp(ctx[abs])):
bakname = "%s.orig" % rel
ui.note(_('saving current version of %s as %s\n') %
(rel, bakname))
if not opts.get('dry_run'):
util.rename(target, bakname)