[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 Oct 6 08:18:30 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 bbaf3c703c77f2756c27a8b39a3824be9a13ccc4
# Parent f1911eaffbb0f31d87250163074c920cf6b0bd3e
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