[PATCH 2 of 4] setup: append also the date if we are on a tag with an unclean work tree

Gilles Moris gilles.moris at free.fr
Fri Oct 9 11:49:32 UTC 2009


 setup.py |  4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)


# HG changeset patch
# User Gilles Moris <gilles.moris at free.fr>
# Date 1249974243 -7200
# Node ID 9bbf0fe10f5f72c6edbd0f645fdd45579d9f1736
# Parent  886ffe57527e8ebc68b896061385eb36ce14d5bc
setup: append also the date if we are on a tag with an unclean work tree

diff --git a/setup.py b/setup.py
--- a/setup.py
+++ b/setup.py
@@ -133,6 +133,10 @@
             l.pop()
         if l:
             version = l[-1] # latest tag or revision number
+            if l[0].endswith('+') and len(l) > 1:
+                # for an unclean working directory based on a tag, we also
+                # need a '+'
+                version += '+'
             if version.endswith('+'):
                 version += time.strftime('%Y%m%d')
 elif os.path.exists('.hg_archival.txt'):



More information about the Mercurial-devel mailing list