Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Can I move the directory a local Mercurial repository is contained in without breaking it, or does it know where it lives and expect it to live there forever? (Coming from SVN with its switch/relocate requirements for moving local repos.)

share|improve this question
up vote 7 down vote accepted

In short, yes. You can move the .hg repository folder and then pull a new copy of your source.

share|improve this answer
You can move .hg or the directory below it. The only thing that might break are the paths defined in .hg/hgrc if they are relative. – tonfa Mar 25 '10 at 21:52

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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