[PATCH 2 of 2] setup: retrieve tag from .hg_archival.txt

Gilles Moris gilles.moris at free.fr
Fri Aug 7 03:00:09 CDT 2009


 setup.py |  5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)


# HG changeset patch
# User Gilles Moris <gilles.moris at free.fr>
# Date 1249632003 -7200
# Node ID 75dab79e63bc781284331c3e1997643b3bd98f16
# Parent  df6273f8f6268cba0124761e5b659eb06e5a6dcf
setup: retrieve tag from .hg_archival.txt

diff --git a/setup.py b/setup.py
--- a/setup.py
+++ b/setup.py
@@ -139,8 +139,9 @@
     hgarchival = open('.hg_archival.txt')
     for line in hgarchival:
         if line.startswith('node:'):
-            version = line.split(':')[1].strip()[:12]
-            break
+            version = line.split(' ')[1].strip()[:12]
+        if line.startswith('tags:'):
+            version = line.split(' ')[1].strip()
 
 if version:
     f = open("mercurial/__version__.py", "w")


More information about the Mercurial-devel mailing list