Show More
@@ -1307,12 +1307,22 def _exceptionwarning(ui): | |||||
1307 | + b'\n' |
|
1307 | + b'\n' | |
1308 | ) |
|
1308 | ) | |
1309 | sysversion = pycompat.sysbytes(sys.version).replace(b'\n', b'') |
|
1309 | sysversion = pycompat.sysbytes(sys.version).replace(b'\n', b'') | |
|
1310 | ||||
|
1311 | def ext_with_ver(x): | |||
|
1312 | ext = x[0] | |||
|
1313 | ver = extensions.moduleversion(x[1]) | |||
|
1314 | if ver: | |||
|
1315 | ext += b' ' + ver | |||
|
1316 | return ext | |||
|
1317 | ||||
1310 | warning += ( |
|
1318 | warning += ( | |
1311 | (_(b"** Python %s\n") % sysversion) |
|
1319 | (_(b"** Python %s\n") % sysversion) | |
1312 | + (_(b"** Mercurial Distributed SCM (version %s)\n") % util.version()) |
|
1320 | + (_(b"** Mercurial Distributed SCM (version %s)\n") % util.version()) | |
1313 | + ( |
|
1321 | + ( | |
1314 | _(b"** Extensions loaded: %s\n") |
|
1322 | _(b"** Extensions loaded: %s\n") | |
1315 | % b", ".join([x[0] for x in sorted(extensions.extensions())]) |
|
1323 | % b", ".join( | |
|
1324 | [ext_with_ver(x) for x in sorted(extensions.extensions())] | |||
|
1325 | ) | |||
1316 | ) |
|
1326 | ) | |
1317 | ) |
|
1327 | ) | |
1318 | return warning |
|
1328 | return warning |
@@ -1421,7 +1421,7 No declared supported version, extension | |||||
1421 | ** If that fixes the bug please report it to the extension author. |
|
1421 | ** If that fixes the bug please report it to the extension author. | |
1422 | ** Python * (glob) |
|
1422 | ** Python * (glob) | |
1423 | ** Mercurial Distributed SCM * (glob) |
|
1423 | ** Mercurial Distributed SCM * (glob) | |
1424 | ** Extensions loaded: throw |
|
1424 | ** Extensions loaded: throw 1.0.0 | |
1425 |
|
1425 | |||
1426 | empty declaration of supported version, extension complains (but doesn't choke if |
|
1426 | empty declaration of supported version, extension complains (but doesn't choke if | |
1427 | the value is improperly a str instead of bytes): |
|
1427 | the value is improperly a str instead of bytes): | |
@@ -1433,7 +1433,7 the value is improperly a str instead of | |||||
1433 | ** If that fixes the bug please report it to the extension author. |
|
1433 | ** If that fixes the bug please report it to the extension author. | |
1434 | ** Python * (glob) |
|
1434 | ** Python * (glob) | |
1435 | ** Mercurial Distributed SCM (*) (glob) |
|
1435 | ** Mercurial Distributed SCM (*) (glob) | |
1436 | ** Extensions loaded: throw |
|
1436 | ** Extensions loaded: throw 1.0.0 | |
1437 |
|
1437 | |||
1438 | If the extension specifies a buglink, show that (but don't choke if the value is |
|
1438 | If the extension specifies a buglink, show that (but don't choke if the value is | |
1439 | improperly a str instead of bytes): |
|
1439 | improperly a str instead of bytes): | |
@@ -1447,7 +1447,7 improperly a str instead of bytes): | |||||
1447 | ** If that fixes the bug please report it to http://example.com/bts |
|
1447 | ** If that fixes the bug please report it to http://example.com/bts | |
1448 | ** Python * (glob) |
|
1448 | ** Python * (glob) | |
1449 | ** Mercurial Distributed SCM (*) (glob) |
|
1449 | ** Mercurial Distributed SCM (*) (glob) | |
1450 | ** Extensions loaded: throw |
|
1450 | ** Extensions loaded: throw 1.0.0 | |
1451 |
|
1451 | |||
1452 | If the extensions declare outdated versions, accuse the older extension first: |
|
1452 | If the extensions declare outdated versions, accuse the older extension first: | |
1453 | $ echo "from mercurial import util" >> older.py |
|
1453 | $ echo "from mercurial import util" >> older.py | |
@@ -1464,7 +1464,7 If the extensions declare outdated versi | |||||
1464 | ** If that fixes the bug please report it to the extension author. |
|
1464 | ** If that fixes the bug please report it to the extension author. | |
1465 | ** Python * (glob) |
|
1465 | ** Python * (glob) | |
1466 | ** Mercurial Distributed SCM (version 2.2) |
|
1466 | ** Mercurial Distributed SCM (version 2.2) | |
1467 | ** Extensions loaded: older, throw |
|
1467 | ** Extensions loaded: older, throw 1.0.0 | |
1468 |
|
1468 | |||
1469 | One extension only tested with older, one only with newer versions: |
|
1469 | One extension only tested with older, one only with newer versions: | |
1470 | $ echo "util.version = lambda:b'2.1'" >> older.py |
|
1470 | $ echo "util.version = lambda:b'2.1'" >> older.py | |
@@ -1478,7 +1478,7 One extension only tested with older, on | |||||
1478 | ** If that fixes the bug please report it to the extension author. |
|
1478 | ** If that fixes the bug please report it to the extension author. | |
1479 | ** Python * (glob) |
|
1479 | ** Python * (glob) | |
1480 | ** Mercurial Distributed SCM (version 2.1) |
|
1480 | ** Mercurial Distributed SCM (version 2.1) | |
1481 | ** Extensions loaded: older, throw |
|
1481 | ** Extensions loaded: older, throw 1.0.0 | |
1482 |
|
1482 | |||
1483 | Older extension is tested with current version, the other only with newer: |
|
1483 | Older extension is tested with current version, the other only with newer: | |
1484 | $ echo "util.version = lambda:b'1.9.3'" >> older.py |
|
1484 | $ echo "util.version = lambda:b'1.9.3'" >> older.py | |
@@ -1492,7 +1492,7 Older extension is tested with current v | |||||
1492 | ** If that fixes the bug please report it to http://example.com/bts |
|
1492 | ** If that fixes the bug please report it to http://example.com/bts | |
1493 | ** Python * (glob) |
|
1493 | ** Python * (glob) | |
1494 | ** Mercurial Distributed SCM (version 1.9.3) |
|
1494 | ** Mercurial Distributed SCM (version 1.9.3) | |
1495 | ** Extensions loaded: older, throw |
|
1495 | ** Extensions loaded: older, throw 1.0.0 | |
1496 |
|
1496 | |||
1497 | Ability to point to a different point |
|
1497 | Ability to point to a different point | |
1498 | $ hg --config extensions.throw=throw.py --config extensions.older=older.py \ |
|
1498 | $ hg --config extensions.throw=throw.py --config extensions.older=older.py \ | |
@@ -1501,7 +1501,7 Ability to point to a different point | |||||
1501 | ** Your Local Goat Lenders |
|
1501 | ** Your Local Goat Lenders | |
1502 | ** Python * (glob) |
|
1502 | ** Python * (glob) | |
1503 | ** Mercurial Distributed SCM (*) (glob) |
|
1503 | ** Mercurial Distributed SCM (*) (glob) | |
1504 | ** Extensions loaded: older, throw |
|
1504 | ** Extensions loaded: older, throw 1.0.0 | |
1505 |
|
1505 | |||
1506 | Declare the version as supporting this hg version, show regular bts link: |
|
1506 | Declare the version as supporting this hg version, show regular bts link: | |
1507 | $ hgver=`hg debuginstall -T '{hgver}'` |
|
1507 | $ hgver=`hg debuginstall -T '{hgver}'` | |
@@ -1516,7 +1516,7 Declare the version as supporting this h | |||||
1516 | ** https://mercurial-scm.org/wiki/BugTracker |
|
1516 | ** https://mercurial-scm.org/wiki/BugTracker | |
1517 | ** Python * (glob) |
|
1517 | ** Python * (glob) | |
1518 | ** Mercurial Distributed SCM (*) (glob) |
|
1518 | ** Mercurial Distributed SCM (*) (glob) | |
1519 | ** Extensions loaded: throw |
|
1519 | ** Extensions loaded: throw 1.0.0 | |
1520 |
|
1520 | |||
1521 | Patch version is ignored during compatibility check |
|
1521 | Patch version is ignored during compatibility check | |
1522 | $ echo "testedwith = b'3.2'" >> throw.py |
|
1522 | $ echo "testedwith = b'3.2'" >> throw.py | |
@@ -1528,7 +1528,7 Patch version is ignored during compatib | |||||
1528 | ** https://mercurial-scm.org/wiki/BugTracker |
|
1528 | ** https://mercurial-scm.org/wiki/BugTracker | |
1529 | ** Python * (glob) |
|
1529 | ** Python * (glob) | |
1530 | ** Mercurial Distributed SCM (*) (glob) |
|
1530 | ** Mercurial Distributed SCM (*) (glob) | |
1531 | ** Extensions loaded: throw |
|
1531 | ** Extensions loaded: throw 1.0.0 | |
1532 |
|
1532 | |||
1533 | Test version number support in 'hg version': |
|
1533 | Test version number support in 'hg version': | |
1534 | $ echo '__version__ = (1, 2, 3)' >> throw.py |
|
1534 | $ echo '__version__ = (1, 2, 3)' >> throw.py |
General Comments 0
You need to be logged in to leave comments.
Login now