Kiln » TortoiseHg » TortoiseHg
Clone URL:  
Pushed to one repository · View In Graph Contained in 1.0.1, 1.0.2, and 1.0.3

stable treeview: validate revision before attempting to load

repo[-1] is the null changeset and can never appear in self.index. Null has
other aliases, so looking at ctx.rev() is the safest check.

Sanity check the revision number here as well, if we fail to acquire a context
for it, do not start a load.

Closes #1000

Changeset 7ffbe08d19f5

Parent e037d7994c6e

by Steve Borho

Changes to one file · Browse files at 7ffbe08d19f5 Showing diff from parent e037d7994c6e Diff from another changeset...

 
365
366
367
 
 
 
 
 
 
 
 
368
369
370
 
365
366
367
368
369
370
371
372
373
374
375
376
377
378
@@ -365,6 +365,14 @@
  else:   self.next_revision_batch(self.batchsize)   + try: + ctx = self.repo[revid] + if ctx.rev() == -1: + self.stbar.set_text('Null changeset is not viewable') + return + except Exception, e: + self.stbar.set_text(str(e)) + return   handler = self.connect('batch-loaded', loaded)   self.next_revision_batch(self.batchsize)