1

So i have a local clone and a central repository. Now I need to create local clones from the main clone and use them. The problem is the clone command is ignoring the ignored files (like it should).

But there are many configuration files in this case and I need a way for the local clone to copy everything, even the ignored files.

Martin Geisler
  • 1,271
  • 9
  • 23
johnlemon
  • 159
  • 1
  • 6

1 Answers1

2

You can infact just make a copy of the clone using your normal filesystem commands. In Linux this could look like:

$ cp -a repo repo-clone

That will create a perfectly file "clone" of your Mercurial repository. The differences between cp and hg clone are:

  • hg clone will reuse space on your harddisk by using "hard links" between the files in the .hg directory. This also makes hg clone faster for large repositories.

  • hg clone will also write a .hg/hgrc file with a default path pointing back to the source

  • hg clone will take care of locking the source and destination repositories as needed. This means that you must take care that noone is writing (pushing or committing) to the source while you copy it with cp.

Martin Geisler
  • 1,271
  • 9
  • 23