changeset 46573:359bdd8fc60a

build: make version from .hg_archival.txt consistent with that from .hg/ D9955 changed the version format to replace "-" by "." and to add "hg" before the number representing the distance from the latest tag. However, it missed the "hg" string and added an extra "." to the version string we produce when there's a `.hg_archival.txt`. This patch makes it consistent. Differential Revision: https://phab.mercurial-scm.org/D10060
author Martin von Zweigbergk <martinvonz@google.com>
date Tue, 23 Feb 2021 12:26:52 -0800
parents c82d6363bc9e
children e3f23814bac7
files setup.py
diffstat 1 files changed, 3 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/setup.py	Thu Feb 11 11:22:53 2021 -0800
+++ b/setup.py	Tue Feb 23 12:26:52 2021 -0800
@@ -431,12 +431,12 @@
     elif 'latesttag' in kw:
         if 'changessincelatesttag' in kw:
             version = (
-                '%(latesttag)s+.%(changessincelatesttag)s.%(node).12s' % kw
+                '%(latesttag)s+hg%(changessincelatesttag)s.%(node).12s' % kw
             )
         else:
-            version = '%(latesttag)s+.%(latesttagdistance)s.%(node).12s' % kw
+            version = '%(latesttag)s+hg%(latesttagdistance)s.%(node).12s' % kw
     else:
-        version = '0+' + kw.get('node', '')[:12]
+        version = '0+hg' + kw.get('node', '')[:12]
 
 if version:
     versionb = version