3

Is backing up repos as simple as copying over the entire folder (that is under version control) over to a backup location?

Also do you recommend using "clone" to get a repo even if i have access to the folder that is under version control (in which case, could i just not get the repo with a xcopy?)

flag

2 Answers

1

If you want to clone a repository which is located on the same partition of the disk you should use hg clone instead of xcopy because Mercurial doesn't actually copy all the files in the moment of cloning, it uses hard-links and delayed writing, so you can save your time and disk space. If you clone remote repository, there is only one difference between this approaches, you won't have default path in your cloned repository hgrc file if you use xcopy (but you certainly can add it manually). Maybe next version of Mercurial will behave differently (for example hg clone command would count some statistic of cloning), so I suggest to use hg clone instead of xcopy.

For backing up, really cool solution was offered by Nate: A new backup script for backing up all Kiln repositories locally

link|flag
0

Probably good practice to use hg clone to get it.

The primary reason is that it's easier to understand //some/location/repoBackup than
//some/location/LongAndImpossibleToReadGUIDThatRequiresDatabaseAccessOrAPIToRelateToARepo
There are bound to be other good reasons that I haven't thought of - perhaps related to atomically reading the repository instead of having somebody push while xcopy is running...

This becomes especially important as the number of repos starts to grow...

link|flag

Your Answer

Not the answer you're looking for? Browse other questions tagged or ask your own question.