Show More
@@ -283,8 +283,15 def _runcatch(req): | |||
|
283 | 283 | # We found an untested extension. It's likely the culprit. |
|
284 | 284 | worst = name, 'unknown', report |
|
285 | 285 | break |
|
286 | if compare not in testedwith.split() and testedwith != 'internal': | |
|
287 | tested = [tuplever(v) for v in testedwith.split()] | |
|
286 | ||
|
287 | # Never blame on extensions bundled with Mercurial. | |
|
288 | if testedwith == 'internal': | |
|
289 | continue | |
|
290 | ||
|
291 | tested = [tuplever(t) for t in testedwith.split()] | |
|
292 | if ct in tested: | |
|
293 | continue | |
|
294 | ||
|
288 | 295 |
|
|
289 | 296 |
|
|
290 | 297 |
|
@@ -315,7 +322,10 def _runcatch(req): | |||
|
315 | 322 | |
|
316 | 323 | def tuplever(v): |
|
317 | 324 | try: |
|
318 | return tuple([int(i) for i in v.split('.')]) | |
|
325 | # Assertion: tuplever is only used for extension compatibility | |
|
326 | # checking. Otherwise, the discarding of extra version fields is | |
|
327 | # incorrect. | |
|
328 | return tuple([int(i) for i in v.split('.')[0:2]]) | |
|
319 | 329 | except ValueError: |
|
320 | 330 | return tuple() |
|
321 | 331 |
@@ -858,7 +858,7 Broken disabled extension and command: | |||
|
858 | 858 | [255] |
|
859 | 859 | |
|
860 | 860 | $ cat > throw.py <<EOF |
|
861 | > from mercurial import cmdutil, commands | |
|
861 | > from mercurial import cmdutil, commands, util | |
|
862 | 862 | > cmdtable = {} |
|
863 | 863 | > command = cmdutil.command(cmdtable) |
|
864 | 864 | > class Bogon(Exception): pass |
@@ -910,7 +910,7 If the extensions declare outdated versi | |||
|
910 | 910 | $ hg --config extensions.throw=throw.py --config extensions.older=older.py \ |
|
911 | 911 | > throw 2>&1 | egrep '^\*\*' |
|
912 | 912 | ** Unknown exception encountered with possibly-broken third-party extension older |
|
913 |
** which supports versions 1.9 |
|
|
913 | ** which supports versions 1.9 of Mercurial. | |
|
914 | 914 | ** Please disable older and try your action again. |
|
915 | 915 | ** If that fixes the bug please report it to the extension author. |
|
916 | 916 | ** Python * (glob) |
@@ -923,7 +923,7 One extension only tested with older, on | |||
|
923 | 923 | $ hg --config extensions.throw=throw.py --config extensions.older=older.py \ |
|
924 | 924 | > throw 2>&1 | egrep '^\*\*' |
|
925 | 925 | ** Unknown exception encountered with possibly-broken third-party extension older |
|
926 |
** which supports versions 1.9 |
|
|
926 | ** which supports versions 1.9 of Mercurial. | |
|
927 | 927 | ** Please disable older and try your action again. |
|
928 | 928 | ** If that fixes the bug please report it to the extension author. |
|
929 | 929 | ** Python * (glob) |
@@ -936,7 +936,7 Older extension is tested with current v | |||
|
936 | 936 | $ hg --config extensions.throw=throw.py --config extensions.older=older.py \ |
|
937 | 937 | > throw 2>&1 | egrep '^\*\*' |
|
938 | 938 | ** Unknown exception encountered with possibly-broken third-party extension throw |
|
939 |
** which supports versions 2.1 |
|
|
939 | ** which supports versions 2.1 of Mercurial. | |
|
940 | 940 | ** Please disable throw and try your action again. |
|
941 | 941 | ** If that fixes the bug please report it to http://example.com/bts |
|
942 | 942 | ** Python * (glob) |
@@ -954,6 +954,17 Declare the version as supporting this h | |||
|
954 | 954 | ** Mercurial Distributed SCM (*) (glob) |
|
955 | 955 | ** Extensions loaded: throw |
|
956 | 956 | |
|
957 | Patch version is ignored during compatibility check | |
|
958 | $ echo "testedwith = '3.2'" >> throw.py | |
|
959 | $ echo "util.version = lambda:'3.2.2'" >> throw.py | |
|
960 | $ rm -f throw.pyc throw.pyo | |
|
961 | $ hg --config extensions.throw=throw.py throw 2>&1 | egrep '^\*\*' | |
|
962 | ** unknown exception encountered, please report by visiting | |
|
963 | ** http://mercurial.selenic.com/wiki/BugTracker | |
|
964 | ** Python * (glob) | |
|
965 | ** Mercurial Distributed SCM (*) (glob) | |
|
966 | ** Extensions loaded: throw | |
|
967 | ||
|
957 | 968 | Test version number support in 'hg version': |
|
958 | 969 | $ echo '__version__ = (1, 2, 3)' >> throw.py |
|
959 | 970 | $ rm -f throw.pyc throw.pyo |
General Comments 0
You need to be logged in to leave comments.
Login now