mercurial/dispatch.py
changeset 26262 3e79ec0ba589
parent 26236 2e42517129ca
child 26263 bf2bfc6f45fb
equal deleted inserted replaced
26261:8fb92ff63ccf 26262:3e79ec0ba589
   333         # of date) will be clueful enough to notice the implausible
   333         # of date) will be clueful enough to notice the implausible
   334         # version number and try updating.
   334         # version number and try updating.
   335         compare = myver.split('+')[0]
   335         compare = myver.split('+')[0]
   336         ct = tuplever(compare)
   336         ct = tuplever(compare)
   337         worst = None, ct, ''
   337         worst = None, ct, ''
   338         for name, mod in extensions.extensions():
   338         if True:
   339             testedwith = getattr(mod, 'testedwith', '')
   339             for name, mod in extensions.extensions():
   340             report = getattr(mod, 'buglink', _('the extension author.'))
   340                 testedwith = getattr(mod, 'testedwith', '')
   341             if not testedwith.strip():
   341                 report = getattr(mod, 'buglink', _('the extension author.'))
   342                 # We found an untested extension. It's likely the culprit.
   342                 if not testedwith.strip():
   343                 worst = name, 'unknown', report
   343                     # We found an untested extension. It's likely the culprit.
   344                 break
   344                     worst = name, 'unknown', report
   345 
   345                     break
   346             # Never blame on extensions bundled with Mercurial.
   346 
   347             if testedwith == 'internal':
   347                 # Never blame on extensions bundled with Mercurial.
   348                 continue
   348                 if testedwith == 'internal':
   349 
   349                     continue
   350             tested = [tuplever(t) for t in testedwith.split()]
   350 
   351             if ct in tested:
   351                 tested = [tuplever(t) for t in testedwith.split()]
   352                 continue
   352                 if ct in tested:
   353 
   353                     continue
   354             lower = [t for t in tested if t < ct]
   354 
   355             nearest = max(lower or tested)
   355                 lower = [t for t in tested if t < ct]
   356             if worst[0] is None or nearest < worst[1]:
   356                 nearest = max(lower or tested)
   357                 worst = name, nearest, report
   357                 if worst[0] is None or nearest < worst[1]:
       
   358                     worst = name, nearest, report
   358         if worst[0] is not None:
   359         if worst[0] is not None:
   359             name, testedwith, report = worst
   360             name, testedwith, report = worst
   360             if not isinstance(testedwith, str):
   361             if not isinstance(testedwith, str):
   361                 testedwith = '.'.join([str(c) for c in testedwith])
   362                 testedwith = '.'.join([str(c) for c in testedwith])
   362             warning = (_('** Unknown exception encountered with '
   363             warning = (_('** Unknown exception encountered with '