mercurial/commands.py
changeset 18955 f3245f22771c
parent 18909 3a72c89a83ec
child 18956 1a9ad84583ee
equal deleted inserted replaced
18954:b1639e98e8a1 18955:f3245f22771c
  1297         # Let --subrepos on the command line override config setting.
  1297         # Let --subrepos on the command line override config setting.
  1298         ui.setconfig('ui', 'commitsubrepos', True)
  1298         ui.setconfig('ui', 'commitsubrepos', True)
  1299 
  1299 
  1300     extra = {}
  1300     extra = {}
  1301     if opts.get('close_branch'):
  1301     if opts.get('close_branch'):
  1302         if repo['.'].node() not in repo.branchheads():
       
  1303             # The topo heads set is included in the branch heads set of the
       
  1304             # current branch, so it's sufficient to test branchheads
       
  1305             raise util.Abort(_('can only close branch heads'))
       
  1306         extra['close'] = 1
  1302         extra['close'] = 1
  1307 
  1303 
  1308     branch = repo[None].branch()
  1304     branch = repo[None].branch()
  1309     bheads = repo.branchheads(branch)
  1305     bheads = repo.branchheads(branch)
  1310 
  1306