# HG changeset patch # User Vadim Gelfer # Date 1144973529 25200 # Node ID 4bce7e8bb42bc48ba266a3d6c6780175acd32176 # Parent 15ec724ba351d9e1fa4e04a342676cdecfec1b47# Parent 2ff37e3bf7801829a49e4ef59d823c15b4abf969 merge with crew. diff -r 15ec724ba351 -r 4bce7e8bb42b mercurial/localrepo.py --- 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]: diff -r 15ec724ba351 -r 4bce7e8bb42b tests/test-up-local-change --- 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 diff -r 15ec724ba351 -r 4bce7e8bb42b tests/test-up-local-change.out --- 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