Mercurial > hg-stable
changeset 10580:612c142b7a82 stable
fetch: fix newheads calculation (issue2047)
author | Sune Foldager <cryo@cyanite.org> |
---|---|
date | Wed, 03 Mar 2010 22:32:51 +0100 |
parents | f142fa3c0a8c |
children | 3fb2f7cb5ea5 c50a3d7154d2 |
files | hgext/fetch.py tests/test-fetch tests/test-fetch.out |
diffstat | 3 files changed, 22 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/hgext/fetch.py Wed Mar 03 22:04:59 2010 +0100 +++ b/hgext/fetch.py Wed Mar 03 22:32:51 2010 +0100 @@ -81,7 +81,6 @@ # Is this a simple fast-forward along the current branch? newheads = repo.branchheads(branch) - newheads = [head for head in newheads if len(repo[head].children()) == 0] newchildren = repo.changelog.nodesbetween([parent], newheads)[2] if len(newheads) == 1: if newchildren[0] != parent:
--- a/tests/test-fetch Wed Mar 03 22:04:59 2010 +0100 +++ b/tests/test-fetch Wed Mar 03 22:32:51 2010 +0100 @@ -197,6 +197,20 @@ HGMERGE=true hg --cwd i1726r2 fetch ../i1726r1 | sed 's/new changeset 3:[0-9a-zA-Z]* /new changeset 3 /' hg --cwd i1726r2 heads default --template '{rev}\n' +echo +echo % test issue2047 +hg -q init i2047a +cd i2047a +echo a > a +hg -q ci -Am a +hg -q branch stable +echo b > b +hg -q ci -Am b +cd .. +hg -q clone -r 0 i2047a i2047b +cd i2047b +hg fetch + "$TESTDIR/killdaemons.py" true
--- a/tests/test-fetch.out Wed Mar 03 22:04:59 2010 +0100 +++ b/tests/test-fetch.out Wed Mar 03 22:32:51 2010 +0100 @@ -207,3 +207,11 @@ 0 files updated, 1 files merged, 0 files removed, 0 files unresolved new changeset 3 merges remote changes with local 3 + +% test issue2047 +pulling from /tmp/hgtests.848H9Z/test-fetch/i2047a +searching for changes +adding changesets +adding manifests +adding file changes +added 1 changesets with 1 changes to 1 files