Copying vs of cloning?
Benoit Boissinot
benoit.boissinot at ens-lyon.org
Tue Oct 2 16:47:46 CDT 2007
On Tue, Oct 02, 2007 at 02:43:10PM -0700, Andrei Gaponenko 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???
only the repo-data is copied during a clone, the working copy (and the
dirstate is created afterward.
You can try the experiment with a clone -U (no working copy).
regards,
Benoit
--
:wq
More information about the Mercurial
mailing list