.TH LCVS 1 "Dec 18, 2007" "" "" .SH NAME lcvs - cache a local copy of a cvs repository .SH SYNOPSIS \fBlcvs get :ext:@:\fR .br \fBlcvs snyc []\fR .br \fBlcvs list []\fR .br \fBlcvs ls \fR .br \fBlcvs checkout \fR .br \fBlcvs do-local ...\fR .br \fBlcvs push \fR .br .SH DESCRIPTION lcvs is a tool to keep a local copy of a cvs repository and allow to access it with commands that don't modify the repository. This is intended to be used on machines (like laptops) that don't have access to the repository all the time. Note that this tool cannot be used to modify the repository. Use cvsq(1) to schedule commits. \fBlcvs get :ext:@:\fR .br obtain a local copy of the specified remote repository. This command is needed only once per repository. \fBlcvs sync [substring]\fR .br update all the repositories locally mirrored where the given substring occurs somewhere in the given repository specification. If no substring is given, all the repositories are updated. \fBlcvs mirror [substring]\fR .br like "lcvs sync", but instead of accessing the primary site, unpack the tarball specified in the mirrortarball file in he lcvs directory (see lcvs-files(5)) to get the "new" version. Usefull, if you have some other means of getting an up-to-date tar ball on your machine. \fBlcvs list [substring]\fR .br list all the repositories currently mirrored where the given substring occurs somewhere in the given repository specification. If no substring is given, all repositories are listed. \fBlcvs ls \fR .br list all the modules in (the mirror of) the specified repository. \fBlcvs checkout \fR .br Use the local copy of the specified (global) repository to produce a working directory for the specified module. This working directory will correctly refer to the global repository, to that commits go to the main repository, not to the local mirror. This command requires that the repository is locally mirrored; local copies can be obtained by running "lcvs get" first. \fBlcvs do-local ...\fR .br \fBlcvs l ...\fR .br Carry out the commands in the current working directory, but with respect to the local copy of the respective repositories. This requires that a local copy was obtained first and only makes sense if the local copy is reasonably up to date. Some sanity checks are performed to avoid damage using this command, but in the end it is your responsibility to use lcvs in a sensible way. \fBlcvs push cvsdir user host cvsroot\fR .br In some cases it is desirable that the server with the CVS repository pushes the repository to a mirror (presumably one that is online all the time; hence this command is not useful for laptops and similar devices, where lcvs is mainly intended for), rather than the mirror pulling it. "lcvs push" will push a copy of the given directory (assuming it is a CVS root directory) to the account of the given user at the given host claiming the content to be repository with the specified cvsroot. After the contents have been pushed on the mirror side the recv-hooks for that repository will be executed as specified in the configuration of the mirror (see lcvs-files(5) for a description of the hooks). Note that here the machine with the repository has to be able to log into the machine with the mirror; this is different from the normal use of lcvs. Also note, that it is command requires the mirror to be online. .SH HOW IT WORKS The commands lcvs get and lcvs sync keep a local copy of the respective repositories under ~/.lcvs; see lcvs-files(5) for the file structure. A call "lcvs do-local ..." performs the following actions. 1.) look for all subdirectories called CVS. Rename CVS/Root to CVS/.lcvs-Root and generate a new file CVS/Root, pointing to the local copy .br 2.) call "cvs ..." .br 3.) Undo the changes made in the first step. Additionally, after an update with the "-d" option given, force-global is run (see below) to make sure the directories newly added by the local update correctly refer to the global repository. .SH WARNING Due to the nature of lcvs changing information in various cvs administrative directories, lcvs cannot cope with two instances of lcvs running simultaneously on the same working directory. Currently, there is no mechanism to detect or prevent this from happening. .SH ADDITIONAL COMMANDS The following is the list of commands that lcvs also recognises. It is specified that, that they will (as do the commands mentioned so far) keep their semantics in future revisions of this program. New commands (including volatile ones) may be added though. However, normally, it should not be necessary to call these lcvs commands. Do not use them unless you know what you're doing. \fBlcvs make-global\fR .br recursively searches for a subdirectory called "CVS". If a subdirectory called "CVS" contains a file named ".lcvs-Root" then this file is renamed to "Root", first deleting the old "Root" file, if it exists. This intended to bring a working directory back into a state pointing to the original checkout. \fBlcvs force-global\fR .br recursively searches for a subdirectory called "CVS". If in such a subdirectory the file Root refers to a file under ~/.lcvs, then it is replaced by the cvsroot this local mirror refers to. This action is run automatically after an "lcvs l update" with the "-d" option. It also allows for local checkouts which are best obtained using "lcvs checkout". \fBlcvs force-action ...\fR .br The same as "lcvs do-local ..." but without any sanity checks or any post-processing different from the usual make-global. Usually this is not a good idea. You have been warned. \fBlcvs pre-recv root\fR .br generate a fresh new tmp directory in the repository for the given CVS root and output its name on standard out. The output may contain more information, but it is guaranteed that, if no error occurred, the file name is everything after the first occurrence of a "+" sign at the beginning of a line; also, in case an error occurred, it is specified that no line will start with a "+" sign. \fBlcvs recv root tmpdir\fR .br incorporate the contents of the tmpdir as new contents to the mirror for the given CVS root. Caller has to guarantee that the name of the tmpdir is obtained by a previous call to "lcvs pre-recv", that the contents of the tmpdir are an up to date copy of the CVS repository named by the given root, and from now on, no one (except callee of course) will ever access the tmpdir any more. After incorporating the contents of the tmpdir, the recv-hooks for that repository are executed. lcvs will keep the lock while running the recv-hook. See lcvs-files(5) for details. .SH OPTIONS \fB-nofallback\fR .br Normally the state of the mirror of a repository before a synchronisation is kept in a fallback directory (see lcvs-files(5) for details) after a successful synchronisation. This is to avoid that a single synchronisation can destroy a beforehand intact mirror; note, however, that lcvs is not meant as a backup tool. Giving the option -nofallback, the fallback directory is not generated. An already present fallback directory is deleted never the less. This is useful for huge repositories to save on disk space. .SH REMARK lcvs can be used to mirror other file hierarchies that are not necessarily cvs(1) repositories. In fact, "lcvs get :ext:user@host:/some/path" will start mirroring a copy of what would be obtained by "scp user@host:/some/path localfilename". However, if what you're mirroring is not a cvs repository you probably won't have a cvs checkout of it, so that commands other than "lcvs get" and "lcvs sync" won't apply to this. In other words, even though lcvs won't prevent you from doing so, you should have a good reason. .SH FILES \fB~/.lcvs/\fR .br The directory where the local copies are stored. See lcvs-files(5) for details. .SH SEE ALSO .BR lcvs-files "(5), "cvsq "(1), "cvs "(1)" .SH AUTHOR Klaus Aehlig