Copying vs of cloning?
Brad Larsen
brad.larsen at gmail.com
Tue Oct 2 17:15:28 CDT 2007
On Tue, 02 Oct 2007 17:43:10 -0400, Andrei Gaponenko <agaponenko at lbl.gov>
wrote:
>
> Hi,
>
> If one copies a Mercurial repository (with "cp -pr", or using tar), is
> the copy a valid repository? I thought that after
>
> cd /someplace
> hg clone /a/parent/repo
>
> copying the newly created repo to /otherplace would be equivalent to
>
> cd /otherplace
> hg clone /a/parent/repo
>
> However running "diff -r" on two such clones I see that their
> .hg/dirstate files differ. If I copied repo instead of cloning they
> would be identical. So copying does not seem to be equivalent to
> cloning.
>
> What is the difference???
clone by default tries to use hard links where possible (I think). The
--pull option will make an actual copy (again, I think).
Cheers,
Brad Larsen
More information about the Mercurial
mailing list