merge with crew.
authorVadim Gelfer <vadim.gelfer@gmail.com>
Thu, 13 Apr 2006 17:12:09 -0700
changeset 2070 4bce7e8bb42b
parent 2069 15ec724ba351 (current diff)
parent 2065 2ff37e3bf780 (diff)
child 2071 67a0a3852024
merge with crew.
--- a/mercurial/localrepo.py	Thu Apr 13 17:11:35 2006 -0700
+++ b/mercurial/localrepo.py	Thu Apr 13 17:12:09 2006 -0700
@@ -1573,8 +1573,9 @@
                         self.ui.debug(_(" remote %s is newer, get\n") % f)
                         get[f] = m2[f]
                         s = 1
-                elif f in umap:
+                elif f in umap or f in added:
                     # this unknown file is the same as the checkout
+                    # we need to reset the dirstate if the file was added
                     get[f] = m2[f]
 
                 if not s and mfw[f] != mf2[f]:
--- a/tests/test-up-local-change	Thu Apr 13 17:11:35 2006 -0700
+++ b/tests/test-up-local-change	Thu Apr 13 17:12:09 2006 -0700
@@ -55,3 +55,15 @@
 hg parents
 hg diff | sed -e "s/\(+++ [a-zA-Z0-9_/.-]*\).*/\1/" \
               -e "s/\(--- [a-zA-Z0-9_/.-]*\).*/\1/"
+
+# test a local add
+cd ..
+hg init a
+hg init b
+echo a > a/a
+echo a > b/a
+hg --cwd a commit -A -m a
+cd b
+hg add a 
+hg pull -u ../a
+hg st
--- a/tests/test-up-local-change.out	Thu Apr 13 17:11:35 2006 -0700
+++ b/tests/test-up-local-change.out	Thu Apr 13 17:12:09 2006 -0700
@@ -136,3 +136,10 @@
 @@ -1,1 +1,1 @@ a2
 -a2
 +abc
+adding a
+pulling from ../a
+requesting all changes
+adding changesets
+adding manifests
+adding file changes
+added 1 changesets with 1 changes to 1 files