Kiln » TortoiseHg » TortoiseHg
Clone URL:  
Pushed to one repository · View In Graph Contained in tip

stable chunks: catch environment errors from os.unlink (closes #1058)

Changeset 10a2c53059cc

Parent 87e4641a2642

by Steve Borho

Changes to one file · Browse files at 10a2c53059cc Showing diff from parent 87e4641a2642 Diff from another changeset...

 
387
388
389
390
 
 
 
 
 
 
 
391
392
393
 
387
388
389
 
390
391
392
393
394
395
396
397
398
399
@@ -387,7 +387,13 @@
  commands.revert(repo.ui, repo, repo.wjoin(wfile), rev='.',   no_backup=True)   if wasadded: - os.unlink(repo.wjoin(wfile)) + try: + os.unlink(repo.wjoin(wfile)) + except EnvironmentError: + qtlib.InfoMsgBox(_("Unable to remove"), + _("Unable to remove added file %s,\n" + "permission denied") % + hglib.tounicode(wfile))   self.fileModified.emit()     def getChunksForFile(self, wfile):