Interested in working on Partial Cloning

Madhusudan C.S madhusudancs at gmail.com
Tue Mar 24 04:19:28 CDT 2009


Hi Peter,


> Not sure I understand your graph properly. Say Bob has a full repo:
>
>  a - b - c - d
>    \
>      e - f
>
> Now Alice clones from c, so she has
>
>  c - d
>
> Then Bob merges
>
>  a - b - c - d - m
>    \            /
>      e - f ----
>
> When Alice pulls, I want only
>
>  c - d - m
>
> This is because I think a good approach is to say a shallow clone only
> ever holds history that is rooted at a single node, the shallow clones
> _root_. In this case, c. Otherwise an innocuous pull suddenly fills
> your repo with lots of past stuff you never wanted.
>

Ah Ok getting your point thanks.

>
>
> >> Allow to pull disconnected heads
> >
> > Suppose in the above example Bob should be able to pull
> > from Alice if the development is at d and h and it has
> > not been merged to i still?
> >
> >> Allow to merge heads with disconnected ancestry, but a
> >> known common ancestor
> >
> >                <- c <- d
> > NullRev <- a <- b            (Shallow Repo)
> >                <- e <- f
> > Allowing merge between d and f?
> >
> >> Should pulling new disconnected history be possible?
> >
> > Pulling the parent revs which were not obtained during
> > cloning but set as NullRev? (Lazy clone type?)
> >
> >> can we bungle a merge of to connected heads
> >> because a nearer common ancestor is missing
> >
> > I did not get this? How can the heads be connected
> > if the ancestor is missing?
>
> 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?

Now if we shallow clone at point say, c, then e and g
become connected heads with a missing common ancestor
since f is a merge between i and c which share the
common ancestor a?


-- 
Thanks and regards,
 Madhusudan.C.S

Blogs at: www.madhusudancs.info
Official Email ID: madhusudan at madhusudancs.info
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://selenic.com/pipermail/mercurial-devel/attachments/20090324/315c89e9/attachment.htm 


More information about the Mercurial-devel mailing list