changeset 18225:6a082e72df4e

merge with crew-stable
author Kevin Bullock <kbullock@ringworld.org>
date Fri, 04 Jan 2013 13:03:44 -0600
parents 6d6d0248530b (current diff) 0f9013112eba (diff)
children fe67db018bd7
files
diffstat 3 files changed, 16 insertions(+), 6 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/dispatch.py	Fri Jan 04 19:05:20 2013 +0100
+++ b/mercurial/dispatch.py	Fri Jan 04 13:03:44 2013 -0600
@@ -217,11 +217,11 @@
         ct = tuplever(compare)
         worst = None, ct, ''
         for name, mod in extensions.extensions():
-            testedwith = getattr(mod, 'testedwith', 'unknown')
+            testedwith = getattr(mod, 'testedwith', '')
             report = getattr(mod, 'buglink', _('the extension author.'))
-            if testedwith == 'unknown':
+            if not testedwith.strip():
                 # We found an untested extension. It's likely the culprit.
-                worst = name, testedwith, report
+                worst = name, 'unknown', report
                 break
             if compare not in testedwith.split() and testedwith != 'internal':
                 tested = [tuplever(v) for v in testedwith.split()]
--- a/tests/test-command-template.t	Fri Jan 04 19:05:20 2013 +0100
+++ b/tests/test-command-template.t	Fri Jan 04 13:03:44 2013 -0600
@@ -1346,10 +1346,10 @@
 
   $ hg log --template '{date|age}\n' > /dev/null || exit 1
 
-  >>> from datetime import datetime
+  >>> from datetime import datetime, timedelta
   >>> fp = open('a', 'w')
-  >>> n = datetime.now()
-  >>> fp.write('%d-%d-%d 00:00' % ((n.year + 7), n.month, n.day))
+  >>> n = datetime.now() + timedelta(366 * 7)
+  >>> fp.write('%d-%d-%d 00:00' % (n.year, n.month, n.day))
   >>> fp.close()
   $ hg add a
   $ hg commit -m future -d "`cat a`"
--- a/tests/test-extension.t	Fri Jan 04 19:05:20 2013 +0100
+++ b/tests/test-extension.t	Fri Jan 04 13:03:44 2013 -0600
@@ -498,6 +498,16 @@
   ** Python * (glob)
   ** Mercurial Distributed SCM * (glob)
   ** Extensions loaded: throw
+empty declaration of supported version, extension complains:
+  $ echo "testedwith = ''" >> throw.py
+  $ hg --config extensions.throw=throw.py throw 2>&1 | egrep '^\*\*'
+  ** Unknown exception encountered with possibly-broken third-party extension throw
+  ** which supports versions unknown of Mercurial.
+  ** Please disable throw and try your action again.
+  ** If that fixes the bug please report it to the extension author.
+  ** Python * (glob)
+  ** Mercurial Distributed SCM (*) (glob)
+  ** Extensions loaded: throw
 If the extension specifies a buglink, show that:
   $ echo 'buglink = "http://example.com/bts"' >> throw.py
   $ rm -f throw.pyc throw.pyo