[PATCH 2 of 5] 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 22:02: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 7232b55e029dcfaa6d3ef30304a331f79f6a96b1
# Parent 1992f6d6d2c9f11a5633a9bfbdb1b4e397a3d20a
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