[Top][All Lists]

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

Re: Making Patch .zip files

From: Todd Denniston
Subject: Re: Making Patch .zip files
Date: Thu, 10 Dec 2009 14:23:46 -0500
User-agent: Thunderbird (X11/20090625)

JoeyB wrote, On 12/09/2009 12:16 PM:
Hi All,

I can't believe I cannot find this anywhere on the net. I feel stupid
for asking it but here goes:
I want to create a .zip file that contains all the files that have
changed between two tags (say between tag "A" oldest to tag "B"
newest)  on a branch in CVS. So, I would like to create a folder
structure that contained ONLY the changed files between these two
tags. Then, I could zip this folder structure up that included only
the changed files, give it to someone, they could un-zip this on top
of  their older release copy of the code (for example, a release copy
released at tag "A") and be up to tag "B".  I can't find any way to do
this in CVS. All I can find is a lot of references to .patch files
that indicate what exact changes are in the files. That's great but
what do I do with that? I can't find anything that explains what use
a .patch file is.

just popping RevB files into a sandbox can cause significant problems, the least of which is the one I mention at the end of my patching example.

Is there any way to call a checkout of just the changed files between
two tags?  Can CVS checkout a folder structure that contains just the
files that have changed between two tags? What good is a .patch file anyway?
a patch file is:
a) smaller than sending the whole thing, if you know what both sides started 
b) defines only what changed between revisions, so that the receiving side can apply the same changes but if needed intermix those with changes they have made too.
c) machine readable to do (b)

What would I do with it?


You are talking about using a .zip file instead of .tgz or .tar.bz2, SO I kind of have to assume you or your partner are using windows and not with cygwin.

Because windows is in the loop things get interesting.

If you were on Unix or had mentioned Cygwin the following would have been the suggestion (assuming I remember my rdiff and patch commands correctly):
1) at the server:
cvs rdiff -u -rA -rB module > AtoB.patch 2>&1
2) at the client
cd /path/to/dir/holding/module
patch < AtoB.patch
### HOWEVER when someone finally takes the remote sandbox to a system
### where they can update/checkin there will be some issues with the patches
### causing "conflicts" IIRC, because they change the same lines of code that
### cvs will be wanting to update during the update/checkin. (minor but 
annoying issue)

With windows only... _probably_ the best way would be to:
1) on client:
cd \path\to\dir\holding\module
zip -r module\
mv module never_work_in_this_tree_again
2) on windows client local to server:
cd module
#change all the user info to you in the CVS directories
cvs update
#change all the user info back to original in the CVS directories
cd ..
zip -r module\
3) on client:

I don't know if CVSNT has a disconnected mode that you can use or some way to do patching, but you should consider asking your question in that list:

Following list borrowed from Arthur Barrett
CVSNT newsgroup:
WinCVS newsgroup:
TortoiseCVS newsgroup:

OH, BTW I have not tested any of the above, if it break things, then you get to keep all the chunky bits... backup first. :)
Todd Denniston
Crane Division, Naval Surface Warfare Center (NSWC Crane)
Harnessing the Power of Technology for the Warfighter

reply via email to

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