Show More
@@ -7297,14 +7297,13 b' def version_(ui, **opts):' | |||||
7297 | fn = fm.nested("extensions") |
|
7297 | fn = fm.nested("extensions") | |
7298 | if names: |
|
7298 | if names: | |
7299 | namefmt = " %%-%ds " % max(len(n) for n in names) |
|
7299 | namefmt = " %%-%ds " % max(len(n) for n in names) | |
7300 | if fn: |
|
7300 | places = [_("external"), _("internal")] | |
7301 | places = ["external", "internal"] |
|
|||
7302 | else: |
|
|||
7303 | places = [_("external"), _("internal")] |
|
|||
7304 | for n, v, p in zip(names, vers, isinternals): |
|
7301 | for n, v, p in zip(names, vers, isinternals): | |
7305 | fn.startitem() |
|
7302 | fn.startitem() | |
7306 | fn.condwrite(ui.verbose, "name", namefmt, n) |
|
7303 | fn.condwrite(ui.verbose, "name", namefmt, n) | |
7307 | fn.condwrite(ui.verbose, "place", "%s ", places[p]) |
|
7304 | if ui.verbose: | |
|
7305 | fn.plain("%s " % places[p]) | |||
|
7306 | fn.data(bundled=p) | |||
7308 | fn.condwrite(ui.verbose and v, "ver", "%s", v) |
|
7307 | fn.condwrite(ui.verbose and v, "ver", "%s", v) | |
7309 | if ui.verbose: |
|
7308 | if ui.verbose: | |
7310 | fn.plain("\n") |
|
7309 | fn.plain("\n") |
@@ -1253,15 +1253,15 b' Test JSON output of version:' | |||||
1253 | $ hg version --config extensions.throw=throw.py -Tjson |
|
1253 | $ hg version --config extensions.throw=throw.py -Tjson | |
1254 | [ |
|
1254 | [ | |
1255 | { |
|
1255 | { | |
1256 |
"extensions": [{" |
|
1256 | "extensions": [{"bundled": false, "name": "throw", "ver": "1.twentythree"}], | |
1257 | "ver": "3.2.2" |
|
1257 | "ver": "3.2.2" | |
1258 | } |
|
1258 | } | |
1259 | ] |
|
1259 | ] | |
1260 |
|
1260 | |||
1261 |
$ |
|
1261 | $ hg version --config extensions.strip= -Tjson | |
1262 | [ |
|
1262 | [ | |
1263 | { |
|
1263 | { | |
1264 |
"extensions": [{" |
|
1264 | "extensions": [{"bundled": true, "name": "strip", "ver": null}], | |
1265 | "ver": "*" (glob) |
|
1265 | "ver": "*" (glob) | |
1266 | } |
|
1266 | } | |
1267 | ] |
|
1267 | ] | |
@@ -1269,7 +1269,7 b' Test JSON output of version:' | |||||
1269 | Test template output of version: |
|
1269 | Test template output of version: | |
1270 |
|
1270 | |||
1271 | $ hg version --config extensions.throw=throw.py --config extensions.strip= \ |
|
1271 | $ hg version --config extensions.throw=throw.py --config extensions.strip= \ | |
1272 |
> -T'{extensions % "{name} {pad(ver, 16)} ({ |
|
1272 | > -T'{extensions % "{name} {pad(ver, 16)} ({if(bundled, "internal", "external")})\n"}' | |
1273 | throw 1.twentythree (external) |
|
1273 | throw 1.twentythree (external) | |
1274 | strip (internal) |
|
1274 | strip (internal) | |
1275 |
|
1275 |
General Comments 0
You need to be logged in to leave comments.
Login now