Fix commit to broken path
I made a commit to the开发者_如何学Go default path in my hgrc before I'd updated the path to my new domain. Now, if I then change the path and try to push, it seems as though it's trying to push to the old path (hg complains of some HTML - the same HTML produced by the landing page for my old domain). Any ideas on how I can undo this commit?
Mercurial uses one place, and one place only, to determine where to push, and that is the hgrc file in your .hg directory in your repository.
So, to fix this, simply open up the hgrc file in that directory in your favorite text editor and examine the [paths]
section, since you're allowed to try to push somewhere at all, that section is bound to be there.
In that section you will most likely have the following:
[paths]
default = http://olddomain.com/
Simply change the url there, and attempt the push again.
Note that there is nothing recorded in the changeset that identifies the place where you intend to push, so there is no need to undo the changeset or otherwise fix it, the information you need to edit is completely separate.
精彩评论