[cvsnt] Creating a macro to find modified/ added/ deleted files after a baseline

Aditya Gandhi agandhi at sapient.com
Wed Feb 11 15:32:22 GMT 2004


FYI..
While working ahead on this had another observation....
1. on CVSNT if a file was added after a tag was created and the command log -rTag: is used on the root folder the output for the file says... 0 selected revisions and therefore does not show the revision history
2. While on cvs on unix it shows as many revisions as there are as selected revisions.. and therefore shows there version history also...

Same is the case for files deleted before the tag was created

Here are the details of the CVS client/ server combos tried: 
Case 1:
  Client: Concurrent Versions System (CVSNT) 2.0.12 (client/server)
  Server: Concurrent Versions System (scast-vc) (CVS) 1.11.1p1 (client/server)
Case2: 
  Client: Concurrent Versions System (CVSNT) 2.0.12 (client/server)
  Server: Concurrent Versions System (CVSNT) 2.0.24 (client/server)

Therefore If I want my macro to work on both, the logic will need to be like this...
1. Parse log output from log -rstartTag: splitting it by file
2. if the file logs have a symbolic name corresponding to startTag
 a. then 
  i. if # of selected rev is 1 then the file was not modified
  ii. else it was modified after that
 b. If the revision history has text state: dead in it then it was deleted  after the tag was created
3. else 
 a. if revision history has state: dead in it
  i. the file was either deleted before the tag was created
  ii. or the file was added after the tag was created and then deleted
 b. else
  i. the file was added after the tag was created

The problem of being able to distinguish between 3.a.i and 3.a.ii still persists.

Also will appreciate if people can point out other loop holes in this as well
Regards

- Aditya Gandhi
-----Original Message-----
From: Aditya Gandhi [mailto:agandhi at sapient.com] 
Sent: Tuesday, February 10, 2004 9:19 PM
To: cvsgui at yahoogroups.com
Subject: [cvsgui] Creating a macro to find modified/ added/ deleted files after a baseline


Hi all,
I am trying to write a macro that can give me log details of files that
have been 
1. modified
2. added
3. deleted 
since a baseline

For this what I am trying to do is the following.. can you all please
confirm the algo
Assumption.. all the available files in the folder being queried were
baselined

Execute cvs log -rBaseline1:

Then parse the output...
Now here
1. If for a particular file the number of selected revisions = 1 then
the file has not changed since the baseline... therefore ignore it
2. If the number of selected revisions is 0 this can be due to 2
reasons... the file was added after the baseline was created or the file
was deleted before the baseline was created
3. Rest are files that were either modified or deleted after the
baseline was created

Q) now how can I distinguish between added/ deleted files in 2)
      One way could be that I look at the logs for these files and see
which one of them are in dead state... however this will not work for
files that were added after the baseline and then deleted.

Do let me know if you have any suggestions on this....

I would prefer if people can help me complete the algo above... 
Else please feel free to talk about alternate means of achieving this...

Also.. I intend to extent this to also include the endTag also.. and
therefore may use the command -r:Baseline1:Baseline2
If you feel there will be additional considerations that I will have to
make for the same please let me know

Thanks
Aditya Gandhi






Yahoo! Groups Sponsor
ADVERTISEMENT





Yahoo! Groups Links
* To visit your group on the web, go to:
http://groups.yahoo.com/group/cvsgui/
  
* To unsubscribe from this group, send an email to:
cvsgui-unsubscribe at yahoogroups.com
  
* Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service. 



More information about the cvsnt mailing list