equal
deleted
inserted
replaced
9 phases, |
9 phases, |
10 ) |
10 ) |
11 |
11 |
12 from mercurial.i18n import _ |
12 from mercurial.i18n import _ |
13 |
13 |
|
14 from . import ( |
|
15 compat, |
|
16 ) |
|
17 |
14 def enforcesinglehead(repo, tr): |
18 def enforcesinglehead(repo, tr): |
15 for name, heads in repo.filtered('visible').branchmap().iteritems(): |
19 branchmap = repo.filtered('visible').branchmap() |
|
20 for name, heads in compat.branchmapitems(branchmap): |
16 if len(heads) > 1: |
21 if len(heads) > 1: |
17 hexs = [node.short(n) for n in heads] |
22 hexs = [node.short(n) for n in heads] |
18 raise error.Abort(_('%d heads on "%s"') % (len(heads), name), |
23 raise error.Abort(_('%d heads on "%s"') % (len(heads), name), |
19 hint=(', '.join(hexs))) |
24 hint=(', '.join(hexs))) |
20 |
25 |