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 2012/08/16 12:18:03 UTC
svn commit: r1373783 [45/50] - in /subversion/branches/compressed-pristines:
./ build/ build/ac-macros/ build/generator/ build/generator/templates/
build/win32/ contrib/client-side/emacs/ contrib/client-side/svn-push/
contrib/client-side/svnmerge/ cont...
Modified: subversion/branches/compressed-pristines/subversion/tests/cmdline/merge_tree_conflict_tests.py
URL: http://svn.apache.org/viewvc/subversion/branches/compressed-pristines/subversion/tests/cmdline/merge_tree_conflict_tests.py?rev=1373783&r1=1373782&r2=1373783&view=diff
==============================================================================
--- subversion/branches/compressed-pristines/subversion/tests/cmdline/merge_tree_conflict_tests.py (original)
+++ subversion/branches/compressed-pristines/subversion/tests/cmdline/merge_tree_conflict_tests.py Thu Aug 16 10:17:48 2012
@@ -1738,8 +1738,7 @@ def merge_replace_causes_tree_conflict(s
expected_status.tweak('A', status=' M')
expected_status.tweak('A/D/G/pi', 'A/mu', status='M ', treeconflict='C')
expected_status.tweak('A/D/H', status=' M', treeconflict='C')
- ### A/B/E gets both a property and tree conflict flagged. Is this OK?
- expected_status.tweak('A/B/E', status=' C', treeconflict='C')
+ expected_status.tweak('A/B/E', status=' M', treeconflict='C')
actions.run_and_verify_status(wc_dir, expected_status)
Modified: subversion/branches/compressed-pristines/subversion/tests/cmdline/patch_tests.py
URL: http://svn.apache.org/viewvc/subversion/branches/compressed-pristines/subversion/tests/cmdline/patch_tests.py?rev=1373783&r1=1373782&r2=1373783&view=diff
==============================================================================
--- subversion/branches/compressed-pristines/subversion/tests/cmdline/patch_tests.py (original)
+++ subversion/branches/compressed-pristines/subversion/tests/cmdline/patch_tests.py Thu Aug 16 10:17:48 2012
@@ -64,7 +64,7 @@ def patch(sbox):
wc_dir = sbox.wc_dir
patch_file_path = make_patch_path(sbox)
- mu_path = os.path.join(wc_dir, 'A', 'mu')
+ mu_path = sbox.ospath('A/mu')
mu_contents = [
"Dear internet user,\n",
@@ -194,11 +194,11 @@ def patch(sbox):
]
expected_output = [
- 'U %s\n' % os.path.join(wc_dir, 'A', 'D', 'gamma'),
- 'U %s\n' % os.path.join(wc_dir, 'iota'),
- 'A %s\n' % os.path.join(wc_dir, 'new'),
- 'U %s\n' % os.path.join(wc_dir, 'A', 'mu'),
- 'D %s\n' % os.path.join(wc_dir, 'A', 'B', 'E', 'beta'),
+ 'U %s\n' % sbox.ospath('A/D/gamma'),
+ 'U %s\n' % sbox.ospath('iota'),
+ 'A %s\n' % sbox.ospath('new'),
+ 'U %s\n' % sbox.ospath('A/mu'),
+ 'D %s\n' % sbox.ospath('A/B/E/beta'),
]
expected_disk = svntest.main.greek_state.copy()
@@ -297,8 +297,8 @@ def patch_offset(sbox):
wc_dir = sbox.wc_dir
patch_file_path = make_patch_path(sbox)
- mu_path = os.path.join(wc_dir, 'A', 'mu')
- iota_path = os.path.join(wc_dir, 'iota')
+ mu_path = sbox.ospath('A/mu')
+ iota_path = sbox.ospath('iota')
mu_contents = [
"Dear internet user,\n",
@@ -510,7 +510,7 @@ def patch_chopped_leading_spaces(sbox):
wc_dir = sbox.wc_dir
patch_file_path = make_patch_path(sbox)
- mu_path = os.path.join(wc_dir, 'A', 'mu')
+ mu_path = sbox.ospath('A/mu')
mu_contents = [
"Dear internet user,\n",
@@ -640,11 +640,11 @@ def patch_chopped_leading_spaces(sbox):
]
expected_output = [
- 'U %s\n' % os.path.join(wc_dir, 'A', 'D', 'gamma'),
- 'U %s\n' % os.path.join(wc_dir, 'iota'),
- 'A %s\n' % os.path.join(wc_dir, 'new'),
- 'U %s\n' % os.path.join(wc_dir, 'A', 'mu'),
- 'D %s\n' % os.path.join(wc_dir, 'A', 'B', 'E', 'beta'),
+ 'U %s\n' % sbox.ospath('A/D/gamma'),
+ 'U %s\n' % sbox.ospath('iota'),
+ 'A %s\n' % sbox.ospath('new'),
+ 'U %s\n' % sbox.ospath('A/mu'),
+ 'D %s\n' % sbox.ospath('A/B/E/beta'),
]
expected_disk = svntest.main.greek_state.copy()
@@ -680,7 +680,7 @@ def patch_strip1(sbox):
wc_dir = sbox.wc_dir
patch_file_path = make_patch_path(sbox)
- mu_path = os.path.join(wc_dir, 'A', 'mu')
+ mu_path = sbox.ospath('A/mu')
mu_contents = [
"Dear internet user,\n",
@@ -810,11 +810,11 @@ def patch_strip1(sbox):
]
expected_output = [
- 'U %s\n' % os.path.join(wc_dir, 'A', 'D', 'gamma'),
- 'U %s\n' % os.path.join(wc_dir, 'iota'),
- 'A %s\n' % os.path.join(wc_dir, 'new'),
- 'U %s\n' % os.path.join(wc_dir, 'A', 'mu'),
- 'D %s\n' % os.path.join(wc_dir, 'A', 'B', 'E', 'beta'),
+ 'U %s\n' % sbox.ospath('A/D/gamma'),
+ 'U %s\n' % sbox.ospath('iota'),
+ 'A %s\n' % sbox.ospath('new'),
+ 'U %s\n' % sbox.ospath('A/mu'),
+ 'D %s\n' % sbox.ospath('A/B/E/beta'),
]
expected_disk = svntest.main.greek_state.copy()
@@ -850,8 +850,8 @@ def patch_no_index_line(sbox):
wc_dir = sbox.wc_dir
patch_file_path = make_patch_path(sbox)
- gamma_path = os.path.join(wc_dir, 'A', 'D', 'gamma')
- iota_path = os.path.join(wc_dir, 'iota')
+ gamma_path = sbox.ospath('A/D/gamma')
+ iota_path = sbox.ospath('iota')
gamma_contents = [
"\n",
@@ -906,8 +906,8 @@ def patch_no_index_line(sbox):
"Some more bytes\n",
]
expected_output = [
- 'U %s\n' % os.path.join(wc_dir, 'A', 'D', 'gamma'),
- 'U %s\n' % os.path.join(wc_dir, 'iota'),
+ 'U %s\n' % sbox.ospath('A/D/gamma'),
+ 'U %s\n' % sbox.ospath('iota'),
]
expected_disk = svntest.main.greek_state.copy()
@@ -969,21 +969,21 @@ def patch_add_new_dir(sbox):
"+new\n",
]
- C_path = os.path.join(wc_dir, 'A', 'C')
- E_path = os.path.join(wc_dir, 'A', 'B', 'E')
+ C_path = sbox.ospath('A/C')
+ E_path = sbox.ospath('A/B/E')
svntest.actions.run_and_verify_svn("Deleting C failed", None, [],
'rm', C_path)
svntest.actions.run_and_verify_svn("Deleting E failed", None, [],
'rm', E_path)
svntest.main.file_write(patch_file_path, ''.join(unidiff_patch))
- A_B_E_Y_new_path = os.path.join(wc_dir, 'A', 'B', 'E', 'Y', 'new')
- A_C_new_path = os.path.join(wc_dir, 'A', 'C', 'new')
- A_Z_new_path = os.path.join(wc_dir, 'A', 'Z', 'new')
- expected_output = [
- 'A %s\n' % os.path.join(wc_dir, 'X'),
- 'A %s\n' % os.path.join(wc_dir, 'X', 'Y'),
- 'A %s\n' % os.path.join(wc_dir, 'X', 'Y', 'new'),
+ A_B_E_Y_new_path = sbox.ospath('A/B/E/Y/new')
+ A_C_new_path = sbox.ospath('A/C/new')
+ A_Z_new_path = sbox.ospath('A/Z/new')
+ expected_output = [
+ 'A %s\n' % sbox.ospath('X'),
+ 'A %s\n' % sbox.ospath('X/Y'),
+ 'A %s\n' % sbox.ospath('X/Y/new'),
'Skipped missing target: \'%s\'\n' % A_B_E_Y_new_path,
'Skipped missing target: \'%s\'\n' % A_C_new_path,
'Skipped missing target: \'%s\'\n' % A_Z_new_path,
@@ -1084,22 +1084,22 @@ def patch_remove_empty_dirs(sbox):
svntest.main.file_write(patch_file_path, ''.join(unidiff_patch))
- F_path = os.path.join(wc_dir, 'A', 'B', 'F')
+ F_path = sbox.ospath('A/B/F')
svntest.actions.run_and_verify_svn("Deleting F failed", None, [],
'rm', F_path)
svntest.actions.run_and_verify_svn("Update failed", None, [],
'up', wc_dir)
# We should be able to handle one path beeing missing.
- os.remove(os.path.join(wc_dir, 'A', 'D', 'H', 'chi'))
+ os.remove(sbox.ospath('A/D/H/chi'))
expected_output = [
- 'D %s\n' % os.path.join(wc_dir, 'A', 'D', 'H', 'psi'),
- 'D %s\n' % os.path.join(wc_dir, 'A', 'D', 'H', 'omega'),
- 'D %s\n' % os.path.join(wc_dir, 'A', 'B', 'lambda'),
- 'D %s\n' % os.path.join(wc_dir, 'A', 'B', 'E', 'alpha'),
- 'D %s\n' % os.path.join(wc_dir, 'A', 'B', 'E', 'beta'),
- 'D %s\n' % os.path.join(wc_dir, 'A', 'B'),
+ 'D %s\n' % sbox.ospath('A/D/H/psi'),
+ 'D %s\n' % sbox.ospath('A/D/H/omega'),
+ 'D %s\n' % sbox.ospath('A/B/lambda'),
+ 'D %s\n' % sbox.ospath('A/B/E/alpha'),
+ 'D %s\n' % sbox.ospath('A/B/E/beta'),
+ 'D %s\n' % sbox.ospath('A/B'),
]
expected_disk = svntest.main.greek_state.copy()
@@ -1146,7 +1146,7 @@ def patch_reject(sbox):
# Set gamma contents
gamma_contents = "Hello there! I'm the file 'gamma'.\n"
- gamma_path = os.path.join(wc_dir, 'A', 'D', 'gamma')
+ gamma_path = sbox.ospath('A/D/gamma')
svntest.main.file_write(gamma_path, gamma_contents)
expected_output = svntest.wc.State(wc_dir, {
'A/D/gamma' : Item(verb='Sending'),
@@ -1173,7 +1173,7 @@ def patch_reject(sbox):
svntest.main.file_write(patch_file_path, ''.join(unidiff_patch))
expected_output = [
- 'C %s\n' % os.path.join(wc_dir, 'A', 'D', 'gamma'),
+ 'C %s\n' % sbox.ospath('A/D/gamma'),
'> rejected hunk @@ -1,1 +1,1 @@\n',
'Summary of conflicts:\n',
' Text conflicts: 1\n',
@@ -1216,11 +1216,11 @@ def patch_keywords(sbox):
# Set gamma contents
gamma_contents = "$Rev$\nHello there! I'm the file 'gamma'.\n"
- gamma_path = os.path.join(wc_dir, 'A', 'D', 'gamma')
+ gamma_path = sbox.ospath('A/D/gamma')
svntest.main.file_write(gamma_path, gamma_contents)
# Expand the keyword
svntest.main.run_svn(None, 'propset', 'svn:keywords', 'Rev',
- os.path.join(wc_dir, 'A', 'D', 'gamma'))
+ sbox.ospath('A/D/gamma'))
expected_output = svntest.wc.State(wc_dir, {
'A/D/gamma' : Item(verb='Sending'),
})
@@ -1247,7 +1247,7 @@ def patch_keywords(sbox):
svntest.main.file_write(patch_file_path, ''.join(unidiff_patch))
expected_output = [
- 'U %s\n' % os.path.join(wc_dir, 'A', 'D', 'gamma'),
+ 'U %s\n' % sbox.ospath('A/D/gamma'),
]
expected_disk = svntest.main.greek_state.copy()
@@ -1276,7 +1276,7 @@ def patch_with_fuzz(sbox):
wc_dir = sbox.wc_dir
patch_file_path = make_patch_path(sbox)
- mu_path = os.path.join(wc_dir, 'A', 'mu')
+ mu_path = sbox.ospath('A/mu')
# We have replaced a couple of lines to cause fuzz. Those lines contains
# the word fuzz
@@ -1386,7 +1386,7 @@ def patch_with_fuzz(sbox):
]
expected_output = [
- 'U %s\n' % os.path.join(wc_dir, 'A', 'mu'),
+ 'U %s\n' % sbox.ospath('A/mu'),
'> applied hunk @@ -1,6 +1,7 @@ with fuzz 1\n',
'> applied hunk @@ -7,7 +8,9 @@ with fuzz 2\n',
'> applied hunk @@ -19,6 +20,7 @@ with offset 1 and fuzz 2\n',
@@ -1415,7 +1415,7 @@ def patch_reverse(sbox):
wc_dir = sbox.wc_dir
patch_file_path = make_patch_path(sbox)
- mu_path = os.path.join(wc_dir, 'A', 'mu')
+ mu_path = sbox.ospath('A/mu')
mu_contents = [
"Dear internet user,\n",
@@ -1545,11 +1545,11 @@ def patch_reverse(sbox):
]
expected_output = [
- 'U %s\n' % os.path.join(wc_dir, 'A', 'D', 'gamma'),
- 'U %s\n' % os.path.join(wc_dir, 'iota'),
- 'A %s\n' % os.path.join(wc_dir, 'new'),
- 'U %s\n' % os.path.join(wc_dir, 'A', 'mu'),
- 'D %s\n' % os.path.join(wc_dir, 'A', 'B', 'E', 'beta'),
+ 'U %s\n' % sbox.ospath('A/D/gamma'),
+ 'U %s\n' % sbox.ospath('iota'),
+ 'A %s\n' % sbox.ospath('new'),
+ 'U %s\n' % sbox.ospath('A/mu'),
+ 'D %s\n' % sbox.ospath('A/B/E/beta'),
]
expected_disk = svntest.main.greek_state.copy()
@@ -1585,7 +1585,7 @@ def patch_no_svn_eol_style(sbox):
wc_dir = sbox.wc_dir
patch_file_path = make_patch_path(sbox)
- mu_path = os.path.join(wc_dir, 'A', 'mu')
+ mu_path = sbox.ospath('A/mu')
if os.name == 'nt':
crlf = '\n'
@@ -1658,7 +1658,7 @@ def patch_no_svn_eol_style(sbox):
svntest.main.file_write(patch_file_path, ''.join(unidiff_patch))
expected_output = [
- 'G %s\n' % os.path.join(wc_dir, 'A', 'mu'),
+ 'G %s\n' % sbox.ospath('A/mu'),
]
expected_disk = svntest.main.greek_state.copy()
expected_disk.tweak('A/mu', contents=''.join(mu_contents))
@@ -1688,7 +1688,7 @@ def patch_with_svn_eol_style(sbox):
wc_dir = sbox.wc_dir
patch_file_path = make_patch_path(sbox)
- mu_path = os.path.join(wc_dir, 'A', 'mu')
+ mu_path = sbox.ospath('A/mu')
if os.name == 'nt':
@@ -1770,7 +1770,7 @@ def patch_with_svn_eol_style(sbox):
svntest.main.file_write(patch_file_path, ''.join(unidiff_patch))
expected_output = [
- 'U %s\n' % os.path.join(wc_dir, 'A', 'mu'),
+ 'U %s\n' % sbox.ospath('A/mu'),
]
expected_disk = svntest.main.greek_state.copy()
expected_disk.tweak('A/mu', contents=''.join(mu_contents),
@@ -1802,7 +1802,7 @@ def patch_with_svn_eol_style_uncommitted
wc_dir = sbox.wc_dir
patch_file_path = make_patch_path(sbox)
- mu_path = os.path.join(wc_dir, 'A', 'mu')
+ mu_path = sbox.ospath('A/mu')
if os.name == 'nt':
@@ -1879,7 +1879,7 @@ def patch_with_svn_eol_style_uncommitted
svntest.main.file_write(patch_file_path, ''.join(unidiff_patch))
expected_output = [
- 'G %s\n' % os.path.join(wc_dir, 'A', 'mu'),
+ 'G %s\n' % sbox.ospath('A/mu'),
]
expected_disk = svntest.main.greek_state.copy()
expected_disk.tweak('A/mu', contents=''.join(mu_contents),
@@ -1910,7 +1910,7 @@ def patch_with_ignore_whitespace(sbox):
wc_dir = sbox.wc_dir
patch_file_path = make_patch_path(sbox)
- mu_path = os.path.join(wc_dir, 'A', 'mu')
+ mu_path = sbox.ospath('A/mu')
mu_contents = [
"Dear internet user,\n",
@@ -2016,7 +2016,7 @@ def patch_with_ignore_whitespace(sbox):
]
expected_output = [
- 'U %s\n' % os.path.join(wc_dir, 'A', 'mu'),
+ 'U %s\n' % sbox.ospath('A/mu'),
]
expected_disk = svntest.main.greek_state.copy()
@@ -2044,7 +2044,7 @@ def patch_replace_locally_deleted_file(s
wc_dir = sbox.wc_dir
patch_file_path = make_patch_path(sbox)
- mu_path = os.path.join(wc_dir, 'A', 'mu')
+ mu_path = sbox.ospath('A/mu')
mu_contents = [
"Dear internet user,\n",
@@ -2128,7 +2128,7 @@ def patch_no_eol_at_eof(sbox):
wc_dir = sbox.wc_dir
patch_file_path = make_patch_path(sbox)
- iota_path = os.path.join(wc_dir, 'iota')
+ iota_path = sbox.ospath('iota')
iota_contents = [
"One line\n",
@@ -2174,7 +2174,7 @@ def patch_no_eol_at_eof(sbox):
"The last line with missing eol\n",
]
expected_output = [
- 'U %s\n' % os.path.join(wc_dir, 'iota'),
+ 'U %s\n' % sbox.ospath('iota'),
]
expected_disk = svntest.main.greek_state.copy()
@@ -2201,7 +2201,7 @@ def patch_with_properties(sbox):
wc_dir = sbox.wc_dir
patch_file_path = make_patch_path(sbox)
- iota_path = os.path.join(wc_dir, 'iota')
+ iota_path = sbox.ospath('iota')
modified_prop_contents = "This is the property 'modified'.\n"
deleted_prop_contents = "This is the property 'deleted'.\n"
@@ -2245,7 +2245,7 @@ def patch_with_properties(sbox):
added_prop_contents = "This is the property 'added'.\n"
expected_output = [
- ' U %s\n' % os.path.join(wc_dir, 'iota'),
+ ' U %s\n' % sbox.ospath('iota'),
]
expected_disk = svntest.main.greek_state.copy()
@@ -2272,8 +2272,8 @@ def patch_same_twice(sbox):
wc_dir = sbox.wc_dir
patch_file_path = make_patch_path(sbox)
- mu_path = os.path.join(wc_dir, 'A', 'mu')
- beta_path = os.path.join(wc_dir, 'A', 'B', 'E', 'beta')
+ mu_path = sbox.ospath('A/mu')
+ beta_path = sbox.ospath('A/B/E/beta')
mu_contents = [
"Dear internet user,\n",
@@ -2403,10 +2403,10 @@ def patch_same_twice(sbox):
]
expected_output = [
- 'U %s\n' % os.path.join(wc_dir, 'A', 'D', 'gamma'),
- 'U %s\n' % os.path.join(wc_dir, 'iota'),
- 'A %s\n' % os.path.join(wc_dir, 'new'),
- 'U %s\n' % os.path.join(wc_dir, 'A', 'mu'),
+ 'U %s\n' % sbox.ospath('A/D/gamma'),
+ 'U %s\n' % sbox.ospath('iota'),
+ 'A %s\n' % sbox.ospath('new'),
+ 'U %s\n' % sbox.ospath('A/mu'),
'D %s\n' % beta_path,
]
@@ -2436,9 +2436,9 @@ def patch_same_twice(sbox):
1) # dry-run
# apply the patch again
expected_output = [
- 'G %s\n' % os.path.join(wc_dir, 'A', 'D', 'gamma'),
+ 'G %s\n' % sbox.ospath('A/D/gamma'),
'> hunk @@ -1,1 +1,1 @@ already applied\n',
- 'G %s\n' % os.path.join(wc_dir, 'iota'),
+ 'G %s\n' % sbox.ospath('iota'),
# The iota patch inserts a line after the first line in the file,
# with no trailing context. Currently, Subversion applies this patch
# multiple times, which matches the behaviour of Larry Wall's patch
@@ -2447,9 +2447,9 @@ def patch_same_twice(sbox):
# the duplicate application. Should Subversion be taught to detect it,
# we need this line here:
# '> hunk @@ -1,1 +1,2 @@ already applied\n',
- 'G %s\n' % os.path.join(wc_dir, 'new'),
+ 'G %s\n' % sbox.ospath('new'),
'> hunk @@ -0,0 +1,1 @@ already applied\n',
- 'G %s\n' % os.path.join(wc_dir, 'A', 'mu'),
+ 'G %s\n' % sbox.ospath('A/mu'),
'> hunk @@ -6,6 +6,9 @@ already applied\n',
'> hunk @@ -14,11 +17,8 @@ already applied\n',
'Skipped \'%s\'\n' % beta_path,
@@ -2479,7 +2479,7 @@ def patch_dir_properties(sbox):
wc_dir = sbox.wc_dir
patch_file_path = make_patch_path(sbox)
- B_path = os.path.join(wc_dir, 'A', 'B')
+ B_path = sbox.ospath('A/B')
modified_prop_contents = "This is the property 'modified'.\n"
deleted_prop_contents = "This is the property 'deleted'.\n"
@@ -2539,7 +2539,7 @@ def patch_dir_properties(sbox):
expected_output = [
' U %s\n' % wc_dir,
- ' C %s\n' % os.path.join(wc_dir, 'A', 'B'),
+ ' C %s\n' % sbox.ospath('A/B'),
'Summary of conflicts:\n',
' Property conflicts: 1\n',
]
@@ -2575,7 +2575,7 @@ def patch_add_path_with_props(sbox):
wc_dir = sbox.wc_dir
patch_file_path = make_patch_path(sbox)
- iota_path = os.path.join(wc_dir, 'iota')
+ iota_path = sbox.ospath('iota')
# Apply patch that adds two files, one of which is empty.
# Both files have properties.
@@ -2610,8 +2610,8 @@ def patch_add_path_with_props(sbox):
added_prop_contents = "This is the property 'added'.\n"
expected_output = [
- 'A %s\n' % os.path.join(wc_dir, 'new'),
- 'A %s\n' % os.path.join(wc_dir, 'X'),
+ 'A %s\n' % sbox.ospath('new'),
+ 'A %s\n' % sbox.ospath('X'),
]
expected_disk = svntest.main.greek_state.copy()
@@ -2641,7 +2641,7 @@ def patch_prop_offset(sbox):
wc_dir = sbox.wc_dir
patch_file_path = make_patch_path(sbox)
- iota_path = os.path.join(wc_dir, 'iota')
+ iota_path = sbox.ospath('iota')
prop1_content = ''.join([
"Dear internet user,\n",
@@ -2855,7 +2855,7 @@ def patch_prop_with_fuzz(sbox):
wc_dir = sbox.wc_dir
patch_file_path = make_patch_path(sbox)
- mu_path = os.path.join(wc_dir, 'A', 'mu')
+ mu_path = sbox.ospath('A/mu')
# We have replaced a couple of lines to cause fuzz. Those lines contains
# the word fuzz
@@ -2969,7 +2969,7 @@ def patch_prop_with_fuzz(sbox):
])
expected_output = [
- ' U %s\n' % os.path.join(wc_dir, 'A', 'mu'),
+ ' U %s\n' % sbox.ospath('A/mu'),
'> applied hunk ## -1,6 +1,7 ## with fuzz 1 (prop)\n',
'> applied hunk ## -7,7 +8,9 ## with fuzz 2 (prop)\n',
'> applied hunk ## -19,6 +20,7 ## with offset 1 and fuzz 2 (prop)\n',
@@ -2998,7 +2998,7 @@ def patch_git_empty_files(sbox):
wc_dir = sbox.wc_dir
patch_file_path = make_patch_path(sbox)
- new_path = os.path.join(wc_dir, 'new')
+ new_path = sbox.ospath('new')
unidiff_patch = [
"Index: new\n",
@@ -3014,8 +3014,8 @@ def patch_git_empty_files(sbox):
svntest.main.file_write(patch_file_path, ''.join(unidiff_patch))
expected_output = [
- 'A %s\n' % os.path.join(wc_dir, 'new'),
- 'D %s\n' % os.path.join(wc_dir, 'iota'),
+ 'A %s\n' % sbox.ospath('new'),
+ 'D %s\n' % sbox.ospath('iota'),
]
expected_disk = svntest.main.greek_state.copy()
expected_disk.add({'new' : Item(contents="")})
@@ -3043,7 +3043,7 @@ def patch_old_target_names(sbox):
wc_dir = sbox.wc_dir
patch_file_path = make_patch_path(sbox)
- mu_path = os.path.join(wc_dir, 'A', 'mu')
+ mu_path = sbox.ospath('A/mu')
mu_contents = [
"Dear internet user,\n",
@@ -3142,7 +3142,7 @@ def patch_old_target_names(sbox):
]
expected_output = [
- 'U %s\n' % os.path.join(wc_dir, 'A', 'mu'),
+ 'U %s\n' % sbox.ospath('A/mu'),
]
expected_disk = svntest.main.greek_state.copy()
@@ -3169,7 +3169,7 @@ def patch_reverse_revert(sbox):
wc_dir = sbox.wc_dir
patch_file_path = make_patch_path(sbox)
- mu_path = os.path.join(wc_dir, 'A', 'mu')
+ mu_path = sbox.ospath('A/mu')
mu_contents_pre_patch = [
"Dear internet user,\n",
@@ -3299,11 +3299,11 @@ def patch_reverse_revert(sbox):
]
expected_output = [
- 'U %s\n' % os.path.join(wc_dir, 'A', 'D', 'gamma'),
- 'U %s\n' % os.path.join(wc_dir, 'iota'),
- 'A %s\n' % os.path.join(wc_dir, 'new'),
- 'U %s\n' % os.path.join(wc_dir, 'A', 'mu'),
- 'D %s\n' % os.path.join(wc_dir, 'A', 'B', 'E', 'beta'),
+ 'U %s\n' % sbox.ospath('A/D/gamma'),
+ 'U %s\n' % sbox.ospath('iota'),
+ 'A %s\n' % sbox.ospath('new'),
+ 'U %s\n' % sbox.ospath('A/mu'),
+ 'D %s\n' % sbox.ospath('A/B/E/beta'),
]
expected_disk = svntest.main.greek_state.copy()
@@ -3333,11 +3333,11 @@ def patch_reverse_revert(sbox):
# Applying the same patch in reverse should undo local mods
expected_output = [
- 'G %s\n' % os.path.join(wc_dir, 'A', 'D', 'gamma'),
- 'G %s\n' % os.path.join(wc_dir, 'iota'),
- 'D %s\n' % os.path.join(wc_dir, 'new'),
- 'G %s\n' % os.path.join(wc_dir, 'A', 'mu'),
- 'A %s\n' % os.path.join(wc_dir, 'A', 'B', 'E', 'beta'),
+ 'G %s\n' % sbox.ospath('A/D/gamma'),
+ 'G %s\n' % sbox.ospath('iota'),
+ 'D %s\n' % sbox.ospath('new'),
+ 'G %s\n' % sbox.ospath('A/mu'),
+ 'A %s\n' % sbox.ospath('A/B/E/beta'),
]
expected_disk = svntest.main.greek_state.copy()
expected_disk.tweak('A/mu', contents=''.join(mu_contents_pre_patch))
@@ -3368,7 +3368,7 @@ def patch_one_property(sbox, trailing_eo
wc_dir = sbox.wc_dir
patch_file_path = make_patch_path(sbox)
- mu_path = os.path.join(wc_dir, 'A', 'mu')
+ mu_path = sbox.ospath('A/mu')
# Apply patch
@@ -3464,7 +3464,7 @@ def patch_add_symlink(sbox):
svntest.main.file_write(patch_file_path, ''.join(unidiff_patch))
expected_output = [
- 'A %s\n' % os.path.join(wc_dir, 'iota_symlink'),
+ 'A %s\n' % sbox.ospath('iota_symlink'),
]
expected_disk = svntest.main.greek_state.copy()
@@ -3491,7 +3491,7 @@ def patch_moved_away(sbox):
wc_dir = sbox.wc_dir
patch_file_path = make_patch_path(sbox)
- mu_path = os.path.join(wc_dir, 'A', 'mu')
+ mu_path = sbox.ospath('A/mu')
mu_contents = [
"Dear internet user,\n",
@@ -3592,7 +3592,7 @@ def patch_moved_away(sbox):
]
expected_output = [
- 'U %s\n' % os.path.join(wc_dir, 'A', 'mu2'),
+ 'U %s\n' % sbox.ospath('A/mu2'),
]
expected_disk = svntest.main.greek_state.copy()
@@ -3623,8 +3623,8 @@ def patch_lacking_trailing_eol(sbox):
wc_dir = sbox.wc_dir
patch_file_path = make_patch_path(sbox)
- iota_path = os.path.join(wc_dir, 'iota')
- mu_path = os.path.join(wc_dir, 'A', 'mu')
+ iota_path = sbox.ospath('iota')
+ mu_path = sbox.ospath('A/mu')
# Prepare
expected_status = svntest.actions.get_virginal_state(wc_dir, 1)
@@ -3648,7 +3648,7 @@ def patch_lacking_trailing_eol(sbox):
new_contents = "new\n"
expected_output = [
- 'U %s\n' % os.path.join(wc_dir, 'iota'),
+ 'U %s\n' % sbox.ospath('iota'),
]
# Expect a newline to be appended
@@ -3677,7 +3677,7 @@ def patch_deletes_prop(sbox):
wc_dir = sbox.wc_dir
patch_file_path = make_patch_path(sbox)
- iota_path = os.path.join(wc_dir, 'iota')
+ iota_path = sbox.ospath('iota')
svntest.main.run_svn(None, 'propset', 'propname', 'propvalue',
iota_path)
@@ -3712,7 +3712,7 @@ def patch_deletes_prop(sbox):
expected_status.tweak('iota', wc_rev=2)
expected_skip = wc.State('', { })
expected_output = [
- ' U %s\n' % os.path.join(wc_dir, 'iota'),
+ ' U %s\n' % sbox.ospath('iota'),
]
svntest.actions.run_and_verify_patch(wc_dir, os.path.abspath(patch_file_path),
expected_output,
@@ -3761,7 +3761,7 @@ def patch_reversed_add_with_props(sbox):
patch_file_path = make_patch_path(sbox)
# Add a new file which also has props set on it.
- newfile_path = os.path.join(wc_dir, 'newfile')
+ newfile_path = sbox.ospath('newfile')
newfile_contents = ["This is the file 'newfile'.\n"]
svntest.main.file_write(newfile_path, ''.join(newfile_contents))
svntest.main.run_svn(None, 'add', newfile_path)
@@ -3810,7 +3810,7 @@ def patch_reversed_add_with_props2(sbox)
patch_file_path = make_patch_path(sbox)
# Add a new file which also has props set on it.
- newfile_path = os.path.join(wc_dir, 'newfile')
+ newfile_path = sbox.ospath('newfile')
newfile_contents = ["This is the file 'newfile'.\n"]
svntest.main.file_write(newfile_path, ''.join(newfile_contents))
svntest.main.run_svn(None, 'add', newfile_path)
@@ -3888,8 +3888,8 @@ def patch_dev_null(sbox):
new_contents = "new\n"
expected_output = [
- 'A %s\n' % os.path.join(wc_dir, 'new'),
- 'D %s\n' % os.path.join(wc_dir, 'A', 'B', 'E', 'beta'),
+ 'A %s\n' % sbox.ospath('new'),
+ 'D %s\n' % sbox.ospath('A/B/E/beta'),
]
expected_disk = svntest.main.greek_state.copy()
@@ -3996,7 +3996,7 @@ def patch_target_no_eol_at_eof(sbox):
wc_dir = sbox.wc_dir
patch_file_path = make_patch_path(sbox)
- iota_path = os.path.join(wc_dir, 'iota')
+ iota_path = sbox.ospath('iota')
iota_contents = [
"This is the file iota."
@@ -4026,7 +4026,7 @@ def patch_target_no_eol_at_eof(sbox):
"It is really the file 'iota'."
]
expected_output = [
- 'U %s\n' % os.path.join(wc_dir, 'iota'),
+ 'U %s\n' % sbox.ospath('iota'),
]
expected_disk = svntest.main.greek_state.copy()
@@ -4071,10 +4071,10 @@ def patch_add_and_delete(sbox):
svntest.main.file_write(patch_file_path, ''.join(unidiff_patch))
expected_output = [
- 'A %s\n' % os.path.join(wc_dir, 'P'),
- 'A %s\n' % os.path.join(wc_dir, 'P', 'Q'),
- 'A %s\n' % os.path.join(wc_dir, 'P', 'Q', 'foo'),
- 'D %s\n' % os.path.join(wc_dir, 'iota'),
+ 'A %s\n' % sbox.ospath('P'),
+ 'A %s\n' % sbox.ospath('P/Q'),
+ 'A %s\n' % sbox.ospath('P/Q/foo'),
+ 'D %s\n' % sbox.ospath('iota'),
]
expected_disk = svntest.main.greek_state.copy()
expected_disk.remove('iota')
Modified: subversion/branches/compressed-pristines/subversion/tests/cmdline/prop_tests.py
URL: http://svn.apache.org/viewvc/subversion/branches/compressed-pristines/subversion/tests/cmdline/prop_tests.py?rev=1373783&r1=1373782&r2=1373783&view=diff
==============================================================================
--- subversion/branches/compressed-pristines/subversion/tests/cmdline/prop_tests.py (original)
+++ subversion/branches/compressed-pristines/subversion/tests/cmdline/prop_tests.py Thu Aug 16 10:17:48 2012
@@ -25,7 +25,9 @@
######################################################################
# General modules
-import sys, re, os, stat, subprocess
+import sys, re, os, stat, subprocess, logging
+
+logger = logging.getLogger()
# Our testing module
import svntest
@@ -365,7 +367,7 @@ def update_conflict_props(sbox):
None, None, 1)
if len(extra_files) != 0:
- print("didn't get expected conflict files")
+ logger.warn("didn't get expected conflict files")
raise svntest.verify.SVNUnexpectedOutput
# Resolve the conflicts
@@ -776,9 +778,9 @@ def copy_inherits_special_props(sbox):
expected_stdout = [orig_mime_type + '\n']
if actual_stdout != expected_stdout:
- print("svn pg svn:mime-type output does not match expected.")
- print("Expected standard output: %s\n" % expected_stdout)
- print("Actual standard output: %s\n" % actual_stdout)
+ logger.warn("svn pg svn:mime-type output does not match expected.")
+ logger.warn("Expected standard output: %s\n", expected_stdout)
+ logger.warn("Actual standard output: %s\n", actual_stdout)
raise svntest.verify.SVNUnexpectedOutput
# Check the svn:executable value.
@@ -789,9 +791,9 @@ def copy_inherits_special_props(sbox):
expected_stdout = ['*\n']
if actual_stdout != expected_stdout:
- print("svn pg svn:executable output does not match expected.")
- print("Expected standard output: %s\n" % expected_stdout)
- print("Actual standard output: %s\n" % actual_stdout)
+ logger.warn("svn pg svn:executable output does not match expected.")
+ logger.warn("Expected standard output: %s\n", expected_stdout)
+ logger.warn("Actual standard output: %s\n", actual_stdout)
raise svntest.verify.SVNUnexpectedOutput
#----------------------------------------------------------------------
@@ -1038,8 +1040,8 @@ def binary_props(sbox):
# expected_out, and that errput is empty.
def verify_output(expected_out, output, errput):
if errput != []:
- print('Error: stderr:')
- print(errput)
+ logger.warn('Error: stderr:')
+ logger.warn(errput)
raise svntest.Failure
output.sort()
ln = 0
@@ -1048,8 +1050,8 @@ def verify_output(expected_out, output,
continue
if ((line.find(expected_out[ln]) == -1) or
(line != '' and expected_out[ln] == '')):
- print('Error: expected keywords: %s' % expected_out)
- print(' actual full output: %s' % output)
+ logger.warn('Error: expected keywords: %s', expected_out)
+ logger.warn(' actual full output: %s', output)
raise svntest.Failure
ln = ln + 1
if ln != len(expected_out):
@@ -1738,11 +1740,9 @@ def post_revprop_change_hook(sbox):
svntest.actions.create_failing_hook(repo_dir, 'post-revprop-change',
error_msg)
- # serf/neon/mod_dav_svn splits the "svn: hook failed" line
- expected_error = svntest.verify.RegexOutput([
- '(svn: E165001: |)post-revprop-change hook failed',
- error_msg + "\n",
- ], match_all = False)
+ # serf/neon/mod_dav_svn give SVN_ERR_RA_DAV_REQUEST_FAILED
+ # file/svn give SVN_ERR_REPOS_HOOK_FAILURE
+ expected_error = 'svn: (E175002|E165001).*post-revprop-change hook failed'
svntest.actions.run_and_verify_svn(None, [], expected_error,
'ps', '--revprop', '-r0', 'p', 'v',
@@ -1984,7 +1984,7 @@ def prop_reject_grind(sbox):
if match:
# The last line in the list is always an empty string.
if msg_lines[i + 1] == "":
- #print("found message %i in file at line %i" % (n, j))
+ #logger.info("found message %i in file at line %i" % (n, j))
break
i += 1
else:
@@ -2268,7 +2268,7 @@ def propget_redirection(sbox):
# Run propget -vR svn:mergeinfo, redirecting the stdout to a file.
arglist = [svntest.main.svn_binary, 'propget', SVN_PROP_MERGEINFO, '-vR',
- wc_dir]
+ '--config-dir', svntest.main.default_config_dir, wc_dir]
redir_file = open(redirect_file, 'wb')
pg_proc = subprocess.Popen(arglist, stdout=redir_file)
pg_proc.wait()
@@ -2466,7 +2466,7 @@ def file_matching_dir_prop_reject(sbox):
extra_files,
None, None, True, '-r', '2', wc_dir)
if len(extra_files) != 0:
- print("didn't get expected conflict files")
+ logger.warn("didn't get expected conflict files")
raise svntest.verify.SVNUnexpectedOutput
# Revert and update to check that conflict files are removed
Modified: subversion/branches/compressed-pristines/subversion/tests/cmdline/revert_tests.py
URL: http://svn.apache.org/viewvc/subversion/branches/compressed-pristines/subversion/tests/cmdline/revert_tests.py?rev=1373783&r1=1373782&r2=1373783&view=diff
==============================================================================
--- subversion/branches/compressed-pristines/subversion/tests/cmdline/revert_tests.py (original)
+++ subversion/branches/compressed-pristines/subversion/tests/cmdline/revert_tests.py Thu Aug 16 10:17:48 2012
@@ -1208,6 +1208,17 @@ def revert_permissions_only(sbox):
'revert', sbox.ospath('A/B/E/beta'))
is_executable(sbox.ospath('A/B/E/beta'))
+ # copied file is always writeable
+ sbox.simple_update()
+ expected_output = ["A %s\n" % sbox.ospath('A/B/E2')]
+ svntest.actions.run_and_verify_svn(None, expected_output, [], 'copy',
+ sbox.ospath('A/B/E'),
+ sbox.ospath('A/B/E2'))
+ is_writable(sbox.ospath('A/B/E2/alpha'))
+ svntest.actions.run_and_verify_svn(None, [], [],
+ 'revert', sbox.ospath('A/B/E2/alpha'))
+ is_writable(sbox.ospath('A/B/E2/alpha'))
+
@XFail()
@Issue(3851)
def revert_copy_depth_files(sbox):
@@ -1600,6 +1611,12 @@ def revert_with_unversioned_targets(sbox
actual_disk = svntest.tree.build_tree_from_wc(wc_dir, 1)
svntest.tree.compare_trees("disk", actual_disk, expected_disk.old_tree())
+def revert_nonexistent(sbox):
+ 'svn revert -R nonexistent'
+ sbox.build(read_only=True)
+ svntest.actions.run_and_verify_svn(None, 'Skipped.*nonexistent', [],
+ 'revert', '-R', sbox.ospath('nonexistent'))
+
########################################################################
# Run the tests
@@ -1638,6 +1655,7 @@ test_list = [ None,
revert_no_text_change_conflict,
revert_no_text_change_conflict_recursive,
revert_with_unversioned_targets,
+ revert_nonexistent,
]
if __name__ == '__main__':
Modified: subversion/branches/compressed-pristines/subversion/tests/cmdline/schedule_tests.py
URL: http://svn.apache.org/viewvc/subversion/branches/compressed-pristines/subversion/tests/cmdline/schedule_tests.py?rev=1373783&r1=1373782&r2=1373783&view=diff
==============================================================================
--- subversion/branches/compressed-pristines/subversion/tests/cmdline/schedule_tests.py (original)
+++ subversion/branches/compressed-pristines/subversion/tests/cmdline/schedule_tests.py Thu Aug 16 10:17:48 2012
@@ -26,7 +26,9 @@
######################################################################
# General modules
-import os
+import os, logging
+
+logger = logging.getLogger()
# Our testing module
import svntest
@@ -256,8 +258,8 @@ def check_reversion(files, output):
output.sort()
expected_output.sort()
if output != expected_output:
- print("Expected output: %s" % expected_output)
- print("Actual output: %s" % output)
+ logger.warn("Expected output: %s", expected_output)
+ logger.warn("Actual output: %s", output)
raise svntest.Failure
#----------------------------------------------------------------------
Modified: subversion/branches/compressed-pristines/subversion/tests/cmdline/special_tests.py
URL: http://svn.apache.org/viewvc/subversion/branches/compressed-pristines/subversion/tests/cmdline/special_tests.py?rev=1373783&r1=1373782&r2=1373783&view=diff
==============================================================================
--- subversion/branches/compressed-pristines/subversion/tests/cmdline/special_tests.py (original)
+++ subversion/branches/compressed-pristines/subversion/tests/cmdline/special_tests.py Thu Aug 16 10:17:48 2012
@@ -608,10 +608,8 @@ def replace_symlink_with_dir(sbox):
expected_output = svntest.wc.State(wc_dir, {
})
- if svntest.main.is_posix_os():
- error_re_string = '.*E145001: Entry.*has unexpectedly changed special.*'
- else:
- error_re_string = None
+ error_re_string = 'E145001: (Entry|Node).*has.*changed (special|kind)'
+
svntest.actions.run_and_verify_commit(wc_dir, expected_output,
None, error_re_string, wc_dir)
@@ -950,6 +948,32 @@ def replace_symlinks(sbox):
os.chmod(wc(p), 0775)
sbox.simple_add(p)
sbox.simple_commit() # r2
+ sbox.simple_update()
+ expected_status = svntest.actions.get_virginal_state(sbox.wc_dir, 2)
+ expected_status.add({
+ 'A/D/Y' : Item(status=' ', wc_rev=2),
+ 'A/D/G/Z' : Item(status=' ', wc_rev=2),
+ 'A/D/G/rho.sh' : Item(status=' ', wc_rev=2),
+ 'A/D/Hx' : Item(status=' ', wc_rev=2),
+ 'A/D/Hx/Z' : Item(status=' ', wc_rev=2),
+ 'A/D/Hx/chi' : Item(status=' ', wc_rev=2),
+ 'A/D/Hx/psi.sh' : Item(status=' ', wc_rev=2),
+ 'A/D/H/psi.sh' : Item(status=' ', wc_rev=2),
+ 'A/D/H/Z' : Item(status=' ', wc_rev=2),
+ 'A/D/Gx' : Item(status=' ', wc_rev=2),
+ 'A/D/Gx/Z' : Item(status=' ', wc_rev=2),
+ 'A/D/Gx/pi' : Item(status=' ', wc_rev=2),
+ 'A/D/Gx/rho.sh' : Item(status=' ', wc_rev=2),
+ 'A/D/gamma.sh' : Item(status=' ', wc_rev=2),
+ 'A/B/E/beta.sh' : Item(status=' ', wc_rev=2),
+ 'Ax' : Item(status=' ', wc_rev=2),
+ 'Ax/mu' : Item(status=' ', wc_rev=2),
+ 'Ax/mu.sh' : Item(status=' ', wc_rev=2),
+ 'A/mu.sh' : Item(status=' ', wc_rev=2),
+ 'iota.sh' : Item(status=' ', wc_rev=2),
+ })
+ expected_status_r2 = expected_status
+ svntest.actions.run_and_verify_status(sbox.wc_dir, expected_status_r2)
# Failing git-svn test: 'new symlink is added to a file that was
# also just made executable', i.e., in the same revision.
@@ -1013,14 +1037,38 @@ def replace_symlinks(sbox):
### TODO Replace a normal {file, exec, dir, dir} with a symlink to
### {dir, dir, file, exec}. And the same symlink-to-normal.
- ### Commit fails as of r1226697 with either "svn: E145001: Entry
- ### '.../A/D/Gx/Z' has unexpectedly changed special status" or "svn:
- ### E155010: The node '.../Ax/mu' was not found".
+ expected_status.tweak('A/D/G/pi',
+ 'A/D/G/rho.sh',
+ 'A/D/H/psi.sh',
+ 'A/D/H/chi',
+ 'A/mu',
+ 'A/mu.sh',
+ status='RM')
+ expected_status.tweak('A/B/E/beta.sh',
+ 'A/B/E/alpha',
+ status=' M')
+ expected_status.tweak('Ax/mu',
+ 'Ax/mu.sh',
+ status='MM')
+ expected_status.add({
+ 'A/B/E/sym-alpha' : Item(status='A ', wc_rev=0),
+ 'A/B/E/sym-beta.sh' : Item(status='A ', wc_rev=0),
+ })
+ svntest.actions.run_and_verify_status(sbox.wc_dir, expected_status)
+
sbox.simple_commit() # r3
+ sbox.simple_update()
+
+ expected_status.tweak(status=' ', wc_rev=3)
+ expected_status_r3 = expected_status
+ svntest.actions.run_and_verify_status(sbox.wc_dir, expected_status_r3)
- # Try updating from HEAD-1 to HEAD.
+ # Try updating from HEAD-1 to HEAD. This is currently XFAIL as the
+ # update to HEAD-1 produces a tree conflict.
run_svn(None, 'up', '-r2', sbox.wc_dir)
+ svntest.actions.run_and_verify_status(sbox.wc_dir, expected_status_r2)
sbox.simple_update()
+ svntest.actions.run_and_verify_status(sbox.wc_dir, expected_status_r3)
@Issue(4102)
Modified: subversion/branches/compressed-pristines/subversion/tests/cmdline/stat_tests.py
URL: http://svn.apache.org/viewvc/subversion/branches/compressed-pristines/subversion/tests/cmdline/stat_tests.py?rev=1373783&r1=1373782&r2=1373783&view=diff
==============================================================================
--- subversion/branches/compressed-pristines/subversion/tests/cmdline/stat_tests.py (original)
+++ subversion/branches/compressed-pristines/subversion/tests/cmdline/stat_tests.py Thu Aug 16 10:17:48 2012
@@ -83,8 +83,8 @@ def status_update_with_nested_adds(sbox)
svntest.actions.duplicate_dir(wc_dir, wc_backup)
# Create newdir and newfile
- newdir_path = os.path.join(wc_dir, 'newdir')
- newfile_path = os.path.join(wc_dir, 'newdir', 'newfile')
+ newdir_path = sbox.ospath('newdir')
+ newfile_path = sbox.ospath('newdir/newfile')
os.makedirs(newdir_path)
svntest.main.file_append(newfile_path, 'new text')
@@ -707,8 +707,8 @@ def timestamp_behaviour(sbox):
sbox.build()
wc_dir = sbox.wc_dir
- A_path = os.path.join(wc_dir, 'A')
- iota_path = os.path.join(wc_dir, 'iota')
+ A_path = sbox.ospath('A')
+ iota_path = sbox.ospath('iota')
expected_status = svntest.actions.get_virginal_state(wc_dir, 1)
svntest.actions.run_and_verify_status(wc_dir, expected_status)
@@ -814,12 +814,9 @@ def status_on_unversioned_dotdot(sbox):
os.mkdir(new_subsub)
os.chdir(new_subsub)
- exit_code, out, err = svntest.main.run_svn(1, 'st', '..')
- for line in err:
- if line.find('svn: warning: W155007: \'..\' is not a working copy') != -1:
- break
- else:
- raise svntest.Failure
+ svntest.actions.run_and_verify_svn2(None, None,
+ "svn: warning: W155(010|007):.*'.*'.*not",
+ 0, 'st', '..')
#----------------------------------------------------------------------
@@ -863,7 +860,7 @@ def status_on_partially_nonrecursive_wc(
D_url = top_url + '/A/D'
G_url = top_url + '/A/D/G'
H_url = top_url + '/A/D/H'
- rho = os.path.join(wc_dir, 'A', 'D', 'G', 'rho')
+ rho = sbox.ospath('A/D/G/rho')
# Commit a change to A/D/G/rho. This will be our equivalent of
# whatever change it was that happened between r213 and HEAD in the
@@ -890,7 +887,7 @@ def missing_dir_in_anchor(sbox):
sbox.build(read_only = True)
wc_dir = sbox.wc_dir
- foo_path = os.path.join(wc_dir, 'foo')
+ foo_path = sbox.ospath('foo')
svntest.actions.run_and_verify_svn(None, None, [], 'mkdir', foo_path)
expected_status = svntest.actions.get_virginal_state(wc_dir, 1)
expected_status.add({
@@ -949,13 +946,29 @@ def status_in_xml(sbox):
svntest.actions.run_and_verify_status_xml(expected_entries, file_path, '-u')
+ svntest.actions.run_and_verify_svn(None, None, [],
+ 'rm', '-m', 'repo delete',
+ sbox.repo_url + '/A/B/E/alpha')
+
+ expected_entries = {sbox.ospath('A/B/E/alpha')
+ : {'wcprops' : 'none',
+ 'wcitem' : 'normal',
+ 'wcrev' : '1',
+ 'crev' : '1',
+ 'author' : svntest.main.wc_author,
+ 'rprops' : 'none',
+ 'ritem' : 'deleted'}}
+
+ svntest.actions.run_and_verify_status_xml(expected_entries,
+ sbox.ospath('A/B/E/alpha'), '-u')
+
#----------------------------------------------------------------------
def status_ignored_dir(sbox):
"status on ignored directory"
sbox.build()
wc_dir = sbox.wc_dir
- new_dir = os.path.join(wc_dir, "dir.o")
+ new_dir = sbox.ospath('dir.o')
new_dir_url = sbox.repo_url + "/dir.o"
svntest.actions.run_and_verify_svn("Create dir", "\n|Committed revision 2.", [],
@@ -976,10 +989,20 @@ def status_ignored_dir(sbox):
@Issue(2030)
def status_unversioned_dir(sbox):
"status on unversioned dir"
- sbox.build(read_only = True)
- dir = sbox.repo_dir
- expected_err = "svn: warning: W155007: '.*(/|\\\\)" + os.path.basename(dir) + \
- "' is not a working copy"
+ sbox.build(read_only = True, create_wc = False)
+ dir = sbox.wc_dir
+ svntest.main.safe_rmtree(sbox.wc_dir)
+ os.mkdir(dir)
+
+ # Depending on whether you run the tests below a working copy
+ # or not, the error message might either be something like
+ # svn: warning: W155007: '...copies/stat_tests-19' is not a working copy
+ # or
+ # svn: warning: W155010: The node '...copies/stat_tests-19' was not found.
+
+ expected_err = "svn: warning: W1550(07|10): .*'.*(/|\\\\)" + \
+ os.path.basename(dir) + \
+ "' (is not a working copy|was not found)"
svntest.actions.run_and_verify_svn2(None, [], expected_err, 0,
"status", dir, dir)
@@ -989,7 +1012,7 @@ def status_missing_dir(sbox):
"status with a versioned directory missing"
sbox.build(read_only = True)
wc_dir = sbox.wc_dir
- a_d_g = os.path.join(wc_dir, "A", "D", "G")
+ a_d_g = sbox.ospath('A/D/G')
# ok, blow away the A/D/G directory
svntest.main.safe_rmtree(a_d_g)
@@ -1022,7 +1045,7 @@ def status_missing_dir(sbox):
" * " + os.path.join(a_d_g, "rho") + "\n",
" * " + os.path.join(a_d_g, "tau") + "\n",
"! * ? " + a_d_g + "\n",
- " * 1 " + os.path.join(wc_dir, "A", "D") + "\n",
+ " * 1 " + sbox.ospath('A/D') + "\n",
"Status against revision: 1\n" ]
# now run status -u, we should be able to do this without crashing
@@ -1061,7 +1084,7 @@ def status_add_plus_conflict(sbox):
svntest.actions.run_and_verify_svn(None, None, [],
'update', wc_dir)
- branch_file = os.path.join(wc_dir, 'branch', 'file')
+ branch_file = sbox.ospath('branch/file')
svntest.main.file_write(branch_file, "line 1\nline2\nline3\n", 'wb+')
@@ -1083,7 +1106,7 @@ def status_add_plus_conflict(sbox):
'commit',
branch_file, '-m', 'rev 5')
- trunk_dir = os.path.join(wc_dir, 'trunk')
+ trunk_dir = sbox.ospath('trunk')
svntest.actions.run_and_verify_svn(None, None, [],
'merge',
@@ -1094,15 +1117,15 @@ def status_add_plus_conflict(sbox):
branch_url, '-r', '4:5', trunk_dir)
lines = [
- "? " + os.path.join(wc_dir, "trunk", "file.merge-left.r4") + "\n",
- "? " + os.path.join(wc_dir, "trunk", "file.merge-right.r5") + "\n",
- "? " + os.path.join(wc_dir, "trunk", "file.working") + "\n",
- "C + " + os.path.join(wc_dir, "trunk", "file") + "\n",
+ "? " + sbox.ospath('trunk/file.merge-left.r4') + "\n",
+ "? " + sbox.ospath('trunk/file.merge-right.r5') + "\n",
+ "? " + sbox.ospath('trunk/file.working') + "\n",
+ "C + " + sbox.ospath('trunk/file') + "\n",
"Summary of conflicts:\n",
" Text conflicts: 1\n",
]
if svntest.main.server_has_mergeinfo():
- lines.append(" M " + os.path.join(wc_dir, "trunk") + "\n")
+ lines.append(" M " + sbox.ospath('trunk') + "\n")
expected_output = svntest.verify.UnorderedOutput(lines)
@@ -1116,7 +1139,7 @@ def inconsistent_eol(sbox):
sbox.build()
wc_dir = sbox.wc_dir
- iota_path = os.path.join(wc_dir, "iota")
+ iota_path = sbox.ospath('iota')
svntest.main.file_write(iota_path, "line 1\nline 2\n", "wb")
@@ -1124,7 +1147,7 @@ def inconsistent_eol(sbox):
"property 'svn:eol-style' set on.*iota",
[],
'propset', 'svn:eol-style', 'native',
- os.path.join(wc_dir, 'iota'))
+ sbox.ospath('iota'))
expected_output = svntest.wc.State(wc_dir, {
'iota' : Item(verb='Sending'),
@@ -1148,7 +1171,7 @@ def status_update_with_incoming_props(sb
sbox.build()
wc_dir = sbox.wc_dir
- A_path = os.path.join(wc_dir, 'A')
+ A_path = sbox.ospath('A')
# Add a property to the root folder and a subdir
svntest.main.run_svn(None, 'propset', 'red', 'rojo', wc_dir)
@@ -1201,7 +1224,7 @@ def status_update_with_incoming_props(sb
expected = svntest.verify.UnorderedOutput(
[" 1 1 jrandom " +
- os.path.join(wc_dir, "iota") + "\n",
+ sbox.ospath('iota') + "\n",
" * 1 1 jrandom " + A_path + "\n",
" * 1 1 jrandom " + wc_dir + "\n",
"Status against revision: 2\n" ])
@@ -1247,7 +1270,7 @@ def status_update_verbose_with_incoming_
sbox.build()
wc_dir = sbox.wc_dir
- A_path = os.path.join(wc_dir, 'A')
+ A_path = sbox.ospath('A')
D_path = os.path.join(A_path, 'D')
B_path = os.path.join(A_path, 'B')
E_path = os.path.join(A_path, 'B', 'E')
@@ -1315,7 +1338,7 @@ def status_update_verbose_with_incoming_
" " + common + os.path.join(A_path, 'mu') + "\n",
" " + common + os.path.join(A_path, 'C') + "\n",
" " + common + A_path + "\n",
- " " + common + os.path.join(wc_dir, 'iota') + "\n",
+ " " + common + sbox.ospath('iota') + "\n",
" *" + common + wc_dir + "\n",
"Status against revision: 2\n" ])
@@ -1332,7 +1355,7 @@ def status_nonrecursive_update(sbox):
sbox.build()
wc_dir = sbox.wc_dir
- A_path = os.path.join(wc_dir, 'A')
+ A_path = sbox.ospath('A')
D_path = os.path.join(A_path, 'D')
mu_path = os.path.join(A_path, 'mu')
gamma_path = os.path.join(D_path, 'gamma')
@@ -1371,7 +1394,7 @@ def status_nonrecursive_update(sbox):
'-r', '1', wc_dir)
# Check the remote status of folder A (non-recursively)
- xout = [" * 1 " + os.path.join(wc_dir, "A", "mu") + "\n",
+ xout = [" * 1 " + sbox.ospath('A/mu') + "\n",
"Status against revision: 2\n" ]
svntest.actions.run_and_verify_svn(None,
@@ -1416,7 +1439,7 @@ def status_depth_local(sbox):
sbox.build(read_only = True)
wc_dir = sbox.wc_dir
- A_path = os.path.join(wc_dir, 'A')
+ A_path = sbox.ospath('A')
D_path = os.path.join(A_path, 'D')
mu_path = os.path.join(A_path, 'mu')
@@ -1475,7 +1498,7 @@ def status_depth_update(sbox):
sbox.build()
wc_dir = sbox.wc_dir
- A_path = os.path.join(wc_dir, 'A')
+ A_path = sbox.ospath('A')
D_path = os.path.join(A_path, 'D')
mu_path = os.path.join(A_path, 'mu')
@@ -1544,6 +1567,82 @@ def status_depth_update(sbox):
#----------------------------------------------------------------------
+def status_depth_update_local_modifications(sbox):
+ "run 'status --depth=X -u' with local changes"
+
+ sbox.build()
+ wc_dir = sbox.wc_dir
+ A_path = sbox.ospath('A')
+ D_path = os.path.join(A_path, 'D')
+
+ mu_path = os.path.join(A_path, 'mu')
+ gamma_path = os.path.join(D_path, 'gamma')
+
+ svntest.main.run_svn(None, 'propset', 'svn:test', 'value', A_path)
+ svntest.main.run_svn(None, 'propset', 'svn:test', 'value', D_path)
+
+ svntest.main.file_append(mu_path, 'modified')
+ svntest.main.file_append(gamma_path, 'modified')
+
+ # depth=empty
+ expected = svntest.verify.UnorderedOutput(
+ [" M 1 %s\n" % A_path,
+ "Status against revision: 1\n"])
+
+ svntest.actions.run_and_verify_svn(None,
+ expected,
+ [],
+ "status", "-u", "--depth=empty", A_path)
+
+ expected = svntest.verify.UnorderedOutput(
+ ["M 1 %s\n" % mu_path,
+ "Status against revision: 1\n"])
+
+ svntest.actions.run_and_verify_svn(None,
+ expected,
+ [],
+ "status", "-u", "--depth=empty", mu_path)
+
+ # depth=files
+ expected = svntest.verify.UnorderedOutput(
+ ["M 1 %s\n" % mu_path,
+ " M 1 %s\n" % A_path,
+ "Status against revision: 1\n"])
+
+ svntest.actions.run_and_verify_svn(None,
+ expected,
+ [],
+ "status", "-u", "--depth=files",
+ A_path)
+
+ # depth=immediates
+ expected = svntest.verify.UnorderedOutput(
+ [" M 1 %s\n" % A_path,
+ " M 1 %s\n" % D_path,
+ "M 1 %s\n" % mu_path,
+ "Status against revision: 1\n"])
+
+ svntest.actions.run_and_verify_svn(None,
+ expected,
+ [],
+ "status", "-u", "--depth=immediates",
+ A_path)
+
+ # depth=infinity (the default)
+ expected = svntest.verify.UnorderedOutput(
+ [" M 1 %s\n" % A_path,
+ " M 1 %s\n" % D_path,
+ "M 1 %s\n" % mu_path,
+ "M 1 %s\n" % gamma_path,
+ "Status against revision: 1\n"])
+
+ svntest.actions.run_and_verify_svn(None,
+ expected,
+ [],
+ "status", "-u", "--depth=infinity",
+ A_path)
+
+#----------------------------------------------------------------------
# Test for issue #2420
@Issue(2420)
def status_dash_u_deleted_directories(sbox):
@@ -1551,7 +1650,7 @@ def status_dash_u_deleted_directories(sb
sbox.build()
wc_dir = sbox.wc_dir
- A_path = os.path.join(wc_dir, 'A')
+ A_path = sbox.ospath('A')
B_path = os.path.join(A_path, 'B')
# delete the B directory
@@ -1687,7 +1786,7 @@ def status_with_tree_conflicts(sbox):
svntest.actions.build_greek_tree_conflicts(sbox)
wc_dir = sbox.wc_dir
- G = os.path.join(wc_dir, 'A', 'D', 'G')
+ G = sbox.ospath('A/D/G')
pi = os.path.join(G, 'pi')
rho = os.path.join(G, 'rho')
tau = os.path.join(G, 'tau')
@@ -1777,9 +1876,9 @@ def status_nested_wc_old_format(sbox):
sbox.build(read_only = True)
wc_dir = sbox.wc_dir
- os.mkdir(os.path.join(wc_dir, 'subdir'))
- os.mkdir(os.path.join(wc_dir, 'subdir', '.svn'))
- svntest.main.file_append(os.path.join(wc_dir, 'subdir', '.svn', 'format'),
+ os.mkdir(sbox.ospath('subdir'))
+ os.mkdir(sbox.ospath('subdir/.svn'))
+ svntest.main.file_append(sbox.ospath('subdir/.svn/format'),
'10\n') # format 10 was the Subversion 1.6 format
os.chdir(wc_dir)
svntest.actions.run_and_verify_svn(None, [ "? subdir\n" ], [], 'st')
@@ -1800,7 +1899,7 @@ def status_locked_deleted(sbox):
"status with locked deleted file"
sbox.build()
- iota_path = os.path.join(sbox.wc_dir, 'iota')
+ iota_path = sbox.ospath('iota')
sbox.simple_rm('iota')
simple_lock(sbox, 'iota')
@@ -1972,6 +2071,7 @@ test_list = [ None,
status_dash_u_deleted_directories,
status_depth_local,
status_depth_update,
+ status_depth_update_local_modifications,
status_dash_u_type_change,
status_with_tree_conflicts,
status_nested_wc_old_format,
Modified: subversion/branches/compressed-pristines/subversion/tests/cmdline/svnadmin_tests.py
URL: http://svn.apache.org/viewvc/subversion/branches/compressed-pristines/subversion/tests/cmdline/svnadmin_tests.py?rev=1373783&r1=1373782&r2=1373783&view=diff
==============================================================================
--- subversion/branches/compressed-pristines/subversion/tests/cmdline/svnadmin_tests.py (original)
+++ subversion/branches/compressed-pristines/subversion/tests/cmdline/svnadmin_tests.py Thu Aug 16 10:17:48 2012
@@ -103,6 +103,16 @@ def check_hotcopy_fsfs(src, dst):
% (row, rows1[i]))
continue
+ # Special case for revprop-generation: It will always be zero in
+ # the hotcopy destination (i.e. a fresh cache generation)
+ if src_file == 'revprop-generation':
+ f2 = open(dst_path, 'r')
+ revprop_gen = int(f2.read().strip())
+ if revprop_gen != 0:
+ raise svntest.Failure("Hotcopy destination has non-zero " +
+ "revprop generation")
+ continue
+
f1 = open(src_path, 'r')
f2 = open(dst_path, 'r')
while True:
@@ -174,11 +184,12 @@ def get_txns(repo_dir):
return txns
def load_and_verify_dumpstream(sbox, expected_stdout, expected_stderr,
- revs, dump, *varargs):
- """Load the array of lines passed in 'dump' into the
- current tests' repository and verify the repository content
- using the array of wc.States passed in revs. VARARGS are optional
- arguments passed to the 'load' command"""
+ revs, check_props, dump, *varargs):
+ """Load the array of lines passed in DUMP into the current tests'
+ repository and verify the repository content using the array of
+ wc.States passed in REVS. If CHECK_PROPS is True, check properties
+ of each rev's items. VARARGS are optional arguments passed to the
+ 'load' command."""
if isinstance(dump, str):
dump = [ dump ]
@@ -213,7 +224,7 @@ def load_and_verify_dumpstream(sbox, exp
"update", "-r%s" % (rev+1),
sbox.wc_dir)
- wc_tree = svntest.tree.build_tree_from_wc(sbox.wc_dir)
+ wc_tree = svntest.tree.build_tree_from_wc(sbox.wc_dir, check_props)
rev_tree = revs[rev].old_tree()
try:
@@ -222,6 +233,10 @@ def load_and_verify_dumpstream(sbox, exp
svntest.verify.display_trees(None, 'WC TREE', wc_tree, rev_tree)
raise
+def load_dumpstream(sbox, dump, *varargs):
+ "Load dump text without verification."
+ return load_and_verify_dumpstream(sbox, None, None, None, False, dump,
+ *varargs)
######################################################################
# Tests
@@ -298,7 +313,7 @@ def extra_headers(sbox):
dumpfile[3:3] = \
[ "X-Comment-Header: Ignored header normally not in dump stream\n" ]
- load_and_verify_dumpstream(sbox,[],[], dumpfile_revisions, dumpfile,
+ load_and_verify_dumpstream(sbox,[],[], dumpfile_revisions, False, dumpfile,
'--ignore-uuid')
#----------------------------------------------------------------------
@@ -317,7 +332,7 @@ def extra_blockcontent(sbox):
# Insert the extra content after "PROPS-END\n"
dumpfile[11] = dumpfile[11][:-2] + "extra text\n\n\n"
- load_and_verify_dumpstream(sbox,[],[], dumpfile_revisions, dumpfile,
+ load_and_verify_dumpstream(sbox,[],[], dumpfile_revisions, False, dumpfile,
'--ignore-uuid')
#----------------------------------------------------------------------
@@ -331,7 +346,7 @@ def inconsistent_headers(sbox):
dumpfile[-2] = "Content-length: 30\n\n"
load_and_verify_dumpstream(sbox, [], svntest.verify.AnyOutput,
- dumpfile_revisions, dumpfile)
+ dumpfile_revisions, False, dumpfile)
#----------------------------------------------------------------------
# Test for issue #2729: Datestamp-less revisions in dump streams do
@@ -351,7 +366,7 @@ def empty_date(sbox):
"K 7\nsvn:log\nV 0\n\nK 10\nsvn:author\nV 4\nerik\nPROPS-END\n\n\n"
]
- load_and_verify_dumpstream(sbox,[],[], dumpfile_revisions, dumpfile,
+ load_and_verify_dumpstream(sbox,[],[], dumpfile_revisions, False, dumpfile,
'--ignore-uuid')
# Verify that the revision still lacks the svn:date property.
@@ -798,8 +813,7 @@ def load_with_parent_dir(sbox):
['\n', 'Committed revision 1.\n'],
[], "mkdir", sbox.repo_url + "/sample",
"-m", "Create sample dir")
- load_and_verify_dumpstream(sbox, [], [], None, dumpfile, '--parent-dir',
- '/sample')
+ load_dumpstream(sbox, dumpfile, '--parent-dir', '/sample')
# Verify the svn:mergeinfo properties for '--parent-dir'
svntest.actions.run_and_verify_svn(None,
@@ -821,8 +835,7 @@ def load_with_parent_dir(sbox):
['\n', 'Committed revision 11.\n'],
[], "mkdir", sbox.repo_url + "/sample-2",
"-m", "Create sample-2 dir")
- load_and_verify_dumpstream(sbox, [], [], None, dumpfile, '--parent-dir',
- 'sample-2')
+ load_dumpstream(sbox, dumpfile, '--parent-dir', 'sample-2')
# Verify the svn:mergeinfo properties for '--parent-dir'.
svntest.actions.run_and_verify_svn(None,
@@ -897,11 +910,10 @@ def reflect_dropped_renumbered_revs(sbox
"-m", "Create toplevel dir")
# Load the dump stream in sbox.repo_url
- load_and_verify_dumpstream(sbox,[],[], None, dumpfile)
+ load_dumpstream(sbox, dumpfile)
# Load the dump stream in toplevel dir
- load_and_verify_dumpstream(sbox,[],[], None, dumpfile, '--parent-dir',
- '/toplevel')
+ load_dumpstream(sbox, dumpfile, '--parent-dir', '/toplevel')
# Verify the svn:mergeinfo properties
url = sbox.repo_url
@@ -1132,7 +1144,7 @@ def dont_drop_valid_mergeinfo_during_inc
dumpfile_full = open(os.path.join(os.path.dirname(sys.argv[0]),
'svnadmin_tests_data',
'mergeinfo_included_full.dump')).read()
- load_and_verify_dumpstream(sbox, [], [], None, dumpfile_full, '--ignore-uuid')
+ load_dumpstream(sbox, dumpfile_full, '--ignore-uuid')
# Check that the mergeinfo is as expected.
url = sbox.repo_url + '/branches/'
@@ -1174,15 +1186,9 @@ def dont_drop_valid_mergeinfo_during_inc
test_create(sbox)
# Load the three incremental dump files in sequence.
- load_and_verify_dumpstream(sbox, [], [], None,
- open(dump_file_r1_10).read(),
- '--ignore-uuid')
- load_and_verify_dumpstream(sbox, [], [], None,
- open(dump_file_r11_13).read(),
- '--ignore-uuid')
- load_and_verify_dumpstream(sbox, [], [], None,
- open(dump_file_r14_15).read(),
- '--ignore-uuid')
+ load_dumpstream(sbox, open(dump_file_r1_10).read(), '--ignore-uuid')
+ load_dumpstream(sbox, open(dump_file_r11_13).read(), '--ignore-uuid')
+ load_dumpstream(sbox, open(dump_file_r14_15).read(), '--ignore-uuid')
# Check the mergeinfo, we use the same expected output as before,
# as it (duh!) should be exactly the same as when we loaded the
@@ -1211,13 +1217,11 @@ def dont_drop_valid_mergeinfo_during_inc
dumpfile_skeleton = open(os.path.join(os.path.dirname(sys.argv[0]),
'svnadmin_tests_data',
'skeleton_repos.dump')).read()
- load_and_verify_dumpstream(sbox, [], [], None, dumpfile_skeleton,
- '--ignore-uuid')
+ load_dumpstream(sbox, dumpfile_skeleton, '--ignore-uuid')
# Load 'svnadmin_tests_data/mergeinfo_included_full.dump' in one shot:
- load_and_verify_dumpstream(sbox, [], [], None, dumpfile_full,
- '--parent-dir', 'Projects/Project-X',
- '--ignore-uuid')
+ load_dumpstream(sbox, dumpfile_full, '--parent-dir', 'Projects/Project-X',
+ '--ignore-uuid')
# Check that the mergeinfo is as expected. This is exactly the
# same expected mergeinfo we previously checked, except that the
@@ -1253,22 +1257,15 @@ def dont_drop_valid_mergeinfo_during_inc
test_create(sbox)
# Load this skeleton repos into the empty target:
- load_and_verify_dumpstream(sbox, [], [], None, dumpfile_skeleton,
- '--ignore-uuid')
+ load_dumpstream(sbox, dumpfile_skeleton, '--ignore-uuid')
# Load the three incremental dump files in sequence.
- load_and_verify_dumpstream(sbox, [], [], None,
- open(dump_file_r1_10).read(),
- '--parent-dir', 'Projects/Project-X',
- '--ignore-uuid')
- load_and_verify_dumpstream(sbox, [], [], None,
- open(dump_file_r11_13).read(),
- '--parent-dir', 'Projects/Project-X',
- '--ignore-uuid')
- load_and_verify_dumpstream(sbox, [], [], None,
- open(dump_file_r14_15).read(),
- '--parent-dir', 'Projects/Project-X',
- '--ignore-uuid')
+ load_dumpstream(sbox, open(dump_file_r1_10).read(),
+ '--parent-dir', 'Projects/Project-X', '--ignore-uuid')
+ load_dumpstream(sbox, open(dump_file_r11_13).read(),
+ '--parent-dir', 'Projects/Project-X', '--ignore-uuid')
+ load_dumpstream(sbox, open(dump_file_r14_15).read(),
+ '--parent-dir', 'Projects/Project-X', '--ignore-uuid')
# Check the resulting mergeinfo. We expect the exact same results
# as Part 3.
@@ -1392,7 +1389,7 @@ text
# Try to load the dumpstream, expecting a failure (because of mixed EOLs).
load_and_verify_dumpstream(sbox, [], svntest.verify.AnyOutput,
- dumpfile_revisions, dump_str,
+ dumpfile_revisions, False, dump_str,
'--ignore-uuid')
# Now try it again bypassing prop validation. (This interface takes
@@ -1413,8 +1410,8 @@ def verify_non_utf8_paths(sbox):
test_create(sbox)
# Load the dumpstream
- load_and_verify_dumpstream(sbox, [], [], dumpfile_revisions, dumpfile,
- '--ignore-uuid')
+ load_and_verify_dumpstream(sbox, [], [], dumpfile_revisions, False,
+ dumpfile, '--ignore-uuid')
# Replace the path 'A' in revision 1 with a non-UTF-8 sequence.
# This has been observed in repositories in the wild, though Subversion
@@ -1580,13 +1577,13 @@ def load_ranges(sbox):
# Load our dumpfile, 2 revisions at a time, verifying that we have
# the correct youngest revision after each load.
- load_and_verify_dumpstream(sbox, [], [], None, dumpdata, '-r0:2')
+ load_dumpstream(sbox, dumpdata, '-r0:2')
svntest.actions.run_and_verify_svnlook("Unexpected output", ['2\n'],
None, 'youngest', sbox.repo_dir)
- load_and_verify_dumpstream(sbox, [], [], None, dumpdata, '-r3:4')
+ load_dumpstream(sbox, dumpdata, '-r3:4')
svntest.actions.run_and_verify_svnlook("Unexpected output", ['4\n'],
None, 'youngest', sbox.repo_dir)
- load_and_verify_dumpstream(sbox, [], [], None, dumpdata, '-r5:6')
+ load_dumpstream(sbox, dumpdata, '-r5:6')
svntest.actions.run_and_verify_svnlook("Unexpected output", ['6\n'],
None, 'youngest', sbox.repo_dir)
@@ -1824,6 +1821,11 @@ def mergeinfo_race(sbox):
raise svntest.Failure("one or both commits failed")
+@Issue(4213)
+def recover_old(sbox):
+ "recover --pre-1.4-compatible"
+ sbox.build(create_wc=False)
+ svntest.main.run_svnadmin("recover", sbox.repo_dir)
########################################################################
@@ -1861,6 +1863,7 @@ test_list = [ None,
hotcopy_incremental_packed,
locking,
mergeinfo_race,
+ recover_old,
]
if __name__ == '__main__':
Modified: subversion/branches/compressed-pristines/subversion/tests/cmdline/svndumpfilter_tests.py
URL: http://svn.apache.org/viewvc/subversion/branches/compressed-pristines/subversion/tests/cmdline/svndumpfilter_tests.py?rev=1373783&r1=1373782&r2=1373783&view=diff
==============================================================================
--- subversion/branches/compressed-pristines/subversion/tests/cmdline/svndumpfilter_tests.py (original)
+++ subversion/branches/compressed-pristines/subversion/tests/cmdline/svndumpfilter_tests.py Thu Aug 16 10:17:48 2012
@@ -33,8 +33,10 @@ import tempfile
import svntest
from svntest.verify import SVNExpectedStdout, SVNExpectedStderr
-# Get some helper routines from svnadmin_tests
-from svnadmin_tests import load_and_verify_dumpstream, test_create
+# Get some helper routines
+from svnadmin_tests import (load_and_verify_dumpstream, load_dumpstream,
+ test_create)
+from svntest.main import run_svn, run_svnadmin
# (abbreviation)
Skip = svntest.testcase.Skip_deco
@@ -103,8 +105,7 @@ def reflect_dropped_renumbered_revs(sbox
"--drop-empty-revs",
"--renumber-revs", "--quiet")
- load_and_verify_dumpstream(sbox, [], [], None, filtered_out,
- "--ignore-uuid")
+ load_dumpstream(sbox, filtered_out, "--ignore-uuid")
# Verify the svn:mergeinfo properties
url = sbox.repo_url
@@ -124,8 +125,7 @@ def reflect_dropped_renumbered_revs(sbox
"--drop-empty-revs",
"--renumber-revs", "--quiet")
- load_and_verify_dumpstream(sbox, [], [], None, filtered_out,
- "--ignore-uuid")
+ load_dumpstream(sbox, filtered_out, "--ignore-uuid")
# Verify the svn:mergeinfo properties
expected_output = svntest.verify.UnorderedOutput([
@@ -151,7 +151,7 @@ def svndumpfilter_loses_mergeinfo(sbox):
filtered_out, filtered_err = filter_and_return_output(dumpfile, 0, "include",
"trunk", "branch1",
"--quiet")
- load_and_verify_dumpstream(sbox, [], [], None, filtered_out)
+ load_dumpstream(sbox, filtered_out)
# Verify the svn:mergeinfo properties
url = sbox.repo_url
@@ -174,8 +174,7 @@ def _simple_dumpfilter_test(sbox, dumpfi
*dumpargs)
# Setup our expectations
- load_and_verify_dumpstream(sbox, [], [], None, filtered_output,
- '--ignore-uuid')
+ load_dumpstream(sbox, filtered_output, '--ignore-uuid')
expected_disk = svntest.main.greek_state.copy()
expected_disk.remove('A/B/E/alpha')
expected_disk.remove('A/B/E/beta')
@@ -349,8 +348,7 @@ def filter_mergeinfo_revs_outside_of_dum
"include", "trunk", "branches",
"--skip-missing-merge-sources",
"--quiet")
- load_and_verify_dumpstream(sbox, [], [], None, filtered_dumpfile2,
- '--ignore-uuid')
+ load_dumpstream(sbox, filtered_dumpfile2, '--ignore-uuid')
# Check the resulting mergeinfo.
url = sbox.repo_url + "/branches"
expected_output = svntest.verify.UnorderedOutput([
@@ -377,8 +375,7 @@ def filter_mergeinfo_revs_outside_of_dum
skeleton_dumpfile = open(os.path.join(os.path.dirname(sys.argv[0]),
'svnadmin_tests_data',
'skeleton_repos.dump')).read()
- load_and_verify_dumpstream(sbox, [], [], None, skeleton_dumpfile,
- '--ignore-uuid')
+ load_dumpstream(sbox, skeleton_dumpfile, '--ignore-uuid')
partial_dump2 = os.path.join(os.path.dirname(sys.argv[0]),
'svndumpfilter_tests_data',
'mergeinfo_included_partial.dump')
@@ -480,9 +477,8 @@ def filter_mergeinfo_revs_outside_of_dum
# Now actually load the filtered dump into the skeleton repository
# and then check the resulting mergeinfo.
- load_and_verify_dumpstream(sbox, [], [], None, filtered_dumpfile2,
- '--parent-dir', '/Projects/Project-X',
- '--ignore-uuid')
+ load_dumpstream(sbox, filtered_dumpfile2,
+ '--parent-dir', '/Projects/Project-X', '--ignore-uuid')
url = sbox.repo_url + "/Projects/Project-X/branches"
expected_output = svntest.verify.UnorderedOutput([
@@ -568,8 +564,7 @@ def dropped_but_not_renumbered_empty_rev
"--skip-missing-merge-sources", "--drop-empty-revs")
# Now load the filtered dump into an empty repository.
- load_and_verify_dumpstream(sbox, [], [], None, filtered_dumpfile,
- '--ignore-uuid')
+ load_dumpstream(sbox, filtered_dumpfile, '--ignore-uuid')
# The mergeinfo in the newly loaded repos should have no references to the
# dropped branch and the remaining merge source revs should be remapped to
@@ -622,8 +617,7 @@ def match_empty_prefix(sbox):
# Load the filtered dump into a repo and check the result
test_create(sbox)
- load_and_verify_dumpstream(sbox, [], [], None, filtered_output,
- '--ignore-uuid')
+ load_dumpstream(sbox, filtered_output, '--ignore-uuid')
svntest.actions.run_and_verify_update(sbox.wc_dir,
expected_output,
expected_disk,
@@ -651,6 +645,40 @@ def match_empty_prefix(sbox):
# doesn't seem to be a consistent way to quote such an argument to
# prevent expansion.
+@Issue(2760)
+def accepts_deltas(sbox):
+ "accepts deltas in the input"
+ # Accept format v3 (as created by 'svnadmin --deltas' or svnrdump).
+
+ test_create(sbox)
+ dumpfile_location = os.path.join(os.path.dirname(sys.argv[0]),
+ 'svndumpfilter_tests_data',
+ 'simple_v3.dump')
+ dump_in = open(dumpfile_location).read()
+
+ dump_out, err = filter_and_return_output(dump_in, 0, "include",
+ "trunk", "--quiet")
+
+ expected_revs = [
+ svntest.wc.State('', {
+ 'trunk' : svntest.wc.StateItem(props={'soup': 'No soup for you!'}),
+ 'trunk/foo' : svntest.wc.StateItem("This is file 'foo'.\n"),
+ }),
+ svntest.wc.State('', {
+ 'trunk' : svntest.wc.StateItem(props={'soup': 'No soup for you!'}),
+ 'trunk/foo' : svntest.wc.StateItem("This is file 'foo'.\n"),
+ }),
+ svntest.wc.State('', {
+ 'trunk' : svntest.wc.StateItem(props={'story': 'Yada yada yada...'}),
+ 'trunk/foo' : svntest.wc.StateItem("This is file 'foo'.\n"),
+ }),
+ ]
+
+ load_and_verify_dumpstream(sbox, [], [], expected_revs, True, dump_out,
+ '--ignore-uuid')
+
+
+
########################################################################
# Run the tests
@@ -664,6 +692,7 @@ test_list = [ None,
filter_mergeinfo_revs_outside_of_dump_stream,
dropped_but_not_renumbered_empty_revs,
match_empty_prefix,
+ accepts_deltas,
]
if __name__ == '__main__':
Modified: subversion/branches/compressed-pristines/subversion/tests/cmdline/svnlook_tests.py
URL: http://svn.apache.org/viewvc/subversion/branches/compressed-pristines/subversion/tests/cmdline/svnlook_tests.py?rev=1373783&r1=1373782&r2=1373783&view=diff
==============================================================================
--- subversion/branches/compressed-pristines/subversion/tests/cmdline/svnlook_tests.py (original)
+++ subversion/branches/compressed-pristines/subversion/tests/cmdline/svnlook_tests.py Thu Aug 16 10:17:48 2012
@@ -643,7 +643,7 @@ svnlook_bin=%s
fp = open(os.path.join(sys.argv[1], 'hooks.log'), 'wb')
def output_command(fp, cmd, opt):
command = [svnlook_bin, cmd, '-t', sys.argv[2], sys.argv[1]] + opt
- process = subprocess.Popen(command, stdin=subprocess.PIPE, stdout=subprocess.PIPE, stderr=subprocess.PIPE, shell=False)
+ process = subprocess.Popen(command, stdin=subprocess.PIPE, stdout=subprocess.PIPE, stderr=subprocess.PIPE, shell=False, bufsize=-1)
(output, errors) = process.communicate()
status = process.returncode
fp.write(output)
Modified: subversion/branches/compressed-pristines/subversion/tests/cmdline/svnmucc_tests.py
URL: http://svn.apache.org/viewvc/subversion/branches/compressed-pristines/subversion/tests/cmdline/svnmucc_tests.py?rev=1373783&r1=1373782&r2=1373783&view=diff
==============================================================================
--- subversion/branches/compressed-pristines/subversion/tests/cmdline/svnmucc_tests.py (original)
+++ subversion/branches/compressed-pristines/subversion/tests/cmdline/svnmucc_tests.py Thu Aug 16 10:17:48 2012
@@ -39,7 +39,7 @@ def reject_bogus_mergeinfo(sbox):
sbox.build(create_wc=False)
- expected_error = ".*(E200020.*Invalid revision|E175008.*property change)"
+ expected_error = ".*(E200020.*Invalid revision|E175002.*PROPPATCH)"
# At present this tests the server, but if we ever make svnmucc
# validate the mergeinfo up front then it will only test the client
Modified: subversion/branches/compressed-pristines/subversion/tests/cmdline/svnserveautocheck.sh
URL: http://svn.apache.org/viewvc/subversion/branches/compressed-pristines/subversion/tests/cmdline/svnserveautocheck.sh?rev=1373783&r1=1373782&r2=1373783&view=diff
==============================================================================
--- subversion/branches/compressed-pristines/subversion/tests/cmdline/svnserveautocheck.sh (original)
+++ subversion/branches/compressed-pristines/subversion/tests/cmdline/svnserveautocheck.sh Thu Aug 16 10:17:48 2012
@@ -103,6 +103,10 @@ if [ "$THREADED" != "" ]; then
SVNSERVE_ARGS="-T"
fi
+if [ ${CACHE_REVPROPS:+set} ]; then
+ SVNSERVE_ARGS="$SVNSERVE_ARGS --cache-revprops on"
+fi
+
"$SERVER_CMD" -d -r "$ABS_BUILDDIR/subversion/tests/cmdline" \
--listen-host 127.0.0.1 \
--listen-port $SVNSERVE_PORT \