You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@subversion.apache.org by ne...@apache.org on 2012/11/15 17:49:55 UTC
svn commit: r1409879 -
/subversion/trunk/subversion/tests/cmdline/svntest/factory.py
Author: neels
Date: Thu Nov 15 16:49:55 2012
New Revision: 1409879
URL: http://svn.apache.org/viewvc?rev=1409879&view=rev
Log:
* subversion/tests/cmdline/svntest/factory.py: tweak, add abs_wc_dir var.
Modified:
subversion/trunk/subversion/tests/cmdline/svntest/factory.py
Modified: subversion/trunk/subversion/tests/cmdline/svntest/factory.py
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/tests/cmdline/svntest/factory.py?rev=1409879&r1=1409878&r2=1409879&view=diff
==============================================================================
--- subversion/trunk/subversion/tests/cmdline/svntest/factory.py (original)
+++ subversion/trunk/subversion/tests/cmdline/svntest/factory.py Thu Nov 15 16:49:55 2012
@@ -310,6 +310,7 @@ class TestFactory:
# Wether we ever used the variables 'wc_dir' and 'url' (tiny tweak)
self.used_wc_dir = False
+ self.used_abs_wc_dir = False
self.used_url = False
# The alternate working copy directories created that need to be
@@ -350,6 +351,8 @@ class TestFactory:
# main wc_dir and url
if self.used_wc_dir:
init += 'wc_dir = sbox.wc_dir\n'
+ if self.used_abs_wc_dir:
+ init += 'abs_wc_dir = os.path.abspath(sbox.wc_dir)\n'
if self.used_url:
init += 'url = sbox.repo_url\n'
@@ -447,7 +450,8 @@ class TestFactory:
return self.cmd_svn_checkout(args[2:])
if second in ['propset','pset','ps']:
- return self.cmd_svn(args[1:], False,
+ multiline_args = [arg.replace(r'\n', '\n') for arg in args[1:]]
+ return self.cmd_svn(multiline_args, False,
self.keep_args_of, 3)
if second in ['delete','del','remove', 'rm']:
@@ -1115,7 +1119,7 @@ class TestFactory:
if not runpath:
continue
strlen = len(runpath)
- item = [strlen, name, runpath]
+ item = (strlen, name, runpath)
bisect.insort(lst, item)
return lst
@@ -1128,14 +1132,14 @@ class TestFactory:
urls = []
for name in self.vars:
if name.startswith('url_'):
- bisect.insort(urls, [name.lower(), name])
+ bisect.insort(urls, (name.lower(), name))
else:
- bisect.insort(paths, [name.lower(), name])
+ bisect.insort(paths, (name.lower(), name))
list = []
for path in paths:
- list += [path[1]]
+ list.append(path[1])
for url in urls:
- list += [url[1]]
+ list.append(url[1])
return list
@@ -1168,8 +1172,20 @@ class TestFactory:
path = var[2]
str = replace(str, path, name, quote)
- str = replace(str, self.sbox.wc_dir, 'wc_dir', quote)
- str = replace(str, self.sbox.repo_url, 'url', quote)
+ str2 = replace(str, os.path.abspath(self.sbox.wc_dir), 'abs_wc_dir', quote)
+ if str != str2:
+ self.used_abs_wc_dir = True
+ str = str2
+
+ str2 = replace(str, self.sbox.wc_dir, 'wc_dir', quote)
+ if str != str2:
+ self.used_wc_dir = True
+ str = str2
+
+ str2 = replace(str, self.sbox.repo_url, 'url', quote)
+ if str != str2:
+ self.used_url = True
+ str = str2
# now remove trailing null-str adds:
# '' + url_A_C + ''
@@ -1615,6 +1631,7 @@ class TestFactory:
# special case: if a path is '.', simply use wc_dir.
if pathelements == ['.']:
+ self.used_wc_dir = True
return wc.py, wc.realpath
name = "_".join(pathelements)