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

stable shelve: improve how shelves are sorted from newest to last on the shelf comboboxes

Changeset adb98726b317

Parent ba9eda97f313

by Angel Ezquerra

Changes to 2 files · Browse files at adb98726b317 Showing diff from parent ba9eda97f313 Diff from another changeset...

 
372
373
374
375
376
 
 
 
377
378
379
 
372
373
374
 
 
375
376
377
378
379
380
@@ -372,8 +372,9 @@
  def refreshCombos(self):   shelvea, shelveb = self.currentPatchA(), self.currentPatchB()   - # Sort shelves from newest to oldest - shelves = self.repo.thgshelves()[::-1] + # Note that thgshelves returns the shelve list ordered from newest to + # oldest + shelves = self.repo.thgshelves()   disp = [_('Shelf: %s') % hglib.tounicode(s) for s in shelves]     patches = self.repo.thgmqunappliedpatches
 
451
452
453
454
 
 
 
 
455
456
457
 
451
452
453
 
454
455
456
457
458
459
460
@@ -451,7 +451,10 @@
  def thgshelves(self):   self.shelfdir = sdir = self.join('shelves')   if os.path.isdir(sdir): - return os.listdir(sdir) + def getModificationTime(x): + return os.path.getmtime(os.path.join(sdir, x)) + return sorted(os.listdir(sdir), + key=getModificationTime, reverse=True)   return []     def thginvalidate(self):