changeset 4535:720ae5085ee3

commit: fix bug where dirstate for removed file is confused This fixes issue586
author Matt Mackall <mpm@selenic.com>
date Sun, 10 Jun 2007 21:16:58 -0500
parents 121999244123
children 2f489b00f8eb
files mercurial/localrepo.py tests/test-586 tests/test-586.out
diffstat 3 files changed, 34 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/localrepo.py	Sun Jun 10 19:16:20 2007 -0500
+++ b/mercurial/localrepo.py	Sun Jun 10 21:16:58 2007 -0500
@@ -810,6 +810,8 @@
             if f in m1:
                 del m1[f]
                 removed.append(f)
+            elif f in m2:
+                removed.append(f)
         mn = self.manifest.add(m1, tr, linkrev, c1[0], c2[0], (new, removed))
 
         # add changeset
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/test-586	Sun Jun 10 21:16:58 2007 -0500
@@ -0,0 +1,19 @@
+#!/bin/sh
+# a test for issue586
+
+hg init a
+cd a
+echo a > a
+hg ci -Ama
+
+hg init ../b
+cd ../b
+echo b > b
+hg ci -Amb
+
+hg pull -f ../a
+hg merge
+hg rm -f a
+hg ci -Amc
+
+hg st -A
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/test-586.out	Sun Jun 10 21:16:58 2007 -0500
@@ -0,0 +1,13 @@
+adding a
+adding b
+pulling from ../a
+searching for changes
+warning: repository is unrelated
+adding changesets
+adding manifests
+adding file changes
+added 1 changesets with 1 changes to 1 files (+1 heads)
+(run 'hg heads' to see heads, 'hg merge' to merge)
+1 files updated, 0 files merged, 0 files removed, 0 files unresolved
+(branch merge, don't forget to commit)
+C b