Changeset 1655 in tailor for vcpx/repository/p4/source.py


Ignore:
Timestamp:
08/06/08 17:00:41 (5 years ago)
Author:
vincent.legoll@…
Hash name:
20080806150041-dce4f-a477e28d6a34e6f8bfbf66ca53dc1b244edca1c4
Message:

fix revnotes? being empty stacktrace

Fix "IndexError?: list index out of range" because there was no 'notes' in the filelog

File:
1 edited

Legend:

Unmodified
Added
Removed
  • vcpx/repository/p4/source.py

    r1647 r1655  
    106106 
    107107                log = p4.filelog(path+'#'+str(f['rev']), maxRevs=1) 
    108                 note = log[0]['revs'][0]['notes'][0] 
    109                 m = self.branchRE.match(note) 
    110                 if m: 
    111                     old = m.group('path') 
    112                     branched[old] = e 
    113                     self.log.info('Branch %r to %r' % (old, name)) 
     108 
     109                # rev['notes'] may be empty 
     110                notes = log[0]['revs'][0]['notes'] 
     111                if len(notes) > 0: 
     112                    m = self.branchRE.match(notes[0]) 
     113                    if m: 
     114                        old = m.group('path') 
     115                        branched[old] = e 
     116                        self.log.info('Branch %r to %r' % (old, name)) 
    114117 
    115118        for f in desc['files']: 
Note: See TracChangeset for help on using the changeset viewer.