# HG changeset patch # User Mads Kiilerich # Date 2013-11-26 02:18:56 # Node ID 25ee5dbebc6b804baef179e1126ced988b3dfa04 # Parent 7ee03e190c1dab89f91b287fa9ab7d94ffebda53 rebase: tell when reopening a closed branch head Give same 'reopening closed branch head X' message as commit gives. diff --git a/hgext/rebase.py b/hgext/rebase.py --- a/hgext/rebase.py +++ b/hgext/rebase.py @@ -289,6 +289,9 @@ def rebase(ui, repo, **opts): inclusive=True) external = externalparent(repo, state, targetancestors) + if dest.closesbranch() and not keepbranchesf: + ui.status(_('reopening closed branch head %s\n') % dest) + if keepbranchesf: # insert _savebranch at the start of extrafns so if # there's a user-provided extrafn it can clobber branch if diff --git a/tests/test-rebase-named-branches.t b/tests/test-rebase-named-branches.t --- a/tests/test-rebase-named-branches.t +++ b/tests/test-rebase-named-branches.t @@ -239,6 +239,17 @@ Rebasing descendant onto ancestor across |/ @ 0: 'A' + +Reopen branch by rebase + + $ hg up -qr3 + $ hg branch -q b + $ hg ci -m 'create b' + $ hg ci -m 'close b' --close + $ hg rebase -b 8 -d b + reopening closed branch head ea9de14a36c6 + saved backup bundle to $TESTTMP/a1/.hg/strip-backup/*-backup.hg (glob) + $ cd .. Rebase to other head on branch