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.
--- 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]