diff options
author | Philip Thiem <ptthiem@gmail.com> | 2013-07-04 10:01:05 -0500 |
---|---|---|
committer | Philip Thiem <ptthiem@gmail.com> | 2013-07-04 10:01:05 -0500 |
commit | 6e9b5f8ca3b25013702055e1ffcec2c9ac074933 (patch) | |
tree | 2b9ee573c454a27092d95a31507b1583e8ef8da3 /setuptools/svn_utils.py | |
parent | a40c11b0e8c045bc5b1f6e83e1014f3d6b94fe66 (diff) | |
download | external_python_setuptools-6e9b5f8ca3b25013702055e1ffcec2c9ac074933.tar.gz external_python_setuptools-6e9b5f8ca3b25013702055e1ffcec2c9ac074933.tar.bz2 external_python_setuptools-6e9b5f8ca3b25013702055e1ffcec2c9ac074933.zip |
If using a command, we can query the working copy version directly.
--HG--
extra : rebase_source : 0990530647692240d7b7126df1e1cdd5ae463ebb
Diffstat (limited to 'setuptools/svn_utils.py')
-rw-r--r-- | setuptools/svn_utils.py | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/setuptools/svn_utils.py b/setuptools/svn_utils.py index c052f671..bbf10da7 100644 --- a/setuptools/svn_utils.py +++ b/setuptools/svn_utils.py @@ -277,6 +277,8 @@ class SVNEntriesCMD(SVNEntries): "Get repository URL"
return self.urlre.search(self.get_dir_data()[0]).group(1)
+ def __get_cached_revision(self):
+ return self.revision
def parse_revision(self):
_, data = _run_command(['svnversion', self.path])
@@ -285,11 +287,12 @@ class SVNEntriesCMD(SVNEntries): log.warn('Parsed!')
try:
#No max needed this command summarizes working copy since 1.0
- return int(parsed.group(2))
+ self.revision = int(parsed.group(2))
+ self.parse_revision = self.__get_cached_revision
+ return self.revision
except ValueError:
#This should only happen if the revision is WAY too big.
pass
- log.warn(repr(data))
return 0
def get_undeleted_records(self):
|