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