Simple way to “Update Project” with IntelliJ IDEA & Mercurial?

情到浓时终转凉″ 提交于 2021-02-19 05:46:26

问题


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:

enter image description here

...where you copy-paste the repo URL (something like ssh://host/project).

Next choose Mercurial -> Update to...

enter image description here

...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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!