Kiln » TortoiseHg » TortoiseHg
Clone URL:  
Pushed to one repository · View In Graph Contained in 2.0.3, 2.0.4, and 2.0.5

stable p4pending: safely handle a few more error conditions

Changeset 0d5f8a6e1b56

Parent bee5a520fe79

by Steve Borho

Changes to 2 files · Browse files at 0d5f8a6e1b56 Showing diff from parent bee5a520fe79 Diff from another changeset...

 
75
76
77
78
 
79
80
81
 
75
76
77
 
78
79
80
81
@@ -75,7 +75,7 @@
  try:   hashes = self.pending[curcl]   revs = [self.repo[hash] for hash in hashes] - except error.Abort, e: + except (error.Abort, error.RepoLookupError), e:   revs = []   self.cslist.clear()   self.cslist.update(self.repo, revs)
 
759
760
761
762
763
764
765
766
767
768
769
 
 
 
 
 
 
 
 
770
771
772
 
759
760
761
 
 
 
 
 
 
 
 
762
763
764
765
766
767
768
769
770
771
772
@@ -759,14 +759,14 @@
  changelist = hashes.pop(0)   clnum = int(changelist)   if len(hashes)>1 and len(hashes[0])==1: - state = hashes.pop(0) - if state == 's': - changelist = _('%s (submitted)') % changelist - elif state == 'p': - changelist = _('%s (pending)') % changelist - else: - raise ValueError - pending[changelist] = hashes + state = hashes.pop(0) + if state == 's': + changelist = _('%s (submitted)') % changelist + elif state == 'p': + changelist = _('%s (pending)') % changelist + else: + raise ValueError + pending[changelist] = hashes   except (ValueError, IndexError):   text = _('Unable to parse p4pending output')   if pending: