hgext3rd/topic/destination.py
changeset 2653 13313d0cab71
parent 2017 dd1055f38397
child 2891 b18d2b2f18a6
equal deleted inserted replaced
2652:839c2879edcc 2653:13313d0cab71
    87     ## search for untopiced heads of branch
    87     ## search for untopiced heads of branch
    88     # could be heads((::branch(x) - topic()))
    88     # could be heads((::branch(x) - topic()))
    89     # but that is expensive
    89     # but that is expensive
    90     #
    90     #
    91     # we should write plain code instead
    91     # we should write plain code instead
    92     with topicmap.usetopicmap(repo):
    92 
    93         tmap = repo.branchmap()
    93     tmap = topicmap.gettopicrepo(repo).branchmap()
    94         if branch not in tmap:
    94     if branch not in tmap:
    95             return []
    95         return []
    96         elif all:
    96     elif all:
    97             return tmap.branchheads(branch)
    97         return tmap.branchheads(branch)
    98         else:
    98     else:
    99             return [tmap.branchtip(branch)]
    99         return [tmap.branchtip(branch)]
   100 
   100 
   101 def modsetup(ui):
   101 def modsetup(ui):
   102     """run a uisetup time to install all destinations wrapping"""
   102     """run a uisetup time to install all destinations wrapping"""
   103     if util.safehasattr(destutil, '_destmergebranch'):
   103     if util.safehasattr(destutil, '_destmergebranch'):
   104         extensions.wrapfunction(destutil, '_destmergebranch', _destmergebranch)
   104         extensions.wrapfunction(destutil, '_destmergebranch', _destmergebranch)