Thoughts on narrow checkouts

Matt Mackall mpm at selenic.com
Wed Aug 18 16:58:52 CDT 2010


On Wed, 2010-08-18 at 10:08 +0200, Patrick Mézard wrote:
> Le 18/08/10 09:42, Didly Bom a écrit :
> > On Wed, Aug 18, 2010 at 2:49 AM, Matt Mackall <mpm at selenic.com <mailto:mpm at selenic.com>> wrote:
> > 
> >     On Mon, 2010-08-16 at 14:30 +0200, Martin Geisler wrote:
> >     > Patrick Mézard <pmezard at gmail.com <mailto:pmezard at gmail.com>> writes:
> >     >
> >     > Hi Patrick,
> >     >
> >     > > I am trying to measure the feasability and amount of work to support
> >     > > read-only narrow checkouts as Mercurial subrepositories.
> >     >
> >     > I think this sounds like an interesting and useful feature.
> > 
> >     Agreed. Though if we're going to be read-only, we might as well think
> >     ahead to narrow pulls as well.
> > 
> > 
> > I also think that this could be a very useful feature!
> > 
> > Is there a technical reason (other than the additional development
> effort) to make these narrow checkouts read only? Or could this be a
> first step towards full narrow checkout support?
> 
> Actually it depends whether we want narrow checkouts or narrow clones.
> If the approach I described is valid, read-only narrow checkouts could
> probably be extended to writable ones: once your are able to trick the
> dirstate/fs-operations to think they operate on the whole checkout
> instead of a subset of it, all operations should work accordingly,
> except for stuff depending and repo wide paths like .hgignore, matcher
> objects and the likes. Read-only narrow clones are probably harder to
> implement than read-only checkouts, and much harder to make writable,
> but I could be wrong.

It's going to be very difficult to deal with merges that affect files
outside the scope of the merge. Even for files without conflicts, we use
the working directory to record what file revision the merge algorithm
chose so that commit can do the right thing. And remember: merge here
can mean even a normal update.

Read-only obviously side-steps all these sorts of problems.

-- 
Mathematics is the supreme nostalgia of our time.




More information about the Mercurial-devel mailing list