How to "checkout" from a repository ?

Georg Lohrer pacco at tropezien.de
Sun Apr 1 15:22:32 CDT 2007


Markus Moeller schrieb:
> I see the clone creates already the plain source files. The changes are
> stored under .hg/store/data as .i files ?

Hm, yes, but you have not to hassle with these files. Your desired files
out of the cloned repository will be available withing the destination
directory you cloned to. For example you do sth like:

$ cd $HOME
$ mkdir foodir1; cd foodir1
$ hg init
$ echo "#include <stdio.h>" >foo.cpp
$ hg add foo.cpp
$ hg ci -m "Initial add"

now clone with:

$ cd $HOME
$ hg clone file:///$HOME/foodir1 foodir2
$ ls -al foodir2
-rw-rw-r--  1 georg georg   19 2007-04-01 22:21 foo.cpp
drwxrwxr-x  3 georg georg 4096 2007-04-01 22:21 .hg


So, you have the Mercurial-relevant '.hg' directory _and_ your checked
in file.

Ciao, Georg


More information about the Mercurial mailing list