-----Original Message-----
From: Aditya
Gandhi
Sent: Thursday, February 12, 2004 5:44 PM
To: 'address@hidden'
Subject: Creating a macro to find
modified/ added/ deleted files after a baseline
FYI..
While working ahead on this had another
observation….
- 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
- 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…
- Parse log output from log –rstartTag: splitting it by file
- if the file logs have a symbolic name corresponding to startTag
- then
i.
if # of
selected rev is 1 then the file was not modified
ii.
else it
was modified after that
- If the revision history has text state: dead in it then it was
deleted after the tag was created
- else
- 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
- 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
-----Original Message-----
From: Aditya Gandhi
[mailto:address@hidden
Sent: Tuesday, February 10, 2004 9:19 PM
To: address@hidden
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