aboutsummaryrefslogtreecommitdiffstats
path: root/setuptools/svn_utils.py
diff options
context:
space:
mode:
authorPhilip Thiem <ptthiem@gmail.com>2013-11-11 17:07:52 -0600
committerPhilip Thiem <ptthiem@gmail.com>2013-11-11 17:07:52 -0600
commit76423012b5b51691dd059b1276351099e52c787e (patch)
tree85d004d9b7f0c838a52597546869cc5185f5f4a0 /setuptools/svn_utils.py
parentba9d35158fe8f4af6a2b19e84a2eaca718a93e03 (diff)
downloadexternal_python_setuptools-76423012b5b51691dd059b1276351099e52c787e.tar.gz
external_python_setuptools-76423012b5b51691dd059b1276351099e52c787e.tar.bz2
external_python_setuptools-76423012b5b51691dd059b1276351099e52c787e.zip
For .svn legacy fallback, look for the files in the .svn not the directory.
(Fixed unexpected deprecation warning from prombredanne) Also removed the warning from fallback, only a deprecation warning is issued. Environment.py whitespacing Created a specialized command executor for tests in Environment.py Legacy Test in test_egg_info now supresses the deprecation warning. PythonPath is now explicitly controlled to allow setup.py test on clean python installations. *Fixes Issue #101* Moved some dummy svn tests from test_sdist to test_egg_info since they are egg_info tests. Downgraded a with statement in a test since we haven't offically dropped 2.4 support, however, maybe it is time. Added a test case to ensure no extranuous output on sdist with a simple dummy package without rev ctrl.
Diffstat (limited to 'setuptools/svn_utils.py')
-rw-r--r--setuptools/svn_utils.py9
1 files changed, 7 insertions, 2 deletions
diff --git a/setuptools/svn_utils.py b/setuptools/svn_utils.py
index 6ac31a24..224d11ea 100644
--- a/setuptools/svn_utils.py
+++ b/setuptools/svn_utils.py
@@ -219,7 +219,13 @@ class SvnInfo(object):
def load(cls, dirname=''):
normdir = os.path.normpath(dirname)
code, data = _run_command(['svn', 'info', normdir])
- has_svn = os.path.isdir(os.path.join(normdir, '.svn'))
+ # Must check for some contents, as some use empty directories
+ # in testcases
+ svn_dir = os.path.join(normdir, '.svn')
+ has_svn = (os.path.isfile(os.path.join(svn_dir, 'entries')) or
+ os.path.isfile(os.path.join(svn_dir, 'dir-props')) or
+ os.path.isfile(os.path.join(svn_dir, 'dir-prop-base')))
+
svn_version = tuple(cls.get_svn_version().split('.'))
try:
@@ -229,7 +235,6 @@ class SvnInfo(object):
if has_svn and (code or not base_svn_version
or base_svn_version < (1, 3)):
- log.warn('Fallback onto .svn parsing')
warnings.warn(("No SVN 1.3+ command found: falling back "
"on pre 1.7 .svn parsing"), DeprecationWarning)
return SvnFileInfo(dirname)