Changeset 4732 for branches/1.3


Ignore:
Timestamp:
Nov 15, 2014, 5:07:05 PM (5 years ago)
Author:
ldelgass
Message:

Apply patch made on nanohub on 8/18/2014

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/1.3/gui/apps/rpdiff

    r3177 r4732  
    2424exec tclsh "$0" ${1+"$@"}
    2525# tclsh executes the rest...
    26 
    2726package require Rappture
    2827
     
    3635proc diff {path lib1 lib2} {
    3736    set knowntypes {boolean choice cloud curve field group histogram image integer loader log mesh note number periodicelement phase sequence string structure table unirect2d}
    38 
    3937    set type1 [$lib1 element -as type $path]
    4038    set type2 [$lib2 element -as type $path]
     
    490488            }
    491489        }
     490        loader {
     491        }
    492492        default {
    493             error "don't know how to compare type \"$type\""
     493            puts stderr "ignoring \"$type1\" for \"$path\""
    494494        }
    495495    }
     
    557557
    558558# ======================================================================
    559 if {$argc != 2} {
     559
     560if {$argc < 2} {
    560561    puts stderr "USAGE: rpdiff file1.xml file2.xml"
    561562    exit 9
     
    563564set lib1 [Rappture::library [lindex $argv 0]]
    564565set lib2 [Rappture::library [lindex $argv 1]]
     566set path "output"
     567if { $argc > 2 } {
     568   set arg [lindex $argv 2]
     569   if { $arg == "-path" && $argc == 4 } {
     570      set path [lindex $argv 3]
     571   }
     572}
    565573
    566574# compute the differences
    567 set diffs [diff output $lib1 $lib2]
     575set diffs [diff $path $lib1 $lib2]
    568576
    569577if {[llength $diffs] == 0} {
Note: See TracChangeset for help on using the changeset viewer.