[cvsnt] Marking files as changed en masse.

John Peacock jpeacock at rowman.com
Wed Sep 11 15:01:00 BST 2002


Community technical support mailing list was retired 2010 and replaced with a professional technical support team. For assistance please contact: Pre-sales Technical support via email to sales@march-hare.com.


Zazueta, Robert wrote:
> This is sort of a general "Best practices" question. I have used CVS to
> maintain files for websites for quite some time. In these situations, you
> often have a ton of code that is all tied together (i.e. headers, footers,
> body pages, code libraries, etc.) but live in different parts of the drive
> and may all need to be changed at once. 
> 
> How do you keep track of all of the files you've changed? 

There is no reason that your sandbox has to look anything like your webserver's 
directory structure.  CVS can have multiple repositories, not to mention 
multiple directories all located in the same sandbox directory.  For example, if 
this is the directory structure on your web server:

	\domains\thisdomain\htdocs\....
	\domains\includes\thisdomain\...
	\domains\cgi-bin\thisdomain\...

Then you could easily have all three directories organized in your sandbox like 
this:

	\sandbox\thisdomain\htdocs\...
	\sandbox\thisdomain\includes\...
	\sandbox\thisdomain\cgi-bin\...

There are several ways to do this, the easiest (in my mind) is to use the 
MODULES file to create a combined module entry something like this:

#MODULE_NAME   DIRECTORY_IN_REPOSITORY
thisdomain-html	domains/thisdomain/htdocs
thisdomain-inv	domains/includes/thisdomain
thisdomain-cgi	domains/cgi-bin/thisdomain
thisdomain	-a thisdomain-html thisdomain-inv thisdomain-cgi

Then checking out thisdomain, you would get all directories in a common 
directory.  Then all updates/commits would be done from the top level, and would 
automatically catch all changed files is one swell foop, even though the 
subdirectories are located in different regions of the repository.

You could also organize your repository and sandbox in the same fashion, and 
check out specific directories on the web server, eg. the repository and sandbox 
look like this:

	domains\thisdomain\htdocs\...
	domains\thisdomain\includes\...
	domains\thisdomain\cgi-bin\...

and you check out the htdocs directory tree on the web server where it belongs, 
the includes file where they belong, and the cgi-bin directory where it belongs.

The other thing to remember is that the web server should have it's own sandbox 
copies of the repository (in the correct locations for the web server).  And, 
the test web server should have a third sandbox of it's own.  You develop and 
update only the test site (automatically if desired) and only update the 
production system manually when you are ready to release a given update.

In addition, I have created a branch for significant development (like a 
complete rewrite) and moved the test server to the branch as well.  The 
production server, however, remained on the HEAD branch, so I could at any time 
update the production system while still maintaining a completely isolated 
development on the branch.  Once I was completed with the branch, I merged the 
changes to the HEAD branch and once again updated the production server.

HTH

John

-- 
John Peacock
Director of Information Research and Technology
Rowman & Littlefield Publishing Group
4720 Boston Way
Lanham, MD 20706
301-459-3366 x.5010
fax 301-429-5747




More information about the cvsnt mailing list
Download the latest CVSNT, TortosieCVS, WinCVS etc. for Windows 8 etc.
@CVSNT on Twitter   CVSNT on Facebook