[PATCH] Change branches to sort 'active' branches first, and add an option to show only active branches

Eric Hopper hopper at omnifarious.org
Thu Jun 21 12:59:16 CDT 2007


This patch changes the branches command to flag branch tips that have
children in the global repository as 'inactive'.  It then also sorts
the active branches before the inactive branches on display.  Lastly
it adds an option to completely elide branches it would normally have
flagged as inactive.

The efficacy of this heuristic is debatable.  But there is a definite
need to flag and/or elide inactive branches from display.  I propose
this patch so that both the concept of an 'inactive' branch and the
command line option make it out into the general Mercurial community
and people have a chance to experiment with it.

If some other, better way of determining that a branch is inactive is
found (or created) the code can easily be changed to use it.

This patch can be pulled from the attached bundle, and is also
available at http://hg.omnifarious.org/~hopper/merc-tocrew/

Thanks,
-- 
"It does me no injury for my neighbor to say there are twenty gods or no God.
It neither picks my pocket nor breaks my leg."  --- Thomas Jefferson
"Go to Heaven for the climate, Hell for the company."  -- Mark Twain
-- Eric Hopper (http://www.omnifarious.org/~hopper) --

-------------- next part --------------
A non-text attachment was scrubbed...
Name: bats-bleeding.patch
Type: text/x-patch
Size: 5391 bytes
Desc: not available
Url : http://selenic.com/pipermail/mercurial-devel/attachments/20070621/d7a97139/attachment.bin 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: branch-fix.hg
Type: application/octet-stream
Size: 2147 bytes
Desc: not available
Url : http://selenic.com/pipermail/mercurial-devel/attachments/20070621/d7a97139/attachment.obj 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : http://selenic.com/pipermail/mercurial-devel/attachments/20070621/d7a97139/attachment.pgp 


More information about the Mercurial-devel mailing list