Changeset 1245 in tailor


Ignore:
Timestamp:
08/16/06 01:48:28 (7 years ago)
Author:
lele@…
Hash name:
20060815234828-97f81-7d9010040e5f7548f86f210e2e0370c94b897f35
Message:

Allow insertion of new entry before another one

File:
1 edited

Legend:

Unmodified
Added
Removed
  • vcpx/changes.py

    r1240 r1245  
    154154            self.log = log.strip() 
    155155 
    156     def addEntry(self, entry, revision): 
    157         """ 
    158         Facility to add an entry. 
     156    def addEntry(self, entry, revision, before=None): 
     157        """ 
     158        Facility to add an entry, eventually before another one. 
    159159        """ 
    160160 
    161161        e = ChangesetEntry(entry) 
    162162        e.new_revision = revision 
    163         self.entries.append(e) 
     163        if before is None: 
     164            self.entries.append(e) 
     165        else: 
     166            self.entries.insert(self.entries.index(before), e) 
    164167        return e 
    165168 
Note: See TracChangeset for help on using the changeset viewer.