tags:

views:

68

answers:

1

I have two streams, where one is based off of the other. I'm working in the child stream now. Before I deliver, I want to know which files are new and which files are modified versions of files in the base stream.

For example:

Base stream
A.txt
B.txt

Child stream
A.txt
B.txt <- modified
C.txt <- new

My delivery is going to include both my changes to B.txt as well as the new file C.txt. I want to know which files I'm delivering, and whether or not they are new.

I would like to do this command line, as it's part of a script that I'm writing to help me out with delivering streams.


Thinking about this some more, I could do this if we could find out the previous version of a given version and then see if it's empty. Is there a way to do this?

A: 

One simple solution would be using clearfsimport:

 clearfsimport -preview

With the '-preview' option, you do not import anything, but by parsing the output of what would modified ("updated version") or created ("new version"), you would get what you want.

Of course, in the same spirit, you could just use the '-preview' option of the deliver operation for pretty much the same result.

deliver –pre/view –l/ong –str/eam sourceStreamForDeliver@\myPVobName

Note the '-long' option, needed to display the versions created or updated (otherwise, it would only display the UCM activities...)


My understanding of clearfsimport is that it's used to import files that aren't already managed under clearcase.

Nope: clearfsimport can import new files or update existing files (it can even suppress existing versioned files if they are not in the imported source tree (option "| mirror`")


After some tests, the deliver -l preview solution is more accurate, since it will only report new or updated files which are actually versioned in the source (i.e. the view on the source stream of the deliver).
A clearfsimport would blindly try to import every files present within the source view, including private files (i.e. "not-versioned" files), which would then be incorrectly reported as "new" file in the destination view (the one on the destination or "target" stream of the deliver)

VonC
My understanding of clearfsimport is that it's used to import files that aren't already managed under clearcase. In my situation, the files have already been checked in (and modified) several times on the child stream.
bradtgmurray
@bradtgmurray : I describe fully what `clearfsimport` can do in this SO answer: http://stackoverflow.com/questions/138321/how-can-i-use-clearcase-to-add-to-source-control-recursively#144310
VonC