mercurial/cmdutil.py
branchstable
changeset 19511 ca2dfc2f63eb
parent 19510 8b190adb7ee3
child 19730 d184bae667e4
--- a/mercurial/cmdutil.py	Fri Jul 26 17:08:05 2013 -0500
+++ b/mercurial/cmdutil.py	Fri Jul 26 21:03:25 2013 -0500
@@ -1987,7 +1987,7 @@
                 xlist[0].append(abs)
                 if (dobackup and not opts.get('no_backup') and
                     os.path.lexists(target) and
-                    repo[None][abs].cmp(ctx[abs])):
+                    abs in ctx and repo[None][abs].cmp(ctx[abs])):
                     bakname = "%s.orig" % rel
                     ui.note(_('saving current version of %s as %s\n') %
                             (rel, bakname))