Moving Mercurial’s parent repository

(Updated 2011-08-12: This post was about moving the central repository only, but the solution is the same if any level parent repository, i.e. the one to which the clone command was applied, was moved. Just go to the child repo and edit the .hg/hgrc file.)

I’ve just found myself having renamed the directory, in which my Mercurial’s central repository was located. After this, the hg commit and other ‘local’ commands still work fine, but the out, in, push and pull result in
abort: repository default not found!

The solution is to open the file .hg/hgrc in the local repository directory and change the lines
[paths]
default = ...

so that they point to the correct new location.

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s