Local vs Server (phase names and clones)

Martin Geisler mg at aragost.com
Mon Jan 16 02:41:25 CST 2012


Jason Harris <jason at jasonfharris.com> writes:

> The discussion on phases raised a question for me. (Again sorry if
> this is clear to others and I just missed it in the ongoing
> discussions...)
>
> The question is in reference to local versus server in Mercurial. I
> gather that with secrete changesets we will now be making a formal
> distinction between local pushing / pulling and pushing / pulling to a
> server. Is this correct?
>
> I also gather then that "local" pushing / pulling would transfer
> private / secrete changesets. But this transfer would not occur to a
> "server" Is this correct?

That's not my impression: changesets with stay-local should not be
transferred on push or pull. What we discussed was transferring them on
clone.

Today, 'hg clone foo bar' is equivalent to

  hg init bar
  hg -R bar pull -u foo

and it's really implemented like

  cp -a foo bar

with hardlinks between the files in .hg/store/data. If some changesets
wont move on 'hg pull', the equivalence between the two commands breaks
down and we have to decide what we value most: equivalence with
init+pull or performance from hardlinks.

> However this formal distinction would seem hard to enforce. Eg what
> happens if someone mounts a server by FUSE or something similar. So
> it's a server but it's local, etc...

Yes, I'm pretty sure we're not trying to solve that problem. If you have
access to another repository over a file system, then it's "local" by
definition.

-- 
Martin Geisler

aragost Trifork
Professional Mercurial support
http://mercurial.aragost.com/kick-start/


More information about the Mercurial-devel mailing list