[PATCH 10 of 10] rebase: tell when reopening a closed branch head

Mads Kiilerich mads at kiilerich.com
Sun Jan 12 16:08:08 UTC 2014


# HG changeset patch
# User Mads Kiilerich <madski at unity3d.com>
# Date 1385432336 -3600
#      Tue Nov 26 03:18:56 2013 +0100
# Node ID bfabe840bde50753f38507074644716c62399734
# Parent  7731c6d3de0db683cfc4f0f2846556732b790b8e
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
@@ -295,6 +295,9 @@ def rebase(ui, repo, **opts):
                                                            inclusive=True)
                 external = externalparent(repo, state, targetancestors)
 
+            if dest.closesbranch():
+                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
@@ -316,6 +316,7 @@ rebase 'c1' to the branch head 'c2' that
   o  0: '0'
   
   $ hg rebase
+  reopening closed branch head 8427af5d86f2
   saved backup bundle to $TESTTMP/case2/.hg/strip-backup/c062e3ecd6c6-backup.hg (glob)
   $ hg tglog
   @  3: 'c2 closed' c



More information about the Mercurial-devel mailing list