Interested in working on Partial Cloning

Matt Mackall mpm at selenic.com
Thu Mar 26 08:31:11 CDT 2009


On Thu, 2009-03-26 at 08:04 +0100, Peter Arrenbrecht wrote:
> On Tue, Mar 24, 2009 at 10:19 AM, Madhusudan C.S <madhusudancs at gmail.com> wrote:
> >> As I said above, not _the_ ancestor, but _a_ common ancestor that is
> >> nearer. Can you imagine and sketch such a scenario? (Try one with more
> >> than one common ancestor first. Then one where a shallow clone rooted
> >> at a particular node would be missing the nearer one. This should give
> >> you a good introduction to thinking about these DAGs. Sketching these
> >> in ASCII art is a bit of a pain, so you might want to just sketch by
> >> hand, then create the situation in a temp repo and use `hg glog` to
> >> have it ASCII-graphed for you.)
> >>
> > I made an attempt to imagine the scenario you mentioned.
> > Please tell me if I am right or correct me if I am wrong.
> > (Hopefully studying 1 full semester of Graph Theory will
> > come to my rescue ;-) )
> >
> > Scenario with multiple common ancestors
> >        d - e
> >       /
> >   b - c
> >  /     \
> > a       f - g
> >  \     /
> >   h - i - j - k
> >
> > In this scenario e and g AFAI have understood have more
> > than one common ancestors, them being a and c. We can
> > also say e g and k have multiple common ancestors. Am
> > I right?
> 
> Yes, but. Since a is also an ancestor of c, I would think a merge
> would always choose c as the merge base. And there is no way you can
> shallow clone to get e, g, and a, but not c. Can you find a scenario
> where neither of the two common ancestors is an ancestor of the other?

a-b-c
 \ X \
  d-e-f

-- 
http://selenic.com : development and support for Mercurial and Linux




More information about the Mercurial-devel mailing list