comparison mercurial/commands.py @ 19306:59cdd3a7e281

merge with stable
author Matt Mackall <mpm@selenic.com>
date Fri, 07 Jun 2013 16:59:59 -0500
parents 043abd6a91d1 b500a663a2c7
children 0cfb62e043e8
comparison
equal deleted inserted replaced
19304:59d5281b5799 19306:59cdd3a7e281
1332 1332
1333 if repo.vfs.exists('graftstate'): 1333 if repo.vfs.exists('graftstate'):
1334 raise util.Abort(_('cannot commit an interrupted graft operation'), 1334 raise util.Abort(_('cannot commit an interrupted graft operation'),
1335 hint=_('use "hg graft -c" to continue graft')) 1335 hint=_('use "hg graft -c" to continue graft'))
1336 1336
1337 branch = repo[None].branch()
1338 bheads = repo.branchheads(branch)
1339
1337 extra = {} 1340 extra = {}
1338 if opts.get('close_branch'): 1341 if opts.get('close_branch'):
1339 extra['close'] = 1 1342 extra['close'] = 1
1340 1343
1341 branch = repo[None].branch() 1344 if not bheads:
1342 bheads = repo.branchheads(branch) 1345 raise util.Abort(_('can only close branch heads'))
1346 elif opts.get('amend'):
1347 if repo.parents()[0].p1().branch() != branch and \
1348 repo.parents()[0].p2().branch() != branch:
1349 raise util.Abort(_('can only close branch heads'))
1343 1350
1344 if opts.get('amend'): 1351 if opts.get('amend'):
1345 if ui.configbool('ui', 'commitsubrepos'): 1352 if ui.configbool('ui', 'commitsubrepos'):
1346 raise util.Abort(_('cannot amend with ui.commitsubrepos enabled')) 1353 raise util.Abort(_('cannot amend with ui.commitsubrepos enabled'))
1347 1354