equal
deleted
inserted
replaced
1317 |
1317 |
1318 if repo.vfs.exists('graftstate'): |
1318 if repo.vfs.exists('graftstate'): |
1319 raise util.Abort(_('cannot commit an interrupted graft operation'), |
1319 raise util.Abort(_('cannot commit an interrupted graft operation'), |
1320 hint=_('use "hg graft -c" to continue graft')) |
1320 hint=_('use "hg graft -c" to continue graft')) |
1321 |
1321 |
|
1322 branch = repo[None].branch() |
|
1323 bheads = repo.branchheads(branch) |
|
1324 |
1322 extra = {} |
1325 extra = {} |
1323 if opts.get('close_branch'): |
1326 if opts.get('close_branch'): |
1324 extra['close'] = 1 |
1327 extra['close'] = 1 |
1325 |
1328 |
1326 branch = repo[None].branch() |
1329 if not bheads: |
1327 bheads = repo.branchheads(branch) |
1330 raise util.Abort(_('can only close branch heads')) |
|
1331 elif opts.get('amend'): |
|
1332 if repo.parents()[0].p1().branch() != branch and \ |
|
1333 repo.parents()[0].p2().branch() != branch: |
|
1334 raise util.Abort(_('can only close branch heads')) |
1328 |
1335 |
1329 if opts.get('amend'): |
1336 if opts.get('amend'): |
1330 if ui.configbool('ui', 'commitsubrepos'): |
1337 if ui.configbool('ui', 'commitsubrepos'): |
1331 raise util.Abort(_('cannot amend with ui.commitsubrepos enabled')) |
1338 raise util.Abort(_('cannot amend with ui.commitsubrepos enabled')) |
1332 |
1339 |