[PATCH 10 of 10] rebase: tell when reopening a closed branch head
Pierre-Yves David
pierre-yves.david at ens-lyon.org
Mon Jan 13 02:30:19 CST 2014
On Sun, Jan 12, 2014 at 05:08:08PM +0100, Mads Kiilerich wrote:
> # 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
I like the idea, but the implementation seems to fall a bit short.
> 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)
> +
This is not as simple if --keepbranches is used. we may rebase changeset from
different branch only.
> 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
> _______________________________________________
> Mercurial-devel mailing list
> Mercurial-devel at selenic.com
> http://selenic.com/mailman/listinfo/mercurial-devel
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <http://selenic.com/pipermail/mercurial-devel/attachments/20140113/3eb58ebe/attachment.pgp>
More information about the Mercurial-devel
mailing list