diff --git a/mercurial/commands.py b/mercurial/commands.py --- a/mercurial/commands.py +++ b/mercurial/commands.py @@ -745,6 +745,11 @@ def commit(ui, repo, *pats, **opts): (parents[1] == nullrev or len(cl.heads(cl.node(parents[1]))) > 1)): ui.status(_('created new head\n')) + if not opts.get('close_branch'): + for r in parents: + if repo[r].extra().get('close'): + ui.status(_('reopening closed branch head %d\n') % r) + if ui.debugflag: ui.write(_('committed changeset %d:%s\n') % (rev, hex(node))) elif ui.verbose: diff --git a/tests/test-branches.out b/tests/test-branches.out --- a/tests/test-branches.out +++ b/tests/test-branches.out @@ -171,6 +171,7 @@ user: test date: Thu Jan 01 00:00:09 1970 +0000 summary: prune bad branch +reopening closed branch head 12 --- branch b is back in action b 13:6ac12926b8c3 a branch name much longer than the default justification used by branches 7:10ff5895aa57