[PATCH 3 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
Tue Aug 11 08:08:13 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 b5174f4fd0c766fa5a1f898b49c67c11271dfb61
# Parent 976e9da9ae80a86f2f7d0e64858d9a84c078b699
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