diff mercurial/localrepo.py @ 1236:67a28636ea64

Fix bug with co -C across branches, update tests
author mpm@selenic.com
date Tue, 13 Sep 2005 18:38:27 -0500
parents 9ee8428d84a1
children 1945754e466b
line wrap: on
line diff
--- a/mercurial/localrepo.py	Tue Sep 13 14:23:43 2005 -0500
+++ b/mercurial/localrepo.py	Tue Sep 13 18:38:27 2005 -0500
@@ -1108,12 +1108,16 @@
                     self.ui.debug("other deleted %s\n" % f)
                     remove.append(f) # other deleted it
             else:
-                if n == m1.get(f, nullid): # same as parent
+                # file is created on branch or in working directory
+                if force and f not in umap:
+                    self.ui.debug("remote deleted %s, clobbering\n" % f)
+                    remove.append(f)
+                elif n == m1.get(f, nullid): # same as parent
                     if p2 == pa: # going backwards?
                         self.ui.debug("remote deleted %s\n" % f)
                         remove.append(f)
                     else:
-                        self.ui.debug("local created %s, keeping\n" % f)
+                        self.ui.debug("local modified %s, keeping\n" % f)
                 else:
                     self.ui.debug("working dir created %s, keeping\n" % f)