fetch: patch cornercase in children calculation (issue2773)

This commit is contained in:
Matt Mackall 2011-12-30 14:31:59 -06:00
parent e71ca537a7
commit 02441ac6a9

View File

@ -83,7 +83,7 @@ def fetch(ui, repo, source='default', **opts):
# Is this a simple fast-forward along the current branch?
newheads = repo.branchheads(branch)
newchildren = repo.changelog.nodesbetween([parent], newheads)[2]
if len(newheads) == 1:
if len(newheads) == 1 and len(newchildren):
if newchildren[0] != parent:
return hg.clean(repo, newchildren[0])
else: