[RFC] Enforcing a "linear" repository by first parent?
Andrew Lutomirski
luto at myrealbox.com
Wed Mar 18 08:33:22 CDT 2009
Hi all-
I have a repository that I'd like to keep "linear." This is the
"mainline development" repository for a project -- we have a bunch of
other clones that we do branchy development in -- and I'd like to be
able to easily review some sort of linear history of mainline
development. We do this now with a simple informal policy:
All pushes to the main tree must:
- Not add any new heads.
- Have the previous head as a first ancestor of the new head. (Where
a first ancestor is the first parent, or the first parent of the first
parent, etc.)
This means that if I look at the head of the main tree, I can see the
entire history of heads by following first parents.
So, three questions:
1. Is this the Right Way (tm) to do this?
2. If so, should Mercurial gain some functionality to enforce it? (An
appropriate builtin pretxnchangegroup hook would seem like a good
first pass.)
3. Is there any way to get the hgweb graph view to order itself nicely
to view a repository with this policy? (E.g. all first ancestors of
the head are shown in order and all other commits could be indented or
visually distinguished in some other manner.)
Thanks,
Andy
More information about the Mercurial
mailing list