diff extensions/kwarchive.py @ 338:038cca685729

Add a short representation of the repo id with name "HGshortrepoid"
author Franz Glasner <hg@dom66.de>
date Wed, 31 Jul 2019 13:39:58 +0200
parents cd42b8578901
children a69c89c18546
line wrap: on
line diff
--- a/extensions/kwarchive.py	Wed Jul 17 09:03:18 2019 +0200
+++ b/extensions/kwarchive.py	Wed Jul 31 13:39:58 2019 +0200
@@ -742,6 +742,7 @@
         latesttags = templatekw.getlatesttags(ctx.repo(), ctx, {})
     keywords = {
         b"HGrepoid": ctx.repo()[ctx.repo().lookup(b'0')].hex(),   # repo id
+        b"HGshortrepoid": templatefilters.short(ctx.repo()[ctx.repo().lookup(b'0')].hex()),    # short form of the repo id
         b"HGpath": path_uri,     # XXX FIXME: Should Archive an alias of this
         b"HGbranch": ctx.branch(),
         b"HGtags": b' '.join([tag for tag in ctx.tags() if tag != b"tip"]),