[Python-Dev] Hg: inter-branch workflow

Tim Delaney timothy.c.delaney at gmail.com
Mon Mar 21 22:20:40 CET 2011

On 2011-03-22, Ben Finney <ben+python at benfinney.id.au> wrote:

> That seems to me the ideal: preserve all revision history for those
> cases when some user will care about it, but *present* history cleanly
> by default.
> Whether adding support in Mercurial or Git for similar
> clean-presentation-by-default would obviate the need for rewriting
> history, I can't tell.

That's my thought as well - it's the presentation that makes things
difficult for people. I'm used to it (having used ClearCase for many
years before Mercurial) but I do find the presentation suboptimal.

I've recently been thinking about prototyping a "mainline" option for
hgrc that the various hg commands would follow (starting with hg log
and glog). Something like:

mainline = default, 3.3, 3.2, 2.7, 3.1, 3.0, 2.6, 2.5

defaulting to:

mainline = default

All hg commands would aquire an "operate on all branches" option.

The algorithm for hg log would be fairly trivial to change, but hg
glog would be a significant departure (and so would the hgweb log view
- I've played with this before and it's non-trivial).

The idea for glog and hgweb log would be to straight lines for the
mainlines wherever possible (multiple heads on the same mainline
branch would obviously cause deviations). The order the branches are
listed in the "mainline" option would be the order to display the
branches (so you could ensure that your current version was displayed
first). Merges would be indicated with a separate symbol and the name
of the branch that was merged. Similarly, when viewing all branches,
keeping a straight line would be similarly important.

You'd end up using more horizontal space, but we all seem to have
widescreen monitors these days.

More information about the Python-Dev mailing list