info-cvs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Help Please: Preserving keywords in 3rd party sources


From: Larry Jones
Subject: Re: Help Please: Preserving keywords in 3rd party sources
Date: Fri, 11 Jan 2002 10:50:56 -0500 (EST)

Nicholas Catanchin writes:
> 
> Is it possible to import a third-party source containing:
> 1) Binary files (GIF images)
> 2) PHP source files containing $Id$ keyword
> 
> Without:
> A) Corrupting the images
> B) Replacing the $Id$ keyword with my local info

Yes, although how easy it is depends on what platform you're on and how
the files are organized.  Keywords are replaced on checkout/update, not
import, so you don't *have* to worry about B until later, although you
might want to.

If you're on a platform that doesn't distinguish between text and binary
files (most Unix-like systems don't), you can just import everything
using whichever -k option you prefer and then use cvs admin after the
fact to correct it as needed.

If you're on a platform that does distinguish between text and binary
files (like Windows), you have to get it right for the import or you'll
get corrupted files.  If you can tell the binary files by extensions,
you can use wrappers to get the correct results in one shot:

        cvs import -W "*.gif -k 'b'" -W "* -k 'o'"

Note that the order of the -W options is important since the binary
files will match both specifications.  I think you need to be running
the current development version of CVS for this to work right in
client/server mode.  If you can't do that, I think your only recourse is
to move the binary files into a parallel directory structure and then do
two separate imports, one for the binary files and one for the text
files.

-Larry Jones

They can make me do it, but they can't make me do it with dignity. -- Calvin



reply via email to

[Prev in Thread] Current Thread [Next in Thread]