Show More
@@ -52,7 +52,9 b" def fetch(ui, repo, source='default', **" | |||||
52 | raise util.Abort(_('outstanding uncommitted changes')) |
|
52 | raise util.Abort(_('outstanding uncommitted changes')) | |
53 | if del_: |
|
53 | if del_: | |
54 | raise util.Abort(_('working directory is missing some files')) |
|
54 | raise util.Abort(_('working directory is missing some files')) | |
55 |
|
|
55 | bheads = repo.branchheads(branch) | |
|
56 | bheads = [head for head in bheads if len(repo[head].children()) == 0] | |||
|
57 | if len(bheads) > 1: | |||
56 | raise util.Abort(_('multiple heads in this branch ' |
|
58 | raise util.Abort(_('multiple heads in this branch ' | |
57 | '(use "hg heads ." and "hg merge" to merge)')) |
|
59 | '(use "hg heads ." and "hg merge" to merge)')) | |
58 |
|
60 | |||
@@ -76,6 +78,7 b" def fetch(ui, repo, source='default', **" | |||||
76 |
|
78 | |||
77 | # Is this a simple fast-forward along the current branch? |
|
79 | # Is this a simple fast-forward along the current branch? | |
78 | newheads = repo.branchheads(branch) |
|
80 | newheads = repo.branchheads(branch) | |
|
81 | newheads = [head for head in newheads if len(repo[head].children()) == 0] | |||
79 | newchildren = repo.changelog.nodesbetween([parent], newheads)[2] |
|
82 | newchildren = repo.changelog.nodesbetween([parent], newheads)[2] | |
80 | if len(newheads) == 1: |
|
83 | if len(newheads) == 1: | |
81 | if newchildren[0] != parent: |
|
84 | if newchildren[0] != parent: |
General Comments 0
You need to be logged in to leave comments.
Login now