SnapshotCM News - Simplifying CM, Expanding Possibilities
Menu

Subscribe:
Do you want to be among the first to know when something new comes up? Sign up now to receive SnapshotCM News!

your email

SnapshotCM Tips and Tricks

  • Question: How can I generate a report comparing two snapshots, and for each file that has a difference, show the revision history from the earlier to the later revision?
    Answer: There are two command-line approaches to accomplish this.
    In the first, use a command something like:
    whist -r/PathToFirstSnapshot:/PathToSecondSnapshot -uARTYz /
    which will, based on the files in the mapped snapshot, show all changes after the first snapshot up to the second. We recommend that the second snapshot and the mapped be the same, so that both deleted and created files will have their history listed, and so that the "show only ancestors" filtering will work properly. Only items which are not referenced by the second snapshot (i.e., unlinked from it) will be omitted.
    In the second command-line approach, use
    sscompare -cst
    to get the list of items which are different between the snapshots and use that list to call whist on just those files. Here is a unix shell script snippet showing the basic technique (thanks Glenn):
    V1=/PROJ/SS1
    V2=/PROJ/SS2
    HOST="server.name.com"
    sscompare -h$HOST -cst "$V1" "$V2" |
      grep -v 'snapshot:' | sed 's/^.* \//\//' |
    while read file
    do
      echo "Item: $file"
      whist -h$HOST -d -uARTYz "-r$V1:$V2" "-S$V2" -D/ "$file" |
         egrep -v '.*----.*|^Item:'
      echo '---------------------------'
    done | sed -e '/Snapshot:/d' -e 's/Size:.*//'
    

    You can also come somewhat close using the GUI by comparing the two snapshots, highlighting all items (Ctrl+A) and showing history. In the History Options dialog, disable recursion, show where used, and Merge Sort by Date. Since this doesn't truncate the history by the earlier snapshot, you can enter a cutoff date, if you know what is appropriate, to reduce the output volume.
  • Command Highlight: wdiff
    Did you know that the wdiff command can invoke an external differencing tool to display file differences? By using the -P option and a full path to a difference displaying tool, unix users can view visual differences using an X windows diff tool such as tkdiff, or others. In fact, since SnapshotCM understands tkdiff, many of the filtering options of wdiff will be passed directly to tkdiff automatically if the -Ptkdiff option is passed. You can also add the -P option to the wdiff line of your .snapshotcmrc file to make it the default. Note: SnapshotCM does not ship with such tools on Unix, but they are readily available from public sources.

 

Footer 
with globe
Mailing Address: True Blue Software Company - 5214 Keystone Creek Court - Fort Collins, CO 80528 - USA
Telephone: 970-223-1200 - FAX: 970-223-9270
E-Mail: sales@truebluesoftware.com - support@truebluesoftware.com

© 2oo6 True Blue Software Company. All rights reserved.
Simplifying CM True Blue Software Simplifying CM, Expanding Possibilities