adding past history

Danek Duvall danek.duvall at sun.com
Wed Apr 26 22:53:37 UTC 2006


On Wed, Apr 26, 2006 at 03:13:33PM -0700, Bryan O'Sullivan wrote:

> In the case where you want to get rid of existing history, life is
> fairly easy.  You just find a way to say "treat these changeset hashes
> as being the same as the null changeset hash, if they're not actually
> present in the repo".  This approach should work just fine for
> OpenSolaris, since you're importing new history and can truncate it
> wherever you want.

Right.  TrimmingHistory, as Matt pointed out, describes this pretty well.
This would certainly suffice for preventing old changeset from escaping.
And a flag-day might be acceptable for this, as long as it didn't take us
too long.

> In the case of Linux kernel history, I think we'd need a mechanism that
> says "make this changeset (or these two) seem to be the parent(s) of
> this other one, instead of whatever the history says is the parent".
> 
> In fact, the same mechanism should work for both.  Use a file
> called .hgparents, and fill it with stuff like this:
> 
> {existing changeset} {changeset to use as first parent} {changeset to use as second parent}
> 
> Which would say "treat these two changesets as the parents of this one".
> Add a flag that says "this mapping always overrides the changelog
> history" or "this mapping only to be used if the changelog doesn't
> contain the real parents", and you're done.

Hm, interesting.  All changesets have two parents, one of which is unused
if there's no merge?  I guess I'll need to go read the design docs.  :)

> > Does my explanation of the problem make enough sense to say whether it's
> > something Mercurial could (or even can) do in a reasonable fashion?  Are
> > there other options that I've failed to consider?
> 
> As you can see, it's received at least a bit of thought already :-)

Good.  That was mostly what I wanted to know.

Thanks,
Danek



More information about the Mercurial mailing list