Kiln » TortoiseHg » TortoiseHg
Clone URL:  
Pushed to one repository · View In Graph Contained in 0.8.1, 0.8.2, and 0.8.3

thgtaskbar: do not remove .hg/thgstatus if it contains '@@noicons'

Changeset d4bb3d7c4d60

Parent 39a7610867c6

by Adrian Buehlmann

Changes to one file · Browse files at d4bb3d7c4d60 Showing diff from parent 39a7610867c6 Diff from another changeset...

Change 1 of 1 Show Entire File thgtaskbar.py Stacked
 
317
318
319
 
320
321
322
 
 
 
 
 
 
 
323
324
325
 
317
318
319
320
321
 
 
322
323
324
325
326
327
328
329
330
331
@@ -317,9 +317,15 @@
  roots, notifypaths = getrepos([path])   if roots:   for r in sorted(roots): + tfn = os.path.join(r, '.hg', 'thgstatus')   try: - os.remove(os.path.join(r, '.hg', 'thgstatus')) - except OSError: + f = open(tfn, 'rb') + e = f.readline() + f.close() + if not e.startswith('@@noicons'): + os.remove(tfn) + except (IOError, OSError): + print "IOError or OSError while trying to remove %s" % tfn   pass   if notifypaths:   shlib.shell_notify(list(notifypaths))