You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@subversion.apache.org by br...@apache.org on 2018/11/06 07:32:06 UTC
svn commit: r1845872 -
/subversion/trunk/subversion/tests/cmdline/svntest/actions.py
Author: brane
Date: Tue Nov 6 07:32:06 2018
New Revision: 1845872
URL: http://svn.apache.org/viewvc?rev=1845872&view=rev
Log:
Tests should be able to use the trojan-tree virgunal state.
* subversion/tests/cmdline/svntest/actions.py
(get_virginal_state): Add parameter 'tree' which defaults to 'greek'.
Modified:
subversion/trunk/subversion/tests/cmdline/svntest/actions.py
Modified: subversion/trunk/subversion/tests/cmdline/svntest/actions.py
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/tests/cmdline/svntest/actions.py?rev=1845872&r1=1845871&r2=1845872&view=diff
==============================================================================
--- subversion/trunk/subversion/tests/cmdline/svntest/actions.py (original)
+++ subversion/trunk/subversion/tests/cmdline/svntest/actions.py Tue Nov 6 07:32:06 2018
@@ -2033,14 +2033,21 @@ def duplicate_dir(wc_name, wc_copy_name)
-def get_virginal_state(wc_dir, rev):
+def get_virginal_state(wc_dir, rev, tree='greek'):
"Return a virginal greek tree state for a WC and repos at revision REV."
rev = str(rev) ### maybe switch rev to an integer?
# copy the greek tree, shift it to the new wc_dir, insert a root elem,
# then tweak all values
- state = main.greek_state.copy()
+ if tree == 'greek':
+ state = main.greek_state.copy()
+ elif tree == 'trojan':
+ state = main.trojan_state.copy()
+ else:
+ raise ValueError("'tree' must be 'greek' or 'trojan'"
+ " but was '%s'" % str(tree))
+
state.wc_dir = wc_dir
state.desc[''] = wc.StateItem()
state.tweak(contents=None, status=' ', wc_rev=rev)