changeset 23646:9641643fac71

setup: use changessincelatesttag from archive if present changessincelatesttag gives one a better idea of how much the code has changed since. Since changessincelatesttag is always greater than or equal to the latesttagdistance (see previous patch for why), this will always produce version numbers greater than or equal to the previous scheme.
author Siddharth Agarwal <sid0@fb.com>
date Fri, 12 Dec 2014 15:29:39 -0800
parents 242d11819c6c
children eb55e09202c8
files setup.py
diffstat 1 files changed, 4 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/setup.py	Fri Dec 12 15:27:13 2014 -0800
+++ b/setup.py	Fri Dec 12 15:29:39 2014 -0800
@@ -207,7 +207,10 @@
     if 'tag' in kw:
         version =  kw['tag']
     elif 'latesttag' in kw:
-        version = '%(latesttag)s+%(latesttagdistance)s-%(node).12s' % kw
+        if 'changessincelatesttag' in kw:
+            version = '%(latesttag)s+%(changessincelatesttag)s-%(node).12s' % kw
+        else:
+            version = '%(latesttag)s+%(latesttagdistance)s-%(node).12s' % kw
     else:
         version = kw.get('node', '')[:12]