[PATCH 0 of 2] An alternate attempt for a --closed option on hg branches

John Mulligan phlogistonjohn at asynchrono.us
Tue Jun 9 00:21:42 UTC 2009


Continuing the disucssion from the other day about improving the closed branch
support in 'hg branches' here is the patch series I started working on the
other day.

I _do not_ expect this series to be accepted as-is. I did use the --closed
option name, which is different than Steve Losh's --open option.

I also tried to make the branches function clearer and faster. The first patch
re-works the function, but makes it a slower on repos that have
a large number of heads. The next patch makes it perform better on the same
repo. I used the same pranch repo as Steve did in his test, and I used timeit
to measure (times = 1000): 
   Original:  14.2 sec
   1st Patch: 18.6 sec
   2nd Patch: 11.6 sec

I don't think the style of the second patch is quite right though, so
I'm looking for advice there.



More information about the Mercurial-devel mailing list