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

reporegistry: remove warning message (invalid repos/subrepos) on startup

Instead we mark with a warning icon any repo or subrepo that contains an invalid
subrepo.

Changeset ab62db229f1e

Parent 9add2d4511ce

by Angel Ezquerra

Changes to 2 files · Browse files at ab62db229f1e Showing diff from parent 9add2d4511ce Diff from another changeset...

 
234
235
236
237
 
238
239
240
 
247
248
249
250
251
 
 
 
 
 
252
253
254
 
234
235
236
 
237
238
239
240
 
247
248
249
 
 
250
251
252
253
254
255
256
257
@@ -234,7 +234,7 @@
  subtype = wctx.substate[subpath][2]   sriIsValid = os.path.isdir(abssubpath)   sri = SubrepoItem(abssubpath, subtype=subtype) - sri._valid = False + sri._valid = sriIsValid   self.appendChild(sri)     if not sriIsValid: @@ -247,8 +247,11 @@
  if subtype == 'hg':   # Only recurse into mercurial subrepos   sctx = wctx.sub(subpath) - invalidRepoList += \ - sri.appendSubrepos(sctx._repo) + invalidSubrepoList = sri.appendSubrepos(sctx._repo) + if invalidSubrepoList: + self._valid = False + invalidRepoList += invalidSubrepoList +   except (EnvironmentError, error.RepoError, util.Abort), e:   # Add the repo to the list of repos/subrepos   # that could not be open
 
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
 
299
300
301
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
@@ -299,23 +299,3 @@
  or not paths.netdrive_status(c.rootpath()):     invalidRepoList = c.appendSubrepos() - - if invalidRepoList: - # The top repo or some of its subrepos could not be loaded - warningmsg += "<li>" + c.rootpath() - if invalidRepoList[0] == c.rootpath(): - invalidRepoList = invalidRepoList[1:] - if invalidRepoList: - warningmsg += "<ul><li>" - warningmsg += "<li>".join(invalidRepoList) - warningmsg += "</ul>" - - # If some repos or subrepos could not be loaded, show a warning message - if warningmsg: - warningmsg = _('Some repos could not be fully loaded:') + \ - "<ul>" + warningmsg + '</ul>' - QTimer.singleShot(0, \ - lambda: qtlib.WarningMsgBox( - _('Missing or invalid repos or subrepos ' - 'on the repository registry'), - warningmsg))