问题
I have a Mercurial repo on a central server (mercurial-server
package on Ubuntu; repo URLs are of the form ssh://host/repo
), and a local working copy. I'm using IntelliJ IDEA 10.5 and its Mercurial plugin (hg4idea).
I'm trying to do something simple: a colleague has checked in changes (commit & push to server), and I want to get those. In other words, I want to update the project (in Subversion lingo?).
IDEA's Update Project (Ctrl-T / Cmd-T) only produces this message:
Error: Skipped "/path/to/working-copy". No default update path.
Here's the simplest (and only) way I found so far: choose Mercurial -> Pull Changesets... which brings up this dialog:
...where you copy-paste the repo URL (something like ssh://host/project
).
Next choose Mercurial -> Update to...
...and click OK.
Is there a quicker way to do this? By somehow defining the "default update path" perhaps?
I wouldn't want to always fall back to command-line (hg pull && hg update
) for such simple operation, but it seems like I have to if it really is so clumsy in IDEA.
(I'm new to Mercurial, so forgive me if I'm doing everything wrong.)
回答1:
Without knowing the specifics of how IntelliJ's plugin works, I can offer this, from hgrc(5), the paths
section:
default
Directory or URL to use when pulling if no source is specified. Default is set to repository from which the current repository was cloned.
So it seems that your repo local hgrc file doesn't contain the usual default
path for the clone source.
You might want to try to add it manually and see if that fixes things.
来源:https://stackoverflow.com/questions/6401971/simple-way-to-update-project-with-intellij-idea-mercurial