“更新项目"的简单方法是:与IntelliJ IDEA&水银? [英] Simple way to "Update Project" with IntelliJ IDEA & Mercurial?

查看:60
本文介绍了“更新项目"的简单方法是:与IntelliJ IDEA&水银?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在中央服务器上有一个Mercurial存储库(Ubuntu上的 mercurial-server 包;存储库URL的格式为 ssh://host/repo ),并且本地工作副本.我正在使用IntelliJ IDEA 10.5及其Mercurial插件(hg4idea).

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

我正在尝试做一些简单的事情:一位同事已签入更改(提交并推送到服务器),我想获取这些更改.换句话说,我想更新项目(使用Subversion术语吗?).

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的更新项目(Ctrl-T/Cmd-T)仅产生以下消息:

IDEA's Update Project (Ctrl-T / Cmd-T) only produces this message:

错误:已跳过"/路径/到/工作副本".没有预设更新路径.

Error: Skipped "/path/to/working-copy". No default update path.

这是到目前为止我发现的最简单(也是唯一)的方法:选择Mercurial-> Pull Changesets ... ,将弹出此对话框:

Here's the simplest (and only) way I found so far: choose Mercurial -> Pull Changesets... which brings up this dialog:

...在其中复制粘贴回购URL(例如 ssh://host/project 之类的东西).

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

下一步选择Mercurial-> 更新到...

Next choose Mercurial -> Update to...

...然后单击确定.

...and click OK.

有更快的方法吗?通过某种方式定义默认更新路径"?

Is there a quicker way to do this? By somehow defining the "default update path" perhaps?

对于这种简单的操作,我不想总是退回到命令行( hg pull&& hg update ),但是好像真的必须这样做在IDEA中笨拙.

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.

(我是Mercurial的新手,所以如果我做错了所有事情,请原谅我.)

(I'm new to Mercurial, so forgive me if I'm doing everything wrong.)

推荐答案

在不了解IntelliJ插件如何工作的细节的情况下,我可以从

Without knowing the specifics of how IntelliJ's plugin works, I can offer this, from hgrc(5), the paths section:

默认

在以下情况下使用的目录或URL如果未指定源,则拉动.默认设置为来自的存储库当前存储库是哪个克隆的.

Directory or URL to use when pulling if no source is specified. Default is set to repository from which the current repository was cloned.

因此,您的回购本地hgrc文件似乎不包含克隆源的常用 default 路径.

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.

这篇关于“更新项目"的简单方法是:与IntelliJ IDEA&水银?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆