Search code examples
mercurialbackupclone

What is the mercurial equivalent of `git clone --mirror`?


I typically backup my git repositories using git clone --mirror <repository> as it creates a functionally identical repository.

What is the equivalent functionality in mercurial?


Solution

  • Just hg clone <repository>. Each repository works the same as any other. The repo you clone will automatically be the default repo to pull from in the future. There is no way to access remotely the repository-, account- or server-local configurations as found in the .hgrc files, which includes the URLs of other repositories or hooks.