Piotr Dobrogost
Piotr Dobrogost

Reputation: 42425

How to add an option to specific cvs command used by Eclipse?

I'd like to add -q option to cvs update command which is run after I choose Team/Update from the context menu in Eclipse. I don't see any option to do this in Preferences/Team/CVS. How can I do this?

UPDATE

Duncan Krebs is his answer notes that setting such options for standard cvs is possible by using .cvsrc configuration file. However Eclipse uses it's own Java implementation of cvs and it looks like it does not honour settings in .cvsrc file. I asked on Eclipse Forums as well.

I use Eclipse Indigo Service Release 2 (Build id: 20120216-1857) on Windows Vista SP2 x64.

Upvotes: 0

Views: 174

Answers (1)

Duncan Krebs
Duncan Krebs

Reputation: 3502

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

Upvotes: 1

Related Questions