[cvsnt] Get list of modified/added/deleted files

Gabriel Genellina gagsl-cvsnt at yahoo.com.ar
Tue Sep 12 03:43:21 BST 2006

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.

At Monday 11/9/2006 17:43, Glen Starrett wrote:

> > No, unfortunately it does not list added files; same as rdiff above
>It's also unfortunate I didn't read your post thoroughly enough to
>notice that was a big part of your problem before suggesting that. :(
>If you don't see this fixed in the latest version, you might want to
>post a repro script.  I tried it, but I couldn't repro it quickly.  I'm
>sure I skipped something, but don't have time to dig into it right now.

I've installed the latest testing release:
Concurrent Versions System (CVSNT) 2.5.04 (Zen) Build 2442 (client/server)

This is a test script; it assumes it's called inside a module 
"cvstest2" already added to CVSNT.

--- begin test.cmd ---
rem initial state, only A and B exist
echo > A.txt
cvs add A.txt
echo > B.txt
cvs add B.txt
cvs commit -m "initial version, only A and B exist"
rem tag as RELEASE_1
cvs tag RELEASE_1

rem change A, delete B, add new file C
echo >> A.txt
cvs remove -f B.txt
echo > C.txt
cvs add C.txt
cvs commit -m "A changed, B deleted, C new"

rem I want to detect changes between current state and RELEASE_1
rem desired output:
rem A.txt changed
rem B.txt removed
rem C.txt added

cvs -q rlog -SNR -rRELEASE_1:: cvstest2
cvs -q rdiff -f -s -rRELEASE_1 cvstest2
cvs -Q diff -N --brief -rRELEASE_1
--- end test.cmd ---

These are the 3 outputs:

C:\TEMP\cvstest2>cvs -q rlog -SNR -rRELEASE_1:: cvstest2

---> Notice that C.txt was added after RELEASE_1 but is missing. 
Also, no indication that B.txt was really removed

C:\TEMP\cvstest2>cvs -q rdiff -f -s -rRELEASE_1 cvstest2
File cvstest2/A.txt changed from revision 1.1 to 1.2
File cvstest2/B.txt is removed; not included in current release

---> This is *almost* what one would expect from rdiff
But reference to C.txt is missing; since B.txt is listed as 
"removed", C.txt should be listed as "newly added" or something like that.

C:\TEMP\cvstest2>cvs -q diff -N --brief -rRELEASE_1 .
Index: A.txt
RCS file: c:\cvsrepo/cvstest2/A.txt,v
retrieving revision 1.1
retrieving revision 1.2
diff --brief -r1.1 -r1.2
Files C:\DOCUME~1\ADMINI~1\CONFIG~1\Temp\cvs21.tmp and 
C:\DOCUME~1\ADMINI~1\CONFIG~1\Temp\cvs22.tmp differ
Index: B.txt
RCS file: B.txt
diff -N B.txt
Files C:\DOCUME~1\ADMINI~1\CONFIG~1\Temp\cvs23.tmp and nul: differ
Index: C.txt
RCS file: C.txt
diff -N C.txt
Files nul: and C:\DOCUME~1\ADMINI~1\CONFIG~1\Temp\cvs24.tmp differ

---> diff -N now works, but has many disadvantages:
1) It requires a fully checked out sandbox -and that may be problematic-
2) It's a lot more verbose (I could not make it shorter!)
3) You have to parse the output to detect changes - and worse, the 
needed information is not on a single line.
4) It appears to be much slower

I think that rdiff should include the newly added files also.
Or, any other suggestion for getting the list of 
added/removed/changed files after a certain tag/date?

Gabriel Genellina
Softlab SRL 

Preguntá. Respondé. Descubrí.
Todo lo que querías saber, y lo que ni imaginabas,
está en Yahoo! Respuestas (Beta).
¡Probalo ya! 

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