D10060: build: make version from .hg_archival.txt consistent with that from .hg/

martinvonz (Martin von Zweigbergk) phabricator at mercurial-scm.org
Tue Feb 23 20:43:46 UTC 2021


martinvonz created this revision.
Herald added a reviewer: hg-reviewers.
Herald added a subscriber: mercurial-patches.

REVISION SUMMARY
  D9955 <https://phab.mercurial-scm.org/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.

REPOSITORY
  rHG Mercurial

BRANCH
  default

REVISION DETAIL
  https://phab.mercurial-scm.org/D10060

AFFECTED FILES
  setup.py

CHANGE DETAILS

diff --git a/setup.py b/setup.py
--- a/setup.py
+++ b/setup.py
@@ -431,10 +431,10 @@
     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]
 



To: martinvonz, #hg-reviewers
Cc: mercurial-patches, mercurial-devel


More information about the Mercurial-devel mailing list