hgext/fetch.py
branchstable
changeset 16091 f6e9c731dd3f
parent 15749 6b84cdcb05b9
child 16476 83622954b64d
equal deleted inserted replaced
16089:2e8f4b82c551 16091:f6e9c731dd3f
    83         # Is this a simple fast-forward along the current branch?
    83         # Is this a simple fast-forward along the current branch?
    84         newheads = repo.branchheads(branch)
    84         newheads = repo.branchheads(branch)
    85         newchildren = repo.changelog.nodesbetween([parent], newheads)[2]
    85         newchildren = repo.changelog.nodesbetween([parent], newheads)[2]
    86         if len(newheads) == 1 and len(newchildren):
    86         if len(newheads) == 1 and len(newchildren):
    87             if newchildren[0] != parent:
    87             if newchildren[0] != parent:
    88                 return hg.clean(repo, newchildren[0])
    88                 return hg.update(repo, newchildren[0])
    89             else:
    89             else:
    90                 return 0
    90                 return 0
    91 
    91 
    92         # Are there more than one additional branch heads?
    92         # Are there more than one additional branch heads?
    93         newchildren = [n for n in newchildren if n != parent]
    93         newchildren = [n for n in newchildren if n != parent]