[cvsnt] Re: Best practices for shadow sandbox
Oliver Giesen
ogware at gmx.net
Tue Jan 3 00:35:50 GMT 2006
John J. Xenakis wrote:
> > AFAIK you can also specify the -kx option there. The possible
> > disadvantage with this is that some of the client tools may not be
> > aware of this option. For example, I don't know whether Tortoise
> > does the automatic update-before-edit on -kx files (like it does
> > on -kb files).
>
> I don't follow this. There's a -kx option for "cvs edit" which
> guarantees exclusive use, but as you say, Tortoise doesn't appear to
> use it. And there's the -kb option for "cvs add", which specifies
> binary. Is that what you mean?
Yes and no. Try running cvs -n up -k? inside a sandbox and you will get
a list of the available -k options (aka "file flags", aka "file
options", aka "keyword expansion modes", aka "hell knows what else").
Here's what my CVSNT 2.5.03.2151 reports:
Valid flags are one of:
t Text file (default)
b Binary file (merges not allowed).
B Binary file using binary deltas (merges not allowed).
u Unicode (UCS-2) file with BOM.
{encoding} Extended encoding type
Followed by any of:
c Force reserved edit.
x Force exclusive edit.
k Substitute keyword.
v Substiture value.
l Generate lockers name.
s File is static (requires commit -f to change).
L Generate Unix style line endings on checkout.
D Generate DOS style line endings on checkout.
M Generate MAC style line endings on checkout.
o Don't change keywords.
z Compress deltas within RCS files.
1 Only store a single revision in the file.
Originally (and in GNU CVS this is still the case) the k-options were
intended solely for specifying if and how keywords (e.g. $Author$,
$Revision$, $Log$, etc.) get expanded on checkout. CVSNT extended this
property to control a lot more, among other things how the file get
stored inside the repository and, more the point of your question, the
default behaviour regarding edit/unedit/commit.
These options are typically applied to a file upon adding or importing
it, using something like:
cvs add -kBc SomeDocument.doc
This would add the file SomeDocument.doc in binary mode but using
binary deltas for storage efficiency. It would also result in the file
always being checked out read-only and any edit and commit operations
would always imply the -c option (i.e. "check for valid edits") being
used.
Putting the following into cvswrappers:
*.doc -kBc
and then simply adding the file using this:
cvs add SomeDocument.doc
would have exactly the same effect.
You could also change the k-option of files that have already been
added. For this you would have to use the following sequence of
commands:
cvs up -kBc SomeDocument.doc
cvs ci -m"changed k-mode" -f SomeDocument.doc
[Note that this only works with recent builds of CVSNT. Older builds
and GNU CVS do not version k-option changes and require you to make the
change via the cvs admin -k command]
Hope this helps.
--
Oliver
---- ------------------
JID: ogiesen at jabber.org
ICQ: 18777742 (http://wwp.icq.com/18777742)
More information about the cvsnt
mailing list