apparently, there is a way to checkout a project in read-only mode. Editing a file in this case requires an "edit" (and subsequent commit or unedit command) support:
see http://ximbiot.com/cvs/manual/cvs-1.11.22/cvs_10.html#IDX172
Since a file which is being watched is checked out read-only, you cannot simply edit it. To make it read-write, and inform others that you are planning to edit it, use the cvs edit
command. Some systems call this a checkout, but CVS uses that term for obtaining a copy of the sources (see section Getting the source), an operation which those systems call a get or a fetch.
-lR
] [-a
action]… [files]… Prepare to edit the working files files. CVS makes the files read-write, and notifies users who have requested edit
notification for any of files.
The cvs edit
command accepts the same options as the cvs watch add
command, and establishes a temporary watch for the user on files; CVS will remove the watch when files are unedit
ed or commit
ted. If the user does not wish to receive notifications, she should specify -a none
.
The files and the options are processed as for the cvs watch
commands.
Normally when you are done with a set of changes, you use the cvs commit
command, which checks in your changes and returns the watched files to their usual read-only state. But if you instead decide to abandon your changes, or not to make any changes, you can use the cvs unedit
command.
-lR
] [files]… Abandon work on the working files files, and revert them to the repository versions on which they are based. CVS makes those files read-only for which users have requested notification using cvs watch on
. CVS notifies users who have requested unedit
notification for any of files.
The files and options are processed as for the cvs watch
commands.
If watches are not in use, the unedit
command probably does not work, and the way to revert to the repository version is with the command cvs update -C file
(see section update—Bring work tree in sync with repository). The meaning is not precisely the same; the latter may also bring in some changes which have been made in the repository since the last time you updated.
When using client/server CVS, you can use the cvs edit
and cvs unedit
commands even if CVS is unable to successfully communicate with the server; the notifications will be sent upon the next successful CVS command.
To check out sources in read-only mode, use -r *global* option:
cvs -r checkout ...
I've checked in the code to support cvs edit/unedit into 6.5 trunk, but it is commented out. Search the sources for "#471".
I am changing this issue to 7.0.
I've checked in the code to support cvs edit/unedit into 6.5 trunk, but it is commented out. Search the sources for "#471".
I am changing this issue to 7.0.
netbeans cvsclient Unedit command does not work as expected;
also, we may need to implement read-only check-in and checkout mode.
netbeans cvsclient Unedit command does not work as expected;
also, we may need to implement read-only check-in and checkout mode.
I am afraid edit/unedit may still behave strangely on Windows - I still don't understand why I was getting access denied exceptions in a workspace checked out with cygwin (permissions?).
I am afraid edit/unedit may still behave strangely on Windows - I still don't understand why I was getting access denied exceptions in a workspace checked out with cygwin (permissions?).
please also try on mac and linux - the code uses chmod command to toggle r/o flag.
please also try on mac and linux - the code uses chmod command to toggle r/o flag.
Issue #471 |
Closed |
Fixed |
Resolved |
Completion |
No due date |
No fixed build |
No time estimate |
To check out sources in read-only mode, use -r *global* option:
cvs -r checkout ...