tags:

views:

49

answers:

1

I saw a reference on another question to a unique commit id auto-generated by CVSNT that marks each commit. I think most people in my department are using CVSNT or frontends to it.

I found commit identifiers described in the CVSNT manual, but there is no explanation about how to determine what the CVSNT commit identifier is for a particular revision of a file. Is there a way to do this? I'd like to find out what commit identifiers are being generated for other people's checkins so I can group together the files involved in their commits.

A: 

The CVS command log and rlog both show the commit identifier for individual revisions of a file. I'm not aware of CVS command that get retrieve information using this identifier, but I can confirm that all files in a single commit share the same identifier.

I have my own log-file parser that uses the commit-id to group together the files affected by a single commit (e.g. change history is sorted by date and groups files into single commits).

Having read your link, you could probably specify something like "log -r @commit-id" to get a list of affected files sharing the commit identifier. There are probably more tweaks to the command line, but the following gives some success (slightly noisy):

c:\> cvs -q log -N "-r @fd049d34574117b"

=============================================================================

RCS file: /folder/file.xml,v
Working file: folder/file.xml
head: 1.3
branch:
locks: strict
access list:
keyword substitution: kv
total revisions: 4;     selected revisions: 1
description:
=============================================================================

RCS file: /folder/file2.xml,v
Working file: /folder/file2.xml
head: 1.2
branch:
locks: strict
access list:
keyword substitution: kv
total revisions: 2;     selected revisions: 0
description:
=============================================================================

Notice that the first file contains "selected revisions: 1" meaning that commit corresponds to a version of the file.

  1. You could probably use a regular expression to filter out the "selected revisions: 0" entries (multi-line reg delimited by a series of "==============")
  2. Then extract only the "working file" entries of the result to give a file list.

If you don't want to roll your own tools, try looking for "cvs changeset":

Ray Hayes