Mercurial > hgrepos > DevTools > mercurial-extensions
diff extensions/kwarchive.py @ 322:950a9bd55d7e
Expand "HGrepoid" as Mercurial's repository id (id of the first commit)
| author | Franz Glasner <fzglas.hg@dom66.de> |
|---|---|
| date | Wed, 20 Feb 2019 23:59:31 +0100 |
| parents | 103df4b7a0c8 |
| children | 26e617693ae8 |
line wrap: on
line diff
--- a/extensions/kwarchive.py Wed Feb 20 23:09:10 2019 +0100 +++ b/extensions/kwarchive.py Wed Feb 20 23:59:31 2019 +0100 @@ -538,7 +538,7 @@ # not whitelisted -> ignore kwds = [] else: - # Empty keyword_substitutions mean: expand built-in keywords + # Empty keyword_substitutions mean: expand built-in keywords kwds = [kw] for kw in kwds: if matcher_rcs(rel_name_in_subrepo): @@ -744,6 +744,7 @@ else: latesttags = templatekw.getlatesttags(ctx.repo(), ctx, {}) keywords = { + "HGrepoid": ctx.repo()[ctx.repo().lookup('0')].hex(), # repo id "HGpath": path_uri, # XXX FIXME: Should Archive an alias of this "HGbranch": ctx.branch(), "HGtags": " ".join([tag for tag in ctx.tags() if tag != "tip"]),
