hgext3rd/topic/flow.py
branchstable
changeset 4775 cc96716f2ebf
parent 4743 92e3db149d7d
child 4808 14c12df16ab5
equal deleted inserted replaced
4765:c1d0faaa5b92 4775:cc96716f2ebf
     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