# HG changeset patch # User Matt Mackall # Date 1325277119 21600 # Node ID 6eb5bbaa1e7371b77601a39bf890a37b1b494536 # Parent 4bf553038b82fca9bbb8e6fdb6874507c44b3c58 fetch: patch cornercase in children calculation (issue2773) diff -r 4bf553038b82 -r 6eb5bbaa1e73 hgext/fetch.py --- a/hgext/fetch.py Thu Dec 29 14:44:30 2011 -0600 +++ b/hgext/fetch.py Fri Dec 30 14:31:59 2011 -0600 @@ -83,7 +83,7 @@ # 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: