Kiln » TortoiseHg » TortoiseHg
Clone URL:  
Pushed to one repository · View In Graph Contained in 2.0, 2.0.1, and 2.0.2

stable repotreemodel: fix exception occured by adding non-repo directory from reporeg

Changeset 45edabd12add

Parent 405a4093a5f9

by Yuya Nishihara

Changes to one file · Browse files at 45edabd12add Showing diff from parent 405a4093a5f9 Diff from another changeset...

 
7
8
9
10
 
11
12
13
 
213
214
215
216
 
 
 
 
 
217
218
219
 
7
8
9
 
10
11
12
13
 
213
214
215
 
216
217
218
219
220
221
222
223
@@ -7,7 +7,7 @@
   from mercurial import error   -from tortoisehg.hgqt import thgrepo +from tortoisehg.hgqt import thgrepo, qtlib  from tortoisehg.util import hglib  from tortoisehg.hgqt.i18n import _   @@ -213,7 +213,11 @@
  lpath = hglib.fromunicode(path)   repo = thgrepo.repository(None, path=lpath)   except error.RepoError: - QMessageBox.warning(self, _('Failed to add repository'), + # NOTE: here we cannot pass parent=self because self + # isn't a QWidget. Codes under `if not repo:` should + # be handled by a widget, not by a model. + qtlib.WarningMsgBox( + _('Failed to add repository'),   _('%s is not a valid repository') % path)   return   else: