aboutsummaryrefslogtreecommitdiffstats
path: root/setuptools/command/egg_info.py
diff options
context:
space:
mode:
authorPhilip Thiem <ptthiem@gmail.com>2014-04-16 18:26:58 -0500
committerPhilip Thiem <ptthiem@gmail.com>2014-04-16 18:26:58 -0500
commit5208cd6fc27e0459e251a967f432c77556d2bf40 (patch)
treeb30ae3fc99e9a4c1a72e1fef28506a078df830cc /setuptools/command/egg_info.py
parent1fe3013bb336d8e76a6e1a816550197157207963 (diff)
downloadexternal_python_setuptools-5208cd6fc27e0459e251a967f432c77556d2bf40.tar.gz
external_python_setuptools-5208cd6fc27e0459e251a967f432c77556d2bf40.tar.bz2
external_python_setuptools-5208cd6fc27e0459e251a967f432c77556d2bf40.zip
Applied Patch from cazabon to handle svn tag revisions
--HG-- branch : develop extra : rebase_source : 571dac8142fc43b54bcd0302598766b0bb9e13ff
Diffstat (limited to 'setuptools/command/egg_info.py')
-rwxr-xr-xsetuptools/command/egg_info.py7
1 files changed, 4 insertions, 3 deletions
diff --git a/setuptools/command/egg_info.py b/setuptools/command/egg_info.py
index 9019524d..6bb2ead9 100755
--- a/setuptools/command/egg_info.py
+++ b/setuptools/command/egg_info.py
@@ -168,9 +168,10 @@ class egg_info(Command):
version = ''
if self.tag_build:
version+=self.tag_build
- if self.tag_svn_revision and (
- os.path.exists('.svn') or os.path.exists('PKG-INFO')
- ): version += '-r%s' % self.get_svn_revision()
+ if self.tag_svn_revision:
+ rev = self.get_svn_revision()
+ if rev: # is 0 if it's not an svn working copy
+ version += '-r%s' % rev
if self.tag_date:
import time
version += time.strftime("-%Y%m%d")