mercurial/commands.py
changeset 41397 0bd56c291359
parent 41382 2f2a7ea62e9a
child 41398 2ff8994ac71d
equal deleted inserted replaced
41396:3461814417f3 41397:0bd56c291359
  1670         extra['close'] = '1'
  1670         extra['close'] = '1'
  1671 
  1671 
  1672         if not bheads:
  1672         if not bheads:
  1673             raise error.Abort(_('can only close branch heads'))
  1673             raise error.Abort(_('can only close branch heads'))
  1674         elif opts.get('amend'):
  1674         elif opts.get('amend'):
  1675             if repo[None].parents()[0].p1().branch() != branch and \
  1675             if repo[None].p1().p1().branch() != branch and \
  1676                     repo[None].parents()[0].p2().branch() != branch:
  1676                     repo[None].p1().p2().branch() != branch:
  1677                 raise error.Abort(_('can only close branch heads'))
  1677                 raise error.Abort(_('can only close branch heads'))
  1678 
  1678 
  1679     if opts.get('amend'):
  1679     if opts.get('amend'):
  1680         if ui.configbool('ui', 'commitsubrepos'):
  1680         if ui.configbool('ui', 'commitsubrepos'):
  1681             raise error.Abort(_('cannot amend with ui.commitsubrepos enabled'))
  1681             raise error.Abort(_('cannot amend with ui.commitsubrepos enabled'))