Handle undeletion of files when checking out old revisions
authorMatt Mackall <mpm@selenic.com>
Mon, 11 Jul 2005 15:06:32 -0800
changeset 680 4b7b79d2db2c
parent 679 c11e9a6777ae
child 681 32b6bbf1c37b
Handle undeletion of files when checking out old revisions Spotted by Marc Singer
mercurial/hg.py
--- a/mercurial/hg.py	Mon Jul 11 10:28:20 2005 -0800
+++ b/mercurial/hg.py	Mon Jul 11 15:06:32 2005 -0800
@@ -1394,9 +1394,11 @@
                 self.ui.debug("remote created %s\n" % f)
                 get[f] = n
             else:
-                self.ui.debug("local deleted %s\n" % f)
-                if force:
+                if force or p2 == pa: # going backwards?
+                    self.ui.debug("local deleted %s, recreating\n" % f)
                     get[f] = n
+                else:
+                    self.ui.debug("local deleted %s\n" % f)
 
         del mw, m1, m2, ma