hgext3rd/topic/destination.py
changeset 1964 43f3c7ce73be
parent 1962 c00815786813
child 1967 c5d4e856ad0e
equal deleted inserted replaced
1963:7b7f073ed05e 1964:43f3c7ce73be
    24                 raise error.Abort(_("nothing to merge"))
    24                 raise error.Abort(_("nothing to merge"))
    25             elif 1 == len(bhead):
    25             elif 1 == len(bhead):
    26                 return bhead.first()
    26                 return bhead.first()
    27             else:
    27             else:
    28                 raise error.Abort(_("branch '%s' has %d heads - "
    28                 raise error.Abort(_("branch '%s' has %d heads - "
    29                                    "please merge with an explicit rev")
    29                                     "please merge with an explicit rev")
    30                                  % (p1.branch(), len(bhead)),
    30                                   % (p1.branch(), len(bhead)),
    31                                  hint=_("run 'hg heads .' to see heads"))
    31                                   hint=_("run 'hg heads .' to see heads"))
    32         elif 2 == len(heads):
    32         elif 2 == len(heads):
    33             heads = [r for r in heads if r != p1.rev()]
    33             heads = [r for r in heads if r != p1.rev()]
    34             # XXX: bla bla bla bla bla
    34             # XXX: bla bla bla bla bla
    35             if 1 < len(heads):
    35             if 1 < len(heads):
    36                 raise error.Abort(_('working directory not at a head revision'),
    36                 raise error.Abort(_('working directory not at a head revision'),
    37                                  hint=_("use 'hg update' or merge with an "
    37                                   hint=_("use 'hg update' or merge with an "
    38                                         "explicit revision"))
    38                                          "explicit revision"))
    39             return heads[0]
    39             return heads[0]
    40         elif 2 < len(heads):
    40         elif 2 < len(heads):
    41             raise error.Abort(_("topic '%s' has %d heads - "
    41             raise error.Abort(_("topic '%s' has %d heads - "
    42                                 "please merge with an explicit rev")
    42                                 "please merge with an explicit rev")
    43                               % (top, len(heads)))
    43                               % (top, len(heads)))