1

I have some (local) repositories, an original and some clones. The original repository has been corrupted so I'd like to get rid of it and use one of the clones as the master for future development.

Is there a better way to break the connection between the new master and the original repository than simply deleting the default entry in the [paths] section of that clone's hgrc?

Similarly, in the other clones, can I simply change the default entry in their hgrc files' [paths] section to point to the new master repository?

2
  • What you're suggesting works great, but Martin's solution below, just move a good repo where the bad one is/was, is the least effort solution. Apr 1, 2010 at 15:25
  • @Ry4an: in Martin's answer, I thought "delete" and "replace" referred to the entries in the .hg/hgrc, but I like your interpretation better. :)
    – Niall C.
    Apr 2, 2010 at 0:02

2 Answers 2

3

All clones are independent, but they remember where they were cloned from. As you have found out, this is stored in the .hg/hgrc file. You are free to edit this file as you like. You can even add more paths if you want.

So in your case you just delete the original repository and replace it with a good clone.

1

The idea is either:

  • to define a new default path in the paths section
  • or to define a new path (see this SO question)

But in both cases, that involves modifying the hgrc files.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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