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?
One simple solution would be using clearfsimport:
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.Note the ‘
-long‘ option, needed to display the versions created or updated (otherwise, it would only display the UCM activities…)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 previewsolution 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
clearfsimportwould 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)