Changeset 1199


Ignore:
Timestamp:
05/02/09 18:02:26 (3 years ago)
Author:
Peter Peterson
Message:

Shorten path printed out to make it easier to read. Refs #158.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/applications/nxdiff

    r1198 r1199  
    8686            self.summary = Diff.SAME 
    8787 
     88    def __shortPath(self): 
     89        mypath= self.path.split("/") 
     90        mypath = [item.split(":")[0] for item in mypath] 
     91        return '/'.join(mypath) 
     92 
    8893    def __str__(self): 
    89         result = "%s %s" % (getDiffSym(self.summary, self.__format), self.path) 
     94        result = "%s %s" % (getDiffSym(self.summary, self.__format), \ 
     95                            self.__shortPath()) 
    9096        if self.summary == Diff.DIFF: 
    9197            result += " " + " ".join(self.details) 
Note: See TracChangeset for help on using the changeset viewer.