[PATCH] zombie files

Keir Fraser Keir.Fraser at cl.cam.ac.uk
Tue Jul 5 06:35:42 UTC 2005


> Thanks. Your patches are still having line-wrapping troubles though. I
> fixed this one up manually. 
> 
> >                              (" local changed %s which remote deleted\n" %
> > f) +
> >                              "(k)eep or (d)elete?", "[kd]", "k")

I've attached the patch in original form, in case that helps.

 -- Keir

-------------- next part --------------
--- mercurial.old/hg.py	2005-06-26 11:04:18.119293000 +0100
+++ mercurial/hg.py	2005-07-03 17:15:07.797102593 +0100
@@ -1104,9 +1104,9 @@
                             mark[f] = 1
                 del m2[f]
             elif f in ma:
-                if not force and n != ma[f]:
-                    r = ""
-                    if linear_path or allow:
+                if n != ma[f]:
+                    r = "d"
+                    if not force and (linear_path or allow):
                         r = self.ui.prompt(
                             (" local changed %s which remote deleted\n" % f) +
                             "(k)eep or (d)elete?", "[kd]", "k")
@@ -1127,16 +1127,18 @@
 
         for f, n in m2.iteritems():
             if f[0] == "/": continue
-            if not force and f in ma and n != ma[f]:
-                r = ""
-                if linear_path or allow:
+            if f in ma and n != ma[f]:
+                r = "k"
+                if not force and (linear_path or allow):
                     r = self.ui.prompt(
                         ("remote changed %s which local deleted\n" % f) +
                         "(k)eep or (d)elete?", "[kd]", "k")
-                if r == "d": remove.append(f)
-            else:
+                if r == "k": get[f] = n
+            elif f not in ma:
                 self.ui.debug("remote created %s\n" % f)
                 get[f] = n
+            else:
+                self.ui.debug("local deleted %s\n" % f)
 
         del mw, m1, m2, ma
 


More information about the Mercurial mailing list