##// END OF EJS Templates
commit: prevent closing non-head changesets
Gilles Moris -
r11163:acd61dc4 default
parent child Browse files
Show More
@@ -717,6 +717,10 b' def commit(ui, repo, *pats, **opts):'
717 """
717 """
718 extra = {}
718 extra = {}
719 if opts.get('close_branch'):
719 if opts.get('close_branch'):
720 if repo['.'].node() not in repo.branchheads():
721 # The topo heads set is included in the branch heads set of the
722 # current branch, so it's sufficient to test branchheads
723 raise util.Abort(_('can only close branch heads'))
720 extra['close'] = 1
724 extra['close'] = 1
721 e = cmdutil.commiteditor
725 e = cmdutil.commiteditor
722 if opts.get('force_editor'):
726 if opts.get('force_editor'):
General Comments 0
You need to be logged in to leave comments. Login now