0

我想-q为 cvs 命令添加选项,该命令在我从 Eclipse 的上下文菜单中update选择Team/Update后运行。我在Preferences/Team/CVS中看不到执行此操作的任何选项。我怎样才能做到这一点?

更新

Duncan Krebs 在他的回答中指出,可以通过使用.cvsrc配置文件为标准 cvs 设置此类选项。然而 Eclipse 使用它自己的 cvs Java实现,看起来它不支持.cvsrc文件中的设置。我也在 E​​clipse 论坛上问过。

我在 Windows Vista SP2 x64 上使用 Eclipse Indigo Service Release 2(内部版本号:20120216-1857)。

4

1 回答 1

1

I don't think its possible to do that in eclipse with any preference setting. However, you can modify the cvs configuration file to add default options to commands here are some examples:

The `~/.cvsrc' file is a way that you can add default options to cvs_commands within cvs, instead of relying on aliases or other shell scripts.

The format of the `~/.cvsrc' file is simple. The file is searched for a line that begins with the same name as the cvs_command being executed. If a match is found, then the remainder of the line is split up (at whitespace characters) into separate options and added to the command arguments before any options from the command line.

If a command has two names (e.g., checkout and co), the official name, not necessarily the one used on the command line, will be used to match against the file. So if this is the contents of the user's `~/.cvsrc' file:

log -N diff -u update -P checkout -P

the command cvs checkout foo' would have the-P' option added to the arguments, as well as `cvs co foo'.

So I would suggest adding this

update -q

to that file which eclipse should then by default append. Hope that works. - Duncan

于 2012-11-18T06:26:02.523 回答