Commits

Steve Borho committed 589ad6c

thgrepo: ignore folders in the shelve directory (fixes #832)

  • Participants
  • Parent commits 49d1b27
  • Branches stable

Comments (0)

Files changed (1)

tortoisehg/hgqt/thgrepo.py

             if os.path.isdir(sdir):
                 def getModificationTime(x):
                     return os.path.getmtime(os.path.join(sdir, x))
-                return sorted(os.listdir(sdir),
+                shelves = sorted(os.listdir(sdir),
                     key=getModificationTime, reverse=True)
+                return [s for s in shelves if \
+                           os.path.isfile(os.path.join(self.shelfdir, s))]
             return []
 
         def thginvalidate(self):