You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@subversion.apache.org by cm...@apache.org on 2012/06/27 17:13:42 UTC
svn commit: r1354571 [35/37] - in /subversion/branches/master-passphrase: ./
build/ build/ac-macros/ build/generator/ build/generator/templates/
build/win32/ contrib/client-side/emacs/ contrib/server-side/ notes/
notes/api-errata/1.8/ notes/directory-i...
Modified: subversion/branches/master-passphrase/subversion/tests/cmdline/update_tests.py
URL: http://svn.apache.org/viewvc/subversion/branches/master-passphrase/subversion/tests/cmdline/update_tests.py?rev=1354571&r1=1354570&r2=1354571&view=diff
==============================================================================
--- subversion/branches/master-passphrase/subversion/tests/cmdline/update_tests.py (original)
+++ subversion/branches/master-passphrase/subversion/tests/cmdline/update_tests.py Wed Jun 27 15:12:37 2012
@@ -109,7 +109,7 @@ def update_binary_file(sbox):
# Add a binary file to the project.
theta_contents = open(os.path.join(sys.path[0], "theta.bin"), 'rb').read()
# Write PNG file data into 'A/theta'.
- theta_path = os.path.join(wc_dir, 'A', 'theta')
+ theta_path = sbox.ospath('A/theta')
svntest.main.file_write(theta_path, theta_contents, 'wb')
svntest.main.run_svn(None, 'add', theta_path)
@@ -226,9 +226,9 @@ def update_binary_file_2(sbox):
zeta_contents = zeta_contents + zeta_contents
# Write our two files' contents out to disk, in A/theta and A/zeta.
- theta_path = os.path.join(wc_dir, 'A', 'theta')
+ theta_path = sbox.ospath('A/theta')
svntest.main.file_write(theta_path, theta_contents, 'wb')
- zeta_path = os.path.join(wc_dir, 'A', 'zeta')
+ zeta_path = sbox.ospath('A/zeta')
svntest.main.file_write(zeta_path, zeta_contents, 'wb')
# Now, `svn add' those two files.
@@ -310,7 +310,6 @@ def update_binary_file_2(sbox):
#----------------------------------------------------------------------
-@XFail()
@Issue(4128)
def update_binary_file_3(sbox):
"update locally modified file to equal versions"
@@ -322,7 +321,7 @@ def update_binary_file_3(sbox):
theta_contents = open(os.path.join(sys.path[0], "theta.bin"), 'rb').read()
# Write our files contents out to disk, in A/theta.
- theta_path = os.path.join(wc_dir, 'A', 'theta')
+ theta_path = sbox.ospath('A/theta')
svntest.main.file_write(theta_path, theta_contents, 'wb')
# Now, `svn add' that file.
@@ -367,7 +366,7 @@ def update_binary_file_3(sbox):
# Create expected output tree for an update to rev 2.
expected_output = svntest.wc.State(wc_dir, {
- 'A/theta' : Item(status=' '),
+ 'A/theta' : Item(status='G '),
})
# Create expected disk tree for the update
@@ -403,10 +402,10 @@ def update_missing(sbox):
wc_dir = sbox.wc_dir
# Remove some files and dirs from the working copy.
- mu_path = os.path.join(wc_dir, 'A', 'mu')
- rho_path = os.path.join(wc_dir, 'A', 'D', 'G', 'rho')
- E_path = os.path.join(wc_dir, 'A', 'B', 'E')
- H_path = os.path.join(wc_dir, 'A', 'D', 'H')
+ mu_path = sbox.ospath('A/mu')
+ rho_path = sbox.ospath('A/D/G/rho')
+ E_path = sbox.ospath('A/B/E')
+ H_path = sbox.ospath('A/D/H')
# remove two files to verify that they get restored
os.remove(mu_path)
@@ -460,18 +459,18 @@ def update_ignores_added(sbox):
wc_dir = sbox.wc_dir
# Commit something so there's actually a new revision to update to.
- rho_path = os.path.join(wc_dir, 'A', 'D', 'G', 'rho')
+ rho_path = sbox.ospath('A/D/G/rho')
svntest.main.file_append(rho_path, "More stuff in rho.\n")
svntest.main.run_svn(None,
'ci', '-m', 'log msg', rho_path)
# Create a new file, 'zeta', and schedule it for addition.
- zeta_path = os.path.join(wc_dir, 'A', 'B', 'zeta')
+ zeta_path = sbox.ospath('A/B/zeta')
svntest.main.file_append(zeta_path, "This is the file 'zeta'.\n")
svntest.main.run_svn(None, 'add', zeta_path)
# Schedule another file, say, 'gamma', for replacement.
- gamma_path = os.path.join(wc_dir, 'A', 'D', 'gamma')
+ gamma_path = sbox.ospath('A/D/gamma')
svntest.main.run_svn(None, 'delete', gamma_path)
svntest.main.file_append(gamma_path, "This is a new 'gamma' now.\n")
svntest.main.run_svn(None, 'add', gamma_path)
@@ -519,8 +518,8 @@ def update_to_rev_zero(sbox):
sbox.build()
wc_dir = sbox.wc_dir
- iota_path = os.path.join(wc_dir, 'iota')
- A_path = os.path.join(wc_dir, 'A')
+ iota_path = sbox.ospath('iota')
+ A_path = sbox.ospath('A')
# Create expected output tree for an update to rev 0
expected_output = svntest.wc.State(wc_dir, {
@@ -566,7 +565,7 @@ def receive_overlapping_same_change(sbox
wc_dir = sbox.wc_dir
# Modify iota.
- iota_path = os.path.join(wc_dir, 'iota')
+ iota_path = sbox.ospath('iota')
svntest.main.file_append(iota_path, "A change to iota.\n")
# Duplicate locally modified wc, giving us the "other" wc.
@@ -619,8 +618,8 @@ def update_to_resolve_text_conflicts(sbo
svntest.actions.duplicate_dir(wc_dir, wc_backup)
# Make a couple of local mods to files which will be committed
- mu_path = os.path.join(wc_dir, 'A', 'mu')
- rho_path = os.path.join(wc_dir, 'A', 'D', 'G', 'rho')
+ mu_path = sbox.ospath('A/mu')
+ rho_path = sbox.ospath('A/D/G/rho')
svntest.main.file_append(mu_path, 'Original appended text for mu\n')
svntest.main.file_append(rho_path, 'Original appended text for rho\n')
svntest.main.run_svn(None, 'propset', 'Kubla', 'Khan', rho_path)
@@ -729,12 +728,12 @@ def update_delete_modified_files(sbox):
wc_dir = sbox.wc_dir
# Delete a file
- alpha_path = os.path.join(wc_dir, 'A', 'B', 'E', 'alpha')
+ alpha_path = sbox.ospath('A/B/E/alpha')
svntest.actions.run_and_verify_svn("Deleting alpha failed", None, [],
'rm', alpha_path)
# Delete a directory containing files
- G_path = os.path.join(wc_dir, 'A', 'D', 'G')
+ G_path = sbox.ospath('A/D/G')
svntest.actions.run_and_verify_svn("Deleting G failed", None, [],
'rm', G_path)
@@ -809,8 +808,8 @@ def update_after_add_rm_deleted(sbox):
wc_dir = sbox.wc_dir
# Delete a file and directory from WC
- alpha_path = os.path.join(wc_dir, 'A', 'B', 'E', 'alpha')
- F_path = os.path.join(wc_dir, 'A', 'B', 'F')
+ alpha_path = sbox.ospath('A/B/E/alpha')
+ F_path = sbox.ospath('A/B/F')
svntest.actions.run_and_verify_svn(None, None, [], 'rm', alpha_path, F_path)
# Commit deletion
@@ -886,7 +885,7 @@ def obstructed_update_alters_wc_props(sb
# Create an obstruction, a file in the WC with the same name as
# present in a newer rev of the repo.
#print "Creating obstruction"
- obstruction_parent_path = os.path.join(wc_dir, 'A')
+ obstruction_parent_path = sbox.ospath('A')
obstruction_path = os.path.join(obstruction_parent_path, 'foo')
svntest.main.file_append(obstruction_path, 'an obstruction')
@@ -952,7 +951,7 @@ def update_replace_dir(sbox):
wc_dir = sbox.wc_dir
# Delete a directory
- F_path = os.path.join(wc_dir, 'A', 'B', 'F')
+ F_path = sbox.ospath('A/B/F')
svntest.actions.run_and_verify_svn(None, None, [], 'rm', F_path)
# Commit deletion
@@ -1025,7 +1024,7 @@ def update_single_file(sbox):
expected_disk = svntest.main.greek_state.copy()
# Make a local mod to a file which will be committed
- mu_path = os.path.join(wc_dir, 'A', 'mu')
+ mu_path = sbox.ospath('A/mu')
svntest.main.file_append(mu_path, '\nAppended text for mu')
# Commit.
@@ -1041,7 +1040,7 @@ def update_single_file(sbox):
# At one stage 'svn up file' failed with a parent lock error
was_cwd = os.getcwd()
- os.chdir(os.path.join(wc_dir, 'A'))
+ os.chdir(sbox.ospath('A'))
### Can't get run_and_verify_update to work having done the chdir.
svntest.actions.run_and_verify_svn("update failed", None, [],
@@ -1064,7 +1063,7 @@ def prop_update_on_scheduled_delete(sbox
# Make the "other" working copy.
svntest.actions.duplicate_dir(wc_dir, other_wc)
- iota_path = os.path.join(wc_dir, 'iota')
+ iota_path = sbox.ospath('iota')
other_iota_path = os.path.join(other_wc, 'iota')
svntest.main.run_svn(None, 'propset', 'foo', 'bar', iota_path)
@@ -1149,8 +1148,8 @@ def update_deleted_missing_dir(sbox):
sbox.build()
wc_dir = sbox.wc_dir
- E_path = os.path.join(wc_dir, 'A', 'B', 'E')
- H_path = os.path.join(wc_dir, 'A', 'D', 'H')
+ E_path = sbox.ospath('A/B/E')
+ H_path = sbox.ospath('A/D/H')
# Create a new revision with directories deleted
svntest.main.run_svn(None, 'rm', E_path)
@@ -1233,7 +1232,7 @@ def another_hudson_problem(sbox):
wc_dir = sbox.wc_dir
# Delete/commit gamma thus making it 'deleted'
- gamma_path = os.path.join(wc_dir, 'A', 'D', 'gamma')
+ gamma_path = sbox.ospath('A/D/gamma')
svntest.main.run_svn(None, 'rm', gamma_path)
expected_output = svntest.wc.State(wc_dir, {
@@ -1255,7 +1254,7 @@ def another_hudson_problem(sbox):
sbox.repo_url + '/A/D/G')
# Remove corresponding tree from working copy
- G_path = os.path.join(wc_dir, 'A', 'D', 'G')
+ G_path = sbox.ospath('A/D/G')
svntest.main.safe_rmtree(G_path)
# Update missing directory to receive the delete, this should mark G
@@ -1305,8 +1304,8 @@ def update_deleted_targets(sbox):
wc_dir = sbox.wc_dir
# Delete/commit thus creating 'deleted=true' entries
- gamma_path = os.path.join(wc_dir, 'A', 'D', 'gamma')
- F_path = os.path.join(wc_dir, 'A', 'B', 'F')
+ gamma_path = sbox.ospath('A/D/gamma')
+ F_path = sbox.ospath('A/B/F')
svntest.main.run_svn(None, 'rm', gamma_path, F_path)
expected_output = svntest.wc.State(wc_dir, {
@@ -1392,8 +1391,8 @@ def non_recursive_update(sbox):
wc_dir = sbox.wc_dir
# Commit a change to A/mu and A/D/G/rho
- mu_path = os.path.join(wc_dir, 'A', 'mu')
- rho_path = os.path.join(wc_dir, 'A', 'D', 'G', 'rho')
+ mu_path = sbox.ospath('A/mu')
+ rho_path = sbox.ospath('A/D/G/rho')
svntest.main.file_append(mu_path, "new")
svntest.main.file_append(rho_path, "new")
@@ -1426,7 +1425,7 @@ def non_recursive_update(sbox):
'-r', '1', wc_dir)
# Non-recursive update of A should change A/mu but not A/D/G/rho
- A_path = os.path.join(wc_dir, 'A')
+ A_path = sbox.ospath('A')
expected_output = svntest.wc.State(wc_dir, {
'A/mu' : Item(status='U '),
@@ -1470,7 +1469,7 @@ def update_to_deletion(sbox):
sbox.build()
wc_dir = sbox.wc_dir
- iota_path = os.path.join(wc_dir, 'iota')
+ iota_path = sbox.ospath('iota')
# Update iota to rev 0, so it gets removed.
expected_output = svntest.wc.State(wc_dir, {
@@ -1510,7 +1509,7 @@ def update_deletion_inside_out(sbox):
sbox.build()
wc_dir = sbox.wc_dir
- parent_path = os.path.join(wc_dir, 'A', 'B')
+ parent_path = sbox.ospath('A/B')
child_path = os.path.join(parent_path, 'E') # Could be a file, doesn't matter
# Delete the parent directory.
@@ -1553,7 +1552,7 @@ def update_schedule_add_dir(sbox):
wc_dir = sbox.wc_dir
# Delete directory A/D/G in the repository via immediate commit
- G_path = os.path.join(wc_dir, 'A', 'D', 'G')
+ G_path = sbox.ospath('A/D/G')
G_url = sbox.repo_url + '/A/D/G'
svntest.actions.run_and_verify_svn(None, None, [],
'rm', G_url, '-m', 'rev 2')
@@ -1576,7 +1575,7 @@ def update_schedule_add_dir(sbox):
# Do a URL->wc copy, creating a new schedule-add A/D/G.
# (Standard procedure when trying to resurrect the directory.)
- D_path = os.path.join(wc_dir, 'A', 'D')
+ D_path = sbox.ospath('A/D')
svntest.actions.run_and_verify_svn("Copy error:", None, [],
'cp', G_url + '@1', D_path)
@@ -1627,7 +1626,7 @@ def update_to_future_add(sbox):
'-r', '0', wc_dir)
# Update iota to the current HEAD.
- iota_path = os.path.join(wc_dir, 'iota')
+ iota_path = sbox.ospath('iota')
expected_output = svntest.wc.State(wc_dir, {
'iota' : Item(status='A '),
@@ -1645,7 +1644,7 @@ def update_to_future_add(sbox):
iota_path)
# Now try updating the directory into the future
- A_path = os.path.join(wc_dir, 'A')
+ A_path = sbox.ospath('A')
expected_output = svntest.wc.State(wc_dir, {
'A' : Item(status='A '),
@@ -1690,7 +1689,7 @@ def nested_in_read_only(sbox):
raise svntest.Skip('Unsupported in single-db')
# Delete/commit a file
- alpha_path = os.path.join(wc_dir, 'A', 'B', 'E', 'alpha')
+ alpha_path = sbox.ospath('A/B/E/alpha')
svntest.actions.run_and_verify_svn(None, None, [], 'rm', alpha_path)
expected_output = svntest.wc.State(wc_dir, {
@@ -1710,7 +1709,7 @@ def nested_in_read_only(sbox):
svntest.actions.run_and_verify_status(wc_dir, expected_status)
# Delete/commit a directory that used to contain the deleted file
- B_path = os.path.join(wc_dir, 'A', 'B')
+ B_path = sbox.ospath('A/B')
svntest.actions.run_and_verify_svn(None, None, [], 'rm', B_path)
expected_output = svntest.wc.State(wc_dir, {
@@ -1789,7 +1788,7 @@ def update_xml_unsafe_dir(sbox):
svntest.actions.duplicate_dir(wc_dir, wc_backup)
# Make a couple of local mods to files
- test_path = os.path.join(wc_dir, ' foo & bar')
+ test_path = sbox.ospath(' foo & bar')
svntest.main.run_svn(None, 'mkdir', test_path)
# Created expected output tree for 'svn ci'
@@ -1838,7 +1837,7 @@ def conflict_markers_matching_eol(sbox):
wc_dir = sbox.wc_dir
filecount = 1
- mu_path = os.path.join(wc_dir, 'A', 'mu')
+ mu_path = sbox.ospath('A/mu')
if os.name == 'nt':
crlf = '\n'
@@ -1969,7 +1968,7 @@ def update_eolstyle_handling(sbox):
sbox.build()
wc_dir = sbox.wc_dir
- mu_path = os.path.join(wc_dir, 'A', 'mu')
+ mu_path = sbox.ospath('A/mu')
if os.name == 'nt':
crlf = '\n'
@@ -2067,8 +2066,8 @@ def update_copy_of_old_rev(sbox):
sbox.build()
wc_dir = sbox.wc_dir
- dir = os.path.join(wc_dir, 'A')
- dir2 = os.path.join(wc_dir, 'A2')
+ dir = sbox.ospath('A')
+ dir2 = sbox.ospath('A2')
file = os.path.join(dir, 'mu')
file2 = os.path.join(dir2, 'mu')
url = sbox.repo_url + '/A/mu'
@@ -2115,21 +2114,21 @@ def forced_update(sbox):
svntest.actions.duplicate_dir(wc_dir, wc_backup)
# Make a couple of local mods to files
- mu_path = os.path.join(wc_dir, 'A', 'mu')
- rho_path = os.path.join(wc_dir, 'A', 'D', 'G', 'rho')
+ mu_path = sbox.ospath('A/mu')
+ rho_path = sbox.ospath('A/D/G/rho')
svntest.main.file_append(mu_path, 'appended mu text')
svntest.main.file_append(rho_path, 'new appended text for rho')
# Add some files
- nu_path = os.path.join(wc_dir, 'A', 'B', 'F', 'nu')
+ nu_path = sbox.ospath('A/B/F/nu')
svntest.main.file_append(nu_path, "This is the file 'nu'\n")
svntest.main.run_svn(None, 'add', nu_path)
- kappa_path = os.path.join(wc_dir, 'kappa')
+ kappa_path = sbox.ospath('kappa')
svntest.main.file_append(kappa_path, "This is the file 'kappa'\n")
svntest.main.run_svn(None, 'add', kappa_path)
# Add a dir with two files
- I_path = os.path.join(wc_dir, 'A', 'C', 'I')
+ I_path = sbox.ospath('A/C/I')
os.mkdir(I_path)
svntest.main.run_svn(None, 'add', I_path)
upsilon_path = os.path.join(I_path, 'upsilon')
@@ -2254,12 +2253,12 @@ def forced_update_failures(sbox):
svntest.actions.duplicate_dir(wc_dir, wc_backup)
# Add a file
- nu_path = os.path.join(wc_dir, 'A', 'B', 'F', 'nu')
+ nu_path = sbox.ospath('A/B/F/nu')
svntest.main.file_append(nu_path, "This is the file 'nu'\n")
svntest.main.run_svn(None, 'add', nu_path)
# Add a dir
- I_path = os.path.join(wc_dir, 'A', 'C', 'I')
+ I_path = sbox.ospath('A/C/I')
os.mkdir(I_path)
svntest.main.run_svn(None, 'add', I_path)
@@ -2580,8 +2579,8 @@ def update_wc_with_replaced_file(sbox):
svntest.actions.duplicate_dir(wc_dir, wc_backup)
# we need a change in the repository
- 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')
iota_bu_path = os.path.join(wc_backup, 'iota')
svntest.main.file_append(iota_bu_path, "New line in 'iota'\n")
svntest.main.run_svn(None,
@@ -2710,17 +2709,17 @@ def update_with_obstructing_additions(sb
#
# A/D/H/I/J/eta: Conflicts with the file scheduled for addition in
# the backup WC. No props.
- upsilon_path = os.path.join(wc_dir, 'A', 'B', 'upsilon')
+ upsilon_path = sbox.ospath('A/B/upsilon')
svntest.main.file_append(upsilon_path, "This is the file 'upsilon'\n")
- nu_path = os.path.join(wc_dir, 'A', 'C', 'nu')
+ nu_path = sbox.ospath('A/C/nu')
svntest.main.file_append(nu_path, "This is the file 'nu'\n")
- kappa_path = os.path.join(wc_dir, 'A', 'D', 'kappa')
+ kappa_path = sbox.ospath('A/D/kappa')
svntest.main.file_append(kappa_path, "This is REPOS file 'kappa'\n")
- epsilon_path = os.path.join(wc_dir, 'A', 'D', 'epsilon')
+ epsilon_path = sbox.ospath('A/D/epsilon')
svntest.main.file_append(epsilon_path, "This is REPOS file 'epsilon'\n")
- zeta_path = os.path.join(wc_dir, 'A', 'D', 'zeta')
+ zeta_path = sbox.ospath('A/D/zeta')
svntest.main.file_append(zeta_path, "This is the file 'zeta'\n")
- I_path = os.path.join(wc_dir, 'A', 'D', 'H', 'I')
+ I_path = sbox.ospath('A/D/H/I')
os.mkdir(I_path)
J_path = os.path.join(I_path, 'J')
os.mkdir(J_path)
@@ -2922,9 +2921,9 @@ def update_with_obstructing_additions(sb
# WC to WC copy of A/D/H to A/M, M now scheduled for addition with
# history in WC and pending addition from the repos.
- H_path = os.path.join(wc_dir, 'A', 'D', 'H')
- A_path = os.path.join(wc_dir, 'A')
- M_path = os.path.join(wc_dir, 'A', 'M')
+ H_path = sbox.ospath('A/D/H')
+ A_path = sbox.ospath('A')
+ M_path = sbox.ospath('A/M')
svntest.actions.run_and_verify_svn("Copy error:", None, [],
'cp', H_path, M_path)
@@ -2938,8 +2937,8 @@ def update_with_obstructing_additions(sb
# WC to WC copy of A/D/H/chi to omicron, omicron now scheduled for
# addition with history in WC and pending addition from the repos.
- chi_path = os.path.join(wc_dir, 'A', 'D', 'H', 'chi')
- omicron_path = os.path.join(wc_dir, 'omicron')
+ chi_path = sbox.ospath('A/D/H/chi')
+ omicron_path = sbox.ospath('omicron')
svntest.actions.run_and_verify_svn("Copy error:", None, [],
'cp', chi_path,
@@ -3056,11 +3055,11 @@ def update_conflicted(sbox):
"update conflicted files"
sbox.build()
wc_dir = sbox.wc_dir
- iota_path = os.path.join(wc_dir, 'iota')
- lambda_path = os.path.join(wc_dir, 'A', 'B', 'lambda')
- mu_path = os.path.join(wc_dir, 'A', 'mu')
- D_path = os.path.join(wc_dir, 'A', 'D')
- pi_path = os.path.join(wc_dir, 'A', 'D', 'G', 'pi')
+ iota_path = sbox.ospath('iota')
+ lambda_path = sbox.ospath('A/B/lambda')
+ mu_path = sbox.ospath('A/mu')
+ D_path = sbox.ospath('A/D')
+ pi_path = sbox.ospath('A/D/G/pi')
expected_status = svntest.actions.get_virginal_state(wc_dir, 1)
@@ -3224,20 +3223,20 @@ def mergeinfo_update_elision(sbox):
wc_dir = sbox.wc_dir
# Some paths we'll care about
- alpha_COPY_path = os.path.join(wc_dir, "A", "B_COPY", "E", "alpha")
- alpha_path = os.path.join(wc_dir, "A", "B", "E", "alpha")
- B_COPY_path = os.path.join(wc_dir, "A", "B_COPY")
- E_COPY_path = os.path.join(wc_dir, "A", "B_COPY", "E")
- beta_path = os.path.join(wc_dir, "A", "B", "E", "beta")
- lambda_path = os.path.join(wc_dir, "A", "B", "lambda")
+ alpha_COPY_path = sbox.ospath('A/B_COPY/E/alpha')
+ alpha_path = sbox.ospath('A/B/E/alpha')
+ B_COPY_path = sbox.ospath('A/B_COPY')
+ E_COPY_path = sbox.ospath('A/B_COPY/E')
+ beta_path = sbox.ospath('A/B/E/beta')
+ lambda_path = sbox.ospath('A/B/lambda')
# Make a branch A/B_COPY
expected_stdout = verify.UnorderedOutput([
- "A " + os.path.join(wc_dir, "A", "B_COPY", "lambda") + "\n",
- "A " + os.path.join(wc_dir, "A", "B_COPY", "E") + "\n",
- "A " + os.path.join(wc_dir, "A", "B_COPY", "E", "alpha") + "\n",
- "A " + os.path.join(wc_dir, "A", "B_COPY", "E", "beta") + "\n",
- "A " + os.path.join(wc_dir, "A", "B_COPY", "F") + "\n",
+ "A " + sbox.ospath('A/B_COPY/lambda') + "\n",
+ "A " + sbox.ospath('A/B_COPY/E') + "\n",
+ "A " + sbox.ospath('A/B_COPY/E/alpha') + "\n",
+ "A " + sbox.ospath('A/B_COPY/E/beta') + "\n",
+ "A " + sbox.ospath('A/B_COPY/F') + "\n",
"Checked out revision 1.\n",
"A " + B_COPY_path + "\n",
])
@@ -3725,8 +3724,8 @@ def update_copied_and_deleted_prop(sbox)
sbox.build()
wc_dir = sbox.wc_dir
- iota_path = os.path.join(wc_dir, 'iota')
- iota2_path = os.path.join(wc_dir, 'iota2')
+ iota_path = sbox.ospath('iota')
+ iota2_path = sbox.ospath('iota2')
# Add a property on iota
svntest.actions.run_and_verify_svn(None, None, [],
@@ -3819,13 +3818,13 @@ def update_accept_conflicts(sbox):
svntest.actions.duplicate_dir(wc_dir, wc_backup)
# Make a few local mods to files which will be committed
- iota_path = os.path.join(wc_dir, 'iota')
- lambda_path = os.path.join(wc_dir, 'A', 'B', 'lambda')
- mu_path = os.path.join(wc_dir, 'A', 'mu')
- alpha_path = os.path.join(wc_dir, 'A', 'B', 'E', 'alpha')
- beta_path = os.path.join(wc_dir, 'A', 'B', 'E', 'beta')
- pi_path = os.path.join(wc_dir, 'A', 'D', 'G', 'pi')
- rho_path = os.path.join(wc_dir, 'A', 'D', 'G', 'rho')
+ iota_path = sbox.ospath('iota')
+ lambda_path = sbox.ospath('A/B/lambda')
+ mu_path = sbox.ospath('A/mu')
+ alpha_path = sbox.ospath('A/B/E/alpha')
+ beta_path = sbox.ospath('A/B/E/beta')
+ pi_path = sbox.ospath('A/D/G/pi')
+ rho_path = sbox.ospath('A/D/G/rho')
svntest.main.file_append(lambda_path, 'Their appended text for lambda\n')
svntest.main.file_append(iota_path, 'Their appended text for iota\n')
svntest.main.file_append(mu_path, 'Their appended text for mu\n')
@@ -3915,8 +3914,12 @@ def update_accept_conflicts(sbox):
# Accept the pre-update base file.
svntest.actions.run_and_verify_svn(None,
["Updating '%s':\n" % (mu_path_backup),
- 'G %s\n' % (mu_path_backup,),
- 'Updated to revision 2.\n'],
+ 'C %s\n' % (mu_path_backup,),
+ 'Updated to revision 2.\n',
+ "Resolved conflicted state of '%s'\n"
+ % (mu_path_backup),
+ 'Summary of conflicts:\n',
+ ' Text conflicts: 1\n'],
[],
'update', '--accept=base',
mu_path_backup)
@@ -3925,8 +3928,12 @@ def update_accept_conflicts(sbox):
# Accept the user's working file.
svntest.actions.run_and_verify_svn(None,
["Updating '%s':\n" % (alpha_path_backup),
- 'G %s\n' % (alpha_path_backup,),
- 'Updated to revision 2.\n'],
+ 'C %s\n' % (alpha_path_backup,),
+ 'Updated to revision 2.\n',
+ "Resolved conflicted state of '%s'\n"
+ % (alpha_path_backup),
+ 'Summary of conflicts:\n',
+ ' Text conflicts: 1\n'],
[],
'update', '--accept=mine-full',
alpha_path_backup)
@@ -3935,8 +3942,12 @@ def update_accept_conflicts(sbox):
# Accept their file.
svntest.actions.run_and_verify_svn(None,
["Updating '%s':\n" % (beta_path_backup),
- 'G %s\n' % (beta_path_backup,),
- 'Updated to revision 2.\n'],
+ 'C %s\n' % (beta_path_backup,),
+ 'Updated to revision 2.\n',
+ "Resolved conflicted state of '%s'\n"
+ % (beta_path_backup),
+ 'Summary of conflicts:\n',
+ ' Text conflicts: 1\n'],
[],
'update', '--accept=theirs-full',
beta_path_backup)
@@ -3947,8 +3958,12 @@ def update_accept_conflicts(sbox):
# svn to exit with an exit code of 0.
svntest.actions.run_and_verify_svn2(None,
["Updating '%s':\n" % (pi_path_backup),
- 'G %s\n' % (pi_path_backup,),
- 'Updated to revision 2.\n'],
+ 'C %s\n' % (pi_path_backup,),
+ 'Updated to revision 2.\n',
+ "Resolved conflicted state of '%s'\n"
+ % (pi_path_backup),
+ 'Summary of conflicts:\n',
+ ' Text conflicts: 1\n'],
"system(.*) returned.*", 0,
'update', '--accept=edit',
pi_path_backup)
@@ -4057,7 +4072,7 @@ interactive-conflicts = true
config_dir = os.path.join(tmp_dir, 'interactive-conflicts-config')
svntest.main.create_config_dir(config_dir, config_contents)
- iota_path = os.path.join(wc_dir, 'iota')
+ iota_path = sbox.ospath('iota')
# Modify iota and commit for r2.
svntest.main.file_append(iota_path, "Appended text in r2.\n")
@@ -4096,14 +4111,27 @@ interactive-conflicts = true
wc_dir, '--config-dir', config_dir)
# Now update -r1 again. Hopefully we don't get a checksum error!
- expected_output = svntest.wc.State(wc_dir, {})
+ expected_output = svntest.wc.State(wc_dir, {
+ 'iota': Item(verb="Skipped"),
+ })
+
+ # The interactive callback aborts, so the file remains in conflict.
+ expected_disk.tweak('iota', contents="This is the file 'iota'.\n"
+ "<<<<<<< .mine\n"
+ "Local mods to r1 text.\n"
+ "=======\n"
+ "Appended text in r2.\n"
+ ">>>>>>> .r2\n"),
+ expected_disk.add({
+ 'iota.r1' : Item(contents="This is the file 'iota'.\n"),
+ 'iota.r2' : Item(contents="This is the file 'iota'.\n"
+ "Appended text in r2.\n"),
+ 'iota.mine' : Item(contents="This is the file 'iota'.\n"
+ "Local mods to r1 text.\n"),
+ })
- # note: it's possible that the correct disk here should be the
- # merged file?
- expected_disk.tweak('iota', contents=("This is the file 'iota'.\n"
- "Local mods to r1 text.\n"))
expected_status = svntest.actions.get_virginal_state(wc_dir, 1)
- expected_status.tweak('iota', status='M ')
+ expected_status.tweak('iota', status='C ', wc_rev=2)
svntest.actions.run_and_verify_update(wc_dir,
expected_output,
@@ -4155,7 +4183,7 @@ def restarted_update_should_delete_dir_p
sbox.build()
wc_dir = sbox.wc_dir
- A_path = os.path.join(wc_dir, 'A')
+ A_path = sbox.ospath('A')
zeta_path = os.path.join(A_path, 'zeta')
expected_status = svntest.actions.get_virginal_state(wc_dir, 1)
@@ -4846,7 +4874,7 @@ def tree_conflict_uc1_update_deleted_tre
]]]
"""
- A = os.path.join(wc_dir, 'A')
+ A = sbox.ospath('A')
def modify_dir(dir):
"""Make some set of local modifications to an existing tree:
@@ -5079,9 +5107,9 @@ def set_deep_depth_on_target_with_shallo
wc_dir = sbox.wc_dir
# Some paths we'll care about
- A_path = os.path.join(wc_dir, "A")
- B_path = os.path.join(wc_dir, "A", "B")
- D_path = os.path.join(wc_dir, "A", "D")
+ A_path = sbox.ospath('A')
+ B_path = sbox.ospath('A/B')
+ D_path = sbox.ospath('A/D')
# Trim the tree: Set A/B to depth empty and A/D to depth immediates.
expected_output = svntest.wc.State(wc_dir, {
@@ -5273,8 +5301,8 @@ def mergeinfo_updates_merge_with_local_m
expected_disk, expected_status = set_up_branch(sbox)
# Some paths we'll care about
- A_path = os.path.join(wc_dir, "A")
- A_COPY_path = os.path.join(wc_dir, "A_COPY")
+ A_path = sbox.ospath('A')
+ A_COPY_path = sbox.ospath('A_COPY')
# Merge -c3 from A to A_COPY at --depth empty, commit as r7.
###
@@ -5326,7 +5354,7 @@ def update_with_excluded_subdir(sbox):
wc_dir = sbox.wc_dir
- G = os.path.join(os.path.join(wc_dir, 'A', 'D', 'G'))
+ G = os.path.join(sbox.ospath('A/D/G'))
# Make the directory 'G' excluded.
expected_output = svntest.wc.State(wc_dir, {
@@ -5364,7 +5392,7 @@ def update_with_file_lock_and_keywords_p
wc_dir = sbox.wc_dir
- mu_path = os.path.join(wc_dir, 'A', 'mu')
+ mu_path = sbox.ospath('A/mu')
svntest.main.file_append(mu_path, '$Id$')
svntest.main.run_svn(None, 'ps', 'svn:keywords', 'Id', mu_path)
svntest.main.run_svn(None, 'lock', mu_path)
@@ -5793,6 +5821,62 @@ def update_nested_move_text_mod(sbox):
None, None, None,
None, None, 1)
+def update_with_parents_and_exclude(sbox):
+ "bring a subtree in over an excluded path"
+
+ sbox.build(read_only = True)
+ wc_dir = sbox.wc_dir
+
+ # Now we are going to exclude A
+ expected_output = svntest.wc.State(wc_dir, {
+ 'A' : Item(status='D '),
+ })
+
+ expected_status = svntest.wc.State(wc_dir, {
+ '' : Item(status=' ', wc_rev='1'),
+ 'iota' : Item(status=' ', wc_rev='1'),
+ })
+
+ svntest.actions.run_and_verify_update(wc_dir,
+ expected_output,
+ None,
+ expected_status,
+ None, None, None,
+ None, None, False,
+ '--set-depth', 'exclude',
+ sbox.ospath('A'))
+
+ expected_output = svntest.wc.State(wc_dir, {
+ 'A' : Item(status='A '),
+ 'A/B' : Item(status='A '),
+ 'A/B/F' : Item(status='A '),
+ 'A/B/E' : Item(status='A '),
+ 'A/B/E/beta' : Item(status='A '),
+ 'A/B/E/alpha' : Item(status='A '),
+ 'A/B/lambda' : Item(status='A '),
+ })
+
+ expected_status = svntest.wc.State(wc_dir, {
+ '' : Item(status=' ', wc_rev='1'),
+ 'A' : Item(status=' ', wc_rev='1'),
+ 'A/B' : Item(status=' ', wc_rev='1'),
+ 'A/B/F' : Item(status=' ', wc_rev='1'),
+ 'A/B/E' : Item(status=' ', wc_rev='1'),
+ 'A/B/E/beta' : Item(status=' ', wc_rev='1'),
+ 'A/B/E/alpha' : Item(status=' ', wc_rev='1'),
+ 'A/B/lambda' : Item(status=' ', wc_rev='1'),
+ 'iota' : Item(status=' ', wc_rev='1'),
+ })
+
+ svntest.actions.run_and_verify_update(wc_dir,
+ expected_output,
+ None,
+ expected_status,
+ None, None, None,
+ None, None, False,
+ '--parents',
+ sbox.ospath('A/B'))
+
#######################################################################
# Run the tests
@@ -5868,6 +5952,7 @@ test_list = [ None,
update_binary_file_3,
update_move_text_mod,
update_nested_move_text_mod,
+ update_with_parents_and_exclude,
]
if __name__ == '__main__':
Modified: subversion/branches/master-passphrase/subversion/tests/libsvn_client/client-test.c
URL: http://svn.apache.org/viewvc/subversion/branches/master-passphrase/subversion/tests/libsvn_client/client-test.c?rev=1354571&r1=1354570&r2=1354571&view=diff
==============================================================================
--- subversion/branches/master-passphrase/subversion/tests/libsvn_client/client-test.c (original)
+++ subversion/branches/master-passphrase/subversion/tests/libsvn_client/client-test.c Wed Jun 27 15:12:37 2012
@@ -689,7 +689,7 @@ test_youngest_common_ancestor(const svn_
repos_url, repos_uuid, 2, "iota", pool),
svn_client__pathrev_create_with_relpath(
repos_url, repos_uuid, 2, "A/iota", pool),
- ctx, pool, pool));
+ NULL, ctx, pool, pool));
SVN_TEST_STRING_ASSERT(svn_client__pathrev_relpath(yc_ancestor, pool),
"iota");
SVN_TEST_ASSERT(yc_ancestor->rev == 1);
@@ -713,7 +713,7 @@ test_youngest_common_ancestor(const svn_
repos_url, repos_uuid, 0, "", pool),
svn_client__pathrev_create_with_relpath(
repos_url, repos_uuid, 3, "A/ROOT", pool),
- ctx, pool, pool));
+ NULL, ctx, pool, pool));
SVN_TEST_STRING_ASSERT(svn_client__pathrev_relpath(yc_ancestor, pool), "");
SVN_TEST_ASSERT(yc_ancestor->rev == 0);
Modified: subversion/branches/master-passphrase/subversion/tests/libsvn_delta/random-test.c
URL: http://svn.apache.org/viewvc/subversion/branches/master-passphrase/subversion/tests/libsvn_delta/random-test.c?rev=1354571&r1=1354570&r2=1354571&view=diff
==============================================================================
--- subversion/branches/master-passphrase/subversion/tests/libsvn_delta/random-test.c (original)
+++ subversion/branches/master-passphrase/subversion/tests/libsvn_delta/random-test.c Wed Jun 27 15:12:37 2012
@@ -189,7 +189,7 @@ generate_random_file(apr_uint32_t maxlen
{
const int ch = (random_bytes
? (unsigned)random_bytes[r % bytes_range]
- : r % bytes_range);
+ : (int)(r % bytes_range));
if (buf == end)
{
apr_size_t ignore_length;
@@ -198,7 +198,7 @@ generate_random_file(apr_uint32_t maxlen
buf = file_buffer;
}
- *buf++ = ch;
+ *buf++ = (char)ch;
r = r * 1103515245 + 12345;
}
}
@@ -336,10 +336,11 @@ random_test(apr_pool_t *pool)
delta_pool);
/* Make stage 1: create the text delta. */
- svn_txdelta(&txdelta_stream,
- svn_stream_from_aprfile(source, delta_pool),
- svn_stream_from_aprfile(target, delta_pool),
- delta_pool);
+ svn_txdelta2(&txdelta_stream,
+ svn_stream_from_aprfile(source, delta_pool),
+ svn_stream_from_aprfile(target, delta_pool),
+ FALSE,
+ delta_pool);
SVN_ERR(svn_txdelta_send_txstream(txdelta_stream,
handler,
@@ -421,15 +422,17 @@ do_random_combine_test(apr_pool_t *pool,
/* Make stage 1: create the text deltas. */
- svn_txdelta(&txdelta_stream_A,
- svn_stream_from_aprfile(source, delta_pool),
- svn_stream_from_aprfile(middle, delta_pool),
- delta_pool);
-
- svn_txdelta(&txdelta_stream_B,
- svn_stream_from_aprfile(middle_copy, delta_pool),
- svn_stream_from_aprfile(target, delta_pool),
- delta_pool);
+ svn_txdelta2(&txdelta_stream_A,
+ svn_stream_from_aprfile(source, delta_pool),
+ svn_stream_from_aprfile(middle, delta_pool),
+ FALSE,
+ delta_pool);
+
+ svn_txdelta2(&txdelta_stream_B,
+ svn_stream_from_aprfile(middle_copy, delta_pool),
+ svn_stream_from_aprfile(target, delta_pool),
+ FALSE,
+ delta_pool);
{
svn_txdelta_window_t *window_A;
Modified: subversion/branches/master-passphrase/subversion/tests/libsvn_delta/svndiff-test.c
URL: http://svn.apache.org/viewvc/subversion/branches/master-passphrase/subversion/tests/libsvn_delta/svndiff-test.c?rev=1354571&r1=1354570&r2=1354571&view=diff
==============================================================================
--- subversion/branches/master-passphrase/subversion/tests/libsvn_delta/svndiff-test.c (original)
+++ subversion/branches/master-passphrase/subversion/tests/libsvn_delta/svndiff-test.c Wed Jun 27 15:12:37 2012
@@ -75,10 +75,11 @@ main(int argc, char **argv)
if (argc == 4)
version = atoi(argv[3]);
- svn_txdelta(&txdelta_stream,
- svn_stream_from_aprfile(source_file, pool),
- svn_stream_from_aprfile(target_file, pool),
- pool);
+ svn_txdelta2(&txdelta_stream,
+ svn_stream_from_aprfile(source_file, pool),
+ svn_stream_from_aprfile(target_file, pool),
+ FALSE,
+ pool);
err = svn_stream_for_stdout(&stdout_stream, pool);
if (err)
Modified: subversion/branches/master-passphrase/subversion/tests/libsvn_delta/vdelta-test.c
URL: http://svn.apache.org/viewvc/subversion/branches/master-passphrase/subversion/tests/libsvn_delta/vdelta-test.c?rev=1354571&r1=1354570&r2=1354571&view=diff
==============================================================================
--- subversion/branches/master-passphrase/subversion/tests/libsvn_delta/vdelta-test.c (original)
+++ subversion/branches/master-passphrase/subversion/tests/libsvn_delta/vdelta-test.c Wed Jun 27 15:12:37 2012
@@ -28,6 +28,7 @@
#include "../svn_test.h"
+#include "svn_ctype.h"
#include "svn_delta.h"
#include "svn_error.h"
#include "svn_pools.h"
@@ -59,10 +60,11 @@ do_one_diff(apr_file_t *source_file, apr
*count = 0;
*len = 0;
- svn_txdelta(&delta_stream,
- svn_stream_from_aprfile(source_file, fpool),
- svn_stream_from_aprfile(target_file, fpool),
- fpool);
+ svn_txdelta2(&delta_stream,
+ svn_stream_from_aprfile(source_file, fpool),
+ svn_stream_from_aprfile(target_file, fpool),
+ FALSE,
+ fpool);
do {
svn_error_t *err;
err = svn_txdelta_next_window(&delta_window, delta_stream, wpool);
@@ -82,75 +84,17 @@ do_one_diff(apr_file_t *source_file, apr
}
-static apr_file_t *
-open_binary_read(const char *path, apr_pool_t *pool)
-{
- apr_status_t apr_err;
- apr_file_t *fp;
-
- apr_err = apr_file_open(&fp, path, (APR_READ | APR_BINARY),
- APR_OS_DEFAULT, pool);
-
- if (apr_err)
- {
- fprintf(stderr, "unable to open \"%s\" for reading\n", path);
- exit(1);
- }
-
- return fp;
-}
-
-
-int
-main(int argc, char **argv)
+static void
+do_one_test_cycle(apr_file_t *source_file_A, apr_file_t *target_file_A,
+ apr_file_t *source_file_B, apr_file_t *target_file_B,
+ int quiet, apr_pool_t *pool)
{
- apr_file_t *source_file_A = NULL;
- apr_file_t *target_file_A = NULL;
int count_A = 0;
apr_off_t len_A = 0;
- apr_file_t *source_file_B = NULL;
- apr_file_t *target_file_B = NULL;
int count_B = 0;
apr_off_t len_B = 0;
- apr_pool_t *pool;
- int quiet = 0;
-
- if (argc > 1 && argv[1][0] == '-' && argv[1][1] == 'q')
- {
- quiet = 1;
- --argc; ++argv;
- }
-
- apr_initialize();
- pool = svn_pool_create(NULL);
-
- if (argc == 2)
- {
- target_file_A = open_binary_read(argv[1], pool);
- }
- else if (argc == 3)
- {
- source_file_A = open_binary_read(argv[1], pool);
- target_file_A = open_binary_read(argv[2], pool);
- }
- else if (argc == 4)
- {
- source_file_A = open_binary_read(argv[1], pool);
- target_file_A = open_binary_read(argv[2], pool);
- source_file_B = open_binary_read(argv[2], pool);
- target_file_B = open_binary_read(argv[3], pool);
- }
- else
- {
- fprintf(stderr,
- "Usage: vdelta-test [-q] <target>\n"
- " or: vdelta-test [-q] <source> <target>\n"
- " or: vdelta-test [-q] <source> <intermediate> <target>\n");
- exit(1);
- }
-
do_one_diff(source_file_A, target_file_A,
&count_A, &len_A, quiet, pool, "A ", stdout);
@@ -181,14 +125,16 @@ main(int argc, char **argv)
apr_file_seek(target_file_B, APR_SET, &offset);
}
- svn_txdelta(&stream_A,
- svn_stream_from_aprfile(source_file_A, fpool),
- svn_stream_from_aprfile(target_file_A, fpool),
- fpool);
- svn_txdelta(&stream_B,
- svn_stream_from_aprfile(source_file_B, fpool),
- svn_stream_from_aprfile(target_file_B, fpool),
- fpool);
+ svn_txdelta2(&stream_A,
+ svn_stream_from_aprfile(source_file_A, fpool),
+ svn_stream_from_aprfile(target_file_A, fpool),
+ FALSE,
+ fpool);
+ svn_txdelta2(&stream_B,
+ svn_stream_from_aprfile(source_file_B, fpool),
+ svn_stream_from_aprfile(target_file_B, fpool),
+ FALSE,
+ fpool);
for (count_AB = 0; count_AB < count_B; ++count_AB)
{
@@ -219,6 +165,98 @@ main(int argc, char **argv)
fprintf(stdout, "AB: (LENGTH %" APR_OFF_T_FMT " +%d)\n",
len_AB, count_AB);
}
+}
+
+
+static apr_file_t *
+open_binary_read(const char *path, apr_pool_t *pool)
+{
+ apr_status_t apr_err;
+ apr_file_t *fp;
+
+ apr_err = apr_file_open(&fp, path, (APR_READ | APR_BINARY),
+ APR_OS_DEFAULT, pool);
+
+ if (apr_err)
+ {
+ fprintf(stderr, "unable to open \"%s\" for reading\n", path);
+ exit(1);
+ }
+
+ return fp;
+}
+
+
+int
+main(int argc, char **argv)
+{
+ apr_file_t *source_file_A = NULL;
+ apr_file_t *target_file_A = NULL;
+
+ apr_file_t *source_file_B = NULL;
+ apr_file_t *target_file_B = NULL;
+
+ apr_pool_t *pool;
+ int quiet = 0;
+ int repeat = 1;
+
+ while (argc > 1)
+ {
+ const char *const arg = argv[1];
+ if (arg[0] != '-')
+ break;
+
+ if (arg[1] == 'q')
+ quiet = 1;
+ else if (svn_ctype_isdigit(arg[1]))
+ repeat = atoi(arg + 1);
+ else
+ break;
+ --argc; ++argv;
+ }
+
+ apr_initialize();
+ pool = svn_pool_create(NULL);
+
+ if (argc == 2)
+ {
+ target_file_A = open_binary_read(argv[1], pool);
+ }
+ else if (argc == 3)
+ {
+ source_file_A = open_binary_read(argv[1], pool);
+ target_file_A = open_binary_read(argv[2], pool);
+ }
+ else if (argc == 4)
+ {
+ source_file_A = open_binary_read(argv[1], pool);
+ target_file_A = open_binary_read(argv[2], pool);
+ source_file_B = open_binary_read(argv[2], pool);
+ target_file_B = open_binary_read(argv[3], pool);
+ }
+ else
+ {
+ fprintf(stderr,
+ "Usage: vdelta-test [-q] [-<repeat>] <target>\n"
+ " or: vdelta-test [-q] [-<repeat>] <source> <target>\n"
+ " or: vdelta-test [-q] [-<repeat>] "
+ "<source> <intermediate> <target>\n");
+ exit(1);
+ }
+
+ while (0 < repeat--)
+ {
+ apr_off_t offset = 0;
+
+ do_one_test_cycle(source_file_A, target_file_A,
+ source_file_B, target_file_B,
+ quiet, pool);
+
+ if (source_file_A) apr_file_seek(source_file_A, APR_SET, &offset);
+ if (target_file_A) apr_file_seek(target_file_A, APR_SET, &offset);
+ if (source_file_B) apr_file_seek(source_file_B, APR_SET, &offset);
+ if (target_file_B) apr_file_seek(target_file_B, APR_SET, &offset);
+ }
if (source_file_A) apr_file_close(source_file_A);
if (target_file_A) apr_file_close(target_file_A);
Modified: subversion/branches/master-passphrase/subversion/tests/libsvn_delta/window-test.c
URL: http://svn.apache.org/viewvc/subversion/branches/master-passphrase/subversion/tests/libsvn_delta/window-test.c?rev=1354571&r1=1354570&r2=1354571&view=diff
==============================================================================
--- subversion/branches/master-passphrase/subversion/tests/libsvn_delta/window-test.c (original)
+++ subversion/branches/master-passphrase/subversion/tests/libsvn_delta/window-test.c Wed Jun 27 15:12:37 2012
@@ -29,6 +29,7 @@
#include "svn_error.h"
#include "svn_delta.h"
+#include "private/svn_subr_private.h"
static svn_error_t *
stream_window_test(apr_pool_t *pool)
@@ -69,7 +70,7 @@ stream_window_test(apr_pool_t *pool)
target_str.len = 109000;
target_stream = svn_stream_from_string(&target_str, pool);
- svn_txdelta(&txstream, source_stream, target_stream, pool);
+ svn_txdelta2(&txstream, source_stream, target_stream, TRUE, pool);
while (1)
{
@@ -82,8 +83,8 @@ stream_window_test(apr_pool_t *pool)
/* ### examine the window */
}
- actual = svn_checksum__from_digest(svn_txdelta_md5_digest(txstream),
- svn_checksum_md5, pool);
+ actual = svn_checksum__from_digest_md5(svn_txdelta_md5_digest(txstream),
+ pool);
printf(" actual: %s\n", svn_checksum_to_cstring(actual, pool));
if (!svn_checksum_match(expected, actual))
Modified: subversion/branches/master-passphrase/subversion/tests/libsvn_fs/locks-test.c
URL: http://svn.apache.org/viewvc/subversion/branches/master-passphrase/subversion/tests/libsvn_fs/locks-test.c?rev=1354571&r1=1354570&r2=1354571&view=diff
==============================================================================
--- subversion/branches/master-passphrase/subversion/tests/libsvn_fs/locks-test.c (original)
+++ subversion/branches/master-passphrase/subversion/tests/libsvn_fs/locks-test.c Wed Jun 27 15:12:37 2012
@@ -91,28 +91,24 @@ verify_matching_lock_paths(struct get_lo
}
-/*-----------------------------------------------------------------*/
-
-/** The actual lock-tests called by `make check` **/
-
-
-
-/* Test that we can create a lock--nothing more. */
-static svn_error_t *
-lock_only(const svn_test_opts_t *opts,
- apr_pool_t *pool)
+/* Create a filesystem in a directory called NAME, and populate it with
+ * the standard Greek tree. Set *FS_P to the new filesystem object and
+ * *NEWREV_P to the head revision number. Unwanted outputs may be NULL. */
+static svn_error_t *
+create_greek_fs(svn_fs_t **fs_p,
+ svn_revnum_t *newrev_p,
+ const char *name,
+ const svn_test_opts_t *opts,
+ apr_pool_t *pool)
{
svn_fs_t *fs;
svn_fs_txn_t *txn;
svn_fs_root_t *txn_root;
const char *conflict;
svn_revnum_t newrev;
- svn_fs_access_t *access;
- svn_lock_t *mylock;
/* Prepare a filesystem and a new txn. */
- SVN_ERR(svn_test__create_fs(&fs, "test-repo-lock-only",
- opts, pool));
+ SVN_ERR(svn_test__create_fs(&fs, name, opts, pool));
SVN_ERR(svn_fs_begin_txn2(&txn, fs, 0, SVN_FS_TXN_CHECK_LOCKS, pool));
SVN_ERR(svn_fs_txn_root(&txn_root, txn, pool));
@@ -121,6 +117,32 @@ lock_only(const svn_test_opts_t *opts,
SVN_ERR(svn_fs_commit_txn(&conflict, &newrev, txn, pool));
SVN_TEST_ASSERT(SVN_IS_VALID_REVNUM(newrev));
+ if (fs_p)
+ *fs_p = fs;
+ if (newrev_p)
+ *newrev_p = newrev;
+ return SVN_NO_ERROR;
+}
+
+
+/*-----------------------------------------------------------------*/
+
+/** The actual lock-tests called by `make check` **/
+
+
+
+/* Test that we can create a lock--nothing more. */
+static svn_error_t *
+lock_only(const svn_test_opts_t *opts,
+ apr_pool_t *pool)
+{
+ svn_fs_t *fs;
+ svn_fs_access_t *access;
+ svn_lock_t *mylock;
+
+ SVN_ERR(create_greek_fs(&fs, NULL, "test-repo-lock-only",
+ opts, pool));
+
/* We are now 'bubba'. */
SVN_ERR(svn_fs_create_access(&access, "bubba", pool));
SVN_ERR(svn_fs_set_access(fs, access));
@@ -143,23 +165,11 @@ lookup_lock_by_path(const svn_test_opts_
apr_pool_t *pool)
{
svn_fs_t *fs;
- svn_fs_txn_t *txn;
- svn_fs_root_t *txn_root;
- const char *conflict;
- svn_revnum_t newrev;
svn_fs_access_t *access;
svn_lock_t *mylock, *somelock;
- /* Prepare a filesystem and a new txn. */
- SVN_ERR(svn_test__create_fs(&fs, "test-repo-lookup-lock-by-path",
- opts, pool));
- SVN_ERR(svn_fs_begin_txn2(&txn, fs, 0, SVN_FS_TXN_CHECK_LOCKS, pool));
- SVN_ERR(svn_fs_txn_root(&txn_root, txn, pool));
-
- /* Create the greek tree and commit it. */
- SVN_ERR(svn_test__create_greek_tree(txn_root, pool));
- SVN_ERR(svn_fs_commit_txn(&conflict, &newrev, txn, pool));
- SVN_TEST_ASSERT(SVN_IS_VALID_REVNUM(newrev));
+ SVN_ERR(create_greek_fs(&fs, NULL, "test-repo-lookup-lock-by-path",
+ opts, pool));
/* We are now 'bubba'. */
SVN_ERR(svn_fs_create_access(&access, "bubba", pool));
@@ -185,25 +195,13 @@ attach_lock(const svn_test_opts_t *opts,
apr_pool_t *pool)
{
svn_fs_t *fs;
- svn_fs_txn_t *txn;
- svn_fs_root_t *txn_root;
- const char *conflict;
- svn_revnum_t newrev;
svn_fs_access_t *access;
svn_lock_t *somelock;
svn_lock_t *mylock;
const char *token;
- /* Prepare a filesystem and a new txn. */
- SVN_ERR(svn_test__create_fs(&fs, "test-repo-attach-lock",
- opts, pool));
- SVN_ERR(svn_fs_begin_txn2(&txn, fs, 0, SVN_FS_TXN_CHECK_LOCKS, pool));
- SVN_ERR(svn_fs_txn_root(&txn_root, txn, pool));
-
- /* Create the greek tree and commit it. */
- SVN_ERR(svn_test__create_greek_tree(txn_root, pool));
- SVN_ERR(svn_fs_commit_txn(&conflict, &newrev, txn, pool));
- SVN_TEST_ASSERT(SVN_IS_VALID_REVNUM(newrev));
+ SVN_ERR(create_greek_fs(&fs, NULL, "test-repo-attach-lock",
+ opts, pool));
/* We are now 'bubba'. */
SVN_ERR(svn_fs_create_access(&access, "bubba", pool));
@@ -238,25 +236,13 @@ get_locks(const svn_test_opts_t *opts,
apr_pool_t *pool)
{
svn_fs_t *fs;
- svn_fs_txn_t *txn;
- svn_fs_root_t *txn_root;
- const char *conflict;
- svn_revnum_t newrev;
svn_fs_access_t *access;
svn_lock_t *mylock;
struct get_locks_baton_t *get_locks_baton;
apr_size_t i, num_expected_paths;
- /* Prepare a filesystem and a new txn. */
- SVN_ERR(svn_test__create_fs(&fs, "test-repo-get-locks",
- opts, pool));
- SVN_ERR(svn_fs_begin_txn2(&txn, fs, 0, SVN_FS_TXN_CHECK_LOCKS, pool));
- SVN_ERR(svn_fs_txn_root(&txn_root, txn, pool));
-
- /* Create the greek tree and commit it. */
- SVN_ERR(svn_test__create_greek_tree(txn_root, pool));
- SVN_ERR(svn_fs_commit_txn(&conflict, &newrev, txn, pool));
- SVN_TEST_ASSERT(SVN_IS_VALID_REVNUM(newrev));
+ SVN_ERR(create_greek_fs(&fs, NULL, "test-repo-get-locks",
+ opts, pool));
/* We are now 'bubba'. */
SVN_ERR(svn_fs_create_access(&access, "bubba", pool));
@@ -381,23 +367,11 @@ basic_lock(const svn_test_opts_t *opts,
apr_pool_t *pool)
{
svn_fs_t *fs;
- svn_fs_txn_t *txn;
- svn_fs_root_t *txn_root;
- const char *conflict;
- svn_revnum_t newrev;
svn_fs_access_t *access;
svn_lock_t *mylock, *somelock;
- /* Prepare a filesystem and a new txn. */
- SVN_ERR(svn_test__create_fs(&fs, "test-repo-basic-lock",
- opts, pool));
- SVN_ERR(svn_fs_begin_txn2(&txn, fs, 0, SVN_FS_TXN_CHECK_LOCKS, pool));
- SVN_ERR(svn_fs_txn_root(&txn_root, txn, pool));
-
- /* Create the greek tree and commit it. */
- SVN_ERR(svn_test__create_greek_tree(txn_root, pool));
- SVN_ERR(svn_fs_commit_txn(&conflict, &newrev, txn, pool));
- SVN_TEST_ASSERT(SVN_IS_VALID_REVNUM(newrev));
+ SVN_ERR(create_greek_fs(&fs, NULL, "test-repo-basic-lock",
+ opts, pool));
/* We are now 'bubba'. */
SVN_ERR(svn_fs_create_access(&access, "bubba", pool));
@@ -440,16 +414,8 @@ lock_credentials(const svn_test_opts_t *
svn_lock_t *mylock;
svn_error_t *err;
- /* Prepare a filesystem and a new txn. */
- SVN_ERR(svn_test__create_fs(&fs, "test-repo-lock-credentials",
- opts, pool));
- SVN_ERR(svn_fs_begin_txn2(&txn, fs, 0, SVN_FS_TXN_CHECK_LOCKS, pool));
- SVN_ERR(svn_fs_txn_root(&txn_root, txn, pool));
-
- /* Create the greek tree and commit it. */
- SVN_ERR(svn_test__create_greek_tree(txn_root, pool));
- SVN_ERR(svn_fs_commit_txn(&conflict, &newrev, txn, pool));
- SVN_TEST_ASSERT(SVN_IS_VALID_REVNUM(newrev));
+ SVN_ERR(create_greek_fs(&fs, &newrev, "test-repo-lock-credentials",
+ opts, pool));
/* We are now 'bubba'. */
SVN_ERR(svn_fs_create_access(&access, "bubba", pool));
@@ -535,16 +501,8 @@ final_lock_check(const svn_test_opts_t *
svn_lock_t *mylock;
svn_error_t *err;
- /* Prepare a filesystem and a new txn. */
- SVN_ERR(svn_test__create_fs(&fs, "test-repo-final-lock-check",
- opts, pool));
- SVN_ERR(svn_fs_begin_txn2(&txn, fs, 0, SVN_FS_TXN_CHECK_LOCKS, pool));
- SVN_ERR(svn_fs_txn_root(&txn_root, txn, pool));
-
- /* Create the greek tree and commit it. */
- SVN_ERR(svn_test__create_greek_tree(txn_root, pool));
- SVN_ERR(svn_fs_commit_txn(&conflict, &newrev, txn, pool));
- SVN_TEST_ASSERT(SVN_IS_VALID_REVNUM(newrev));
+ SVN_ERR(create_greek_fs(&fs, &newrev, "test-repo-final-lock-check",
+ opts, pool));
/* Make a new transaction and delete "/A" */
SVN_ERR(svn_fs_begin_txn2(&txn, fs, newrev, SVN_FS_TXN_CHECK_LOCKS, pool));
@@ -595,16 +553,8 @@ lock_dir_propchange(const svn_test_opts_
svn_fs_access_t *access;
svn_lock_t *mylock;
- /* Prepare a filesystem and a new txn. */
- SVN_ERR(svn_test__create_fs(&fs, "test-repo-lock-dir-propchange",
- opts, pool));
- SVN_ERR(svn_fs_begin_txn2(&txn, fs, 0, SVN_FS_TXN_CHECK_LOCKS, pool));
- SVN_ERR(svn_fs_txn_root(&txn_root, txn, pool));
-
- /* Create the greek tree and commit it. */
- SVN_ERR(svn_test__create_greek_tree(txn_root, pool));
- SVN_ERR(svn_fs_commit_txn(&conflict, &newrev, txn, pool));
- SVN_TEST_ASSERT(SVN_IS_VALID_REVNUM(newrev));
+ SVN_ERR(create_greek_fs(&fs, &newrev, "test-repo-lock-dir-propchange",
+ opts, pool));
/* Become 'bubba' and lock "/A/D/G/rho". */
SVN_ERR(svn_fs_create_access(&access, "bubba", pool));
@@ -645,16 +595,8 @@ lock_expiration(const svn_test_opts_t *o
svn_error_t *err;
struct get_locks_baton_t *get_locks_baton;
- /* Prepare a filesystem and a new txn. */
- SVN_ERR(svn_test__create_fs(&fs, "test-repo-lock-expiration",
- opts, pool));
- SVN_ERR(svn_fs_begin_txn2(&txn, fs, 0, SVN_FS_TXN_CHECK_LOCKS, pool));
- SVN_ERR(svn_fs_txn_root(&txn_root, txn, pool));
-
- /* Create the greek tree and commit it. */
- SVN_ERR(svn_test__create_greek_tree(txn_root, pool));
- SVN_ERR(svn_fs_commit_txn(&conflict, &newrev, txn, pool));
- SVN_TEST_ASSERT(SVN_IS_VALID_REVNUM(newrev));
+ SVN_ERR(create_greek_fs(&fs, &newrev, "test-repo-lock-expiration",
+ opts, pool));
/* Make a new transaction and change rho. */
SVN_ERR(svn_fs_begin_txn2(&txn, fs, newrev, SVN_FS_TXN_CHECK_LOCKS, pool));
@@ -725,23 +667,11 @@ lock_break_steal_refresh(const svn_test_
apr_pool_t *pool)
{
svn_fs_t *fs;
- svn_fs_txn_t *txn;
- svn_fs_root_t *txn_root;
- const char *conflict;
- svn_revnum_t newrev;
svn_fs_access_t *access;
svn_lock_t *mylock, *somelock;
- /* Prepare a filesystem and a new txn. */
- SVN_ERR(svn_test__create_fs(&fs, "test-repo-steal-refresh",
- opts, pool));
- SVN_ERR(svn_fs_begin_txn2(&txn, fs, 0, SVN_FS_TXN_CHECK_LOCKS, pool));
- SVN_ERR(svn_fs_txn_root(&txn_root, txn, pool));
-
- /* Create the greek tree and commit it. */
- SVN_ERR(svn_test__create_greek_tree(txn_root, pool));
- SVN_ERR(svn_fs_commit_txn(&conflict, &newrev, txn, pool));
- SVN_TEST_ASSERT(SVN_IS_VALID_REVNUM(newrev));
+ SVN_ERR(create_greek_fs(&fs, NULL, "test-repo-steal-refresh",
+ opts, pool));
/* Become 'bubba' and lock "/A/D/G/rho". */
SVN_ERR(svn_fs_create_access(&access, "bubba", pool));
@@ -813,16 +743,8 @@ lock_out_of_date(const svn_test_opts_t *
svn_lock_t *mylock;
svn_error_t *err;
- /* Prepare a filesystem and a new txn. */
- SVN_ERR(svn_test__create_fs(&fs, "test-repo-lock-out-of-date",
- opts, pool));
- SVN_ERR(svn_fs_begin_txn2(&txn, fs, 0, SVN_FS_TXN_CHECK_LOCKS, pool));
- SVN_ERR(svn_fs_txn_root(&txn_root, txn, pool));
-
- /* Create the greek tree and commit it. */
- SVN_ERR(svn_test__create_greek_tree(txn_root, pool));
- SVN_ERR(svn_fs_commit_txn(&conflict, &newrev, txn, pool));
- SVN_TEST_ASSERT(SVN_IS_VALID_REVNUM(newrev));
+ SVN_ERR(create_greek_fs(&fs, &newrev, "test-repo-lock-out-of-date",
+ opts, pool));
/* Commit a small change to /A/D/G/rho, creating revision 2. */
SVN_ERR(svn_fs_begin_txn2(&txn, fs, newrev, SVN_FS_TXN_CHECK_LOCKS, pool));
Modified: subversion/branches/master-passphrase/subversion/tests/libsvn_repos/repos-test.c
URL: http://svn.apache.org/viewvc/subversion/branches/master-passphrase/subversion/tests/libsvn_repos/repos-test.c?rev=1354571&r1=1354570&r2=1354571&view=diff
==============================================================================
--- subversion/branches/master-passphrase/subversion/tests/libsvn_repos/repos-test.c (original)
+++ subversion/branches/master-passphrase/subversion/tests/libsvn_repos/repos-test.c Wed Jun 27 15:12:37 2012
@@ -1318,9 +1318,8 @@ authz(apr_pool_t *pool)
contents =
"[greek:/dir2//secret]" NL
"* =" NL;
- err = authz_get_handle(&authz_cfg, contents, subpool);
- SVN_TEST_ASSERT_ERROR(err, SVN_ERR_AUTHZ_INVALID_CONFIG);
- svn_error_clear(err);
+ SVN_TEST_ASSERT_ERROR(authz_get_handle(&authz_cfg, contents, subpool),
+ SVN_ERR_AUTHZ_INVALID_CONFIG);
/* That's a wrap! */
svn_pool_destroy(subpool);
@@ -1480,10 +1479,7 @@ test_path_authz(svn_repos_t *repos,
/* Check for potential errors. */
if (path_action->authz_error_expected)
- {
- SVN_TEST_ASSERT_ERROR(err, SVN_ERR_AUTHZ_UNWRITABLE);
- svn_error_clear(err);
- }
+ SVN_TEST_ASSERT_ERROR(err, SVN_ERR_AUTHZ_UNWRITABLE);
else
SVN_ERR(err);
@@ -2260,7 +2256,7 @@ prop_validation(const svn_test_opts_t *o
{
svn_error_t *err;
svn_repos_t *repos;
- const char non_utf8_string[5] = { 'a', 0xff, 'b', '\n', 0 };
+ const char non_utf8_string[5] = { 'a', (char)0xff, 'b', '\n', 0 };
const char *non_lf_string = "a\r\nb\n\rc\rd\n";
apr_pool_t *subpool = svn_pool_create(pool);
Propchange: subversion/branches/master-passphrase/subversion/tests/libsvn_subr/
------------------------------------------------------------------------------
--- svn:ignore (original)
+++ svn:ignore Wed Jun 27 15:12:37 2012
@@ -36,3 +36,5 @@ auth-test
eol-test
subst_translate-test
spillbuf-test
+named_atomic-test
+named_atomic-proc-test
Modified: subversion/branches/master-passphrase/subversion/tests/libsvn_subr/dirent_uri-test.c
URL: http://svn.apache.org/viewvc/subversion/branches/master-passphrase/subversion/tests/libsvn_subr/dirent_uri-test.c?rev=1354571&r1=1354570&r2=1354571&view=diff
==============================================================================
--- subversion/branches/master-passphrase/subversion/tests/libsvn_subr/dirent_uri-test.c (original)
+++ subversion/branches/master-passphrase/subversion/tests/libsvn_subr/dirent_uri-test.c Wed Jun 27 15:12:37 2012
@@ -882,6 +882,8 @@ static const testcase_canonicalize_t uri
{ "https://SERVER:80/", "https://server:80" },
{ "svn://server:80", "svn://server:80" },
{ "svn://SERVER:443/", "svn://server:443" },
+ { "file:///C%7C/temp/REPOS", "file:///C%7C/temp/REPOS" },
+ { "file:///C|/temp/REPOS", "file:///C%7C/temp/REPOS" },
#ifdef SVN_USE_DOS_PATHS
{ "file:///c:/temp/repos", "file:///C:/temp/repos" },
{ "file:///c:/temp/REPOS", "file:///C:/temp/REPOS" },
@@ -2017,15 +2019,34 @@ test_dirent_condense_targets(apr_pool_t
const char* common;
apr_array_header_t *hdr = apr_array_make(pool, 8, sizeof(const char*));
apr_array_header_t *condensed;
+ svn_boolean_t skip = FALSE;
for (j = 0; j < COUNT_OF(tests[i].paths); j++)
{
if (tests[i].paths[j] != NULL)
- APR_ARRAY_PUSH(hdr, const char*) = tests[i].paths[j];
+ {
+ APR_ARRAY_PUSH(hdr, const char*) = tests[i].paths[j];
+#ifdef SVN_USE_DOS_PATHS
+ /* For tests that are referencing a D: drive, specifically test
+ if such a drive exists on the system. If not, skip the test
+ (svn_dirent_condense_targets will fail, because
+ apr_filepath_merge will produce an APR_EBADPATH error). */
+ if (strncmp(tests[i].paths[j], "D:", 2) == 0
+ && GetDriveType("D:\\") == DRIVE_NO_ROOT_DIR)
+ {
+ /* There is no D: drive, skip this. */
+ skip = TRUE;
+ break;
+ }
+#endif
+ }
else
break;
}
+ if (skip)
+ continue;
+
SVN_ERR(svn_dirent_condense_targets(&common, &condensed, hdr,
FALSE, pool, pool));
Modified: subversion/branches/master-passphrase/subversion/tests/libsvn_subr/mergeinfo-test.c
URL: http://svn.apache.org/viewvc/subversion/branches/master-passphrase/subversion/tests/libsvn_subr/mergeinfo-test.c?rev=1354571&r1=1354570&r2=1354571&view=diff
==============================================================================
--- subversion/branches/master-passphrase/subversion/tests/libsvn_subr/mergeinfo-test.c (original)
+++ subversion/branches/master-passphrase/subversion/tests/libsvn_subr/mergeinfo-test.c Wed Jun 27 15:12:37 2012
@@ -712,7 +712,7 @@ test_merge_mergeinfo(apr_pool_t *pool)
SVN_ERR(svn_mergeinfo_to_string(&info2_starting, info2, pool));
SVN_ERR(svn_mergeinfo_merge(info1, info2, pool));
- if (mergeinfo[i].expected_paths != apr_hash_count(info1))
+ if (mergeinfo[i].expected_paths != (int)apr_hash_count(info1))
return fail(pool, "Wrong number of paths in merged mergeinfo");
/* Check that info2 remained unchanged. */
Modified: subversion/branches/master-passphrase/subversion/tests/libsvn_subr/skel-test.c
URL: http://svn.apache.org/viewvc/subversion/branches/master-passphrase/subversion/tests/libsvn_subr/skel-test.c?rev=1354571&r1=1354570&r2=1354571&view=diff
==============================================================================
--- subversion/branches/master-passphrase/subversion/tests/libsvn_subr/skel-test.c (original)
+++ subversion/branches/master-passphrase/subversion/tests/libsvn_subr/skel-test.c Wed Jun 27 15:12:37 2012
@@ -216,7 +216,7 @@ gen_implicit_length_all_chars(apr_size_t
for (i = 0; i < 256; i++)
if (! skel_is_space( (apr_byte_t)i)
&& ! skel_is_paren( (apr_byte_t)i))
- name[pos++] = i;
+ name[pos++] = (char)i;
*len_p = pos;
return name;
@@ -375,7 +375,7 @@ parse_explicit_length(apr_pool_t *pool)
{
char buf[1];
- buf[0] = i;
+ buf[0] = (char)i;
SVN_ERR(try_explicit_length(buf, 1, 1, pool));
}
}
@@ -386,7 +386,7 @@ parse_explicit_length(apr_pool_t *pool)
char data[256];
for (i = 0; i < 256; i++)
- data[i] = i;
+ data[i] = (char)i;
SVN_ERR(try_explicit_length(data, 256, 256, pool));
}
@@ -592,7 +592,7 @@ parse_list(apr_pool_t *pool)
svn_skel_t *child;
char buf[1];
- buf[0] = atom_byte;
+ buf[0] = (char)atom_byte;
put_list_start(str, (apr_byte_t)sep, sep_count);
for (i = 0; i < list_len; i++)
@@ -619,7 +619,7 @@ parse_list(apr_pool_t *pool)
char data[256];
for (i = 0; i < 256; i++)
- data[i] = i;
+ data[i] = (char)i;
put_list_start(str, (apr_byte_t)sep, sep_count);
for (i = 0; i < list_len; i++)
@@ -797,7 +797,7 @@ unparse_list(apr_pool_t *pool)
for (byte = 0; byte < 256; byte++)
if (skel_is_name( (apr_byte_t)byte))
{
- char buf = byte;
+ char buf = (char)byte;
add(build_atom(1, &buf, pool), list);
}
@@ -858,7 +858,7 @@ unparse_list(apr_pool_t *pool)
val = i * 10 + j;
for (k = 0; k < sizeof(buf); k++)
{
- buf[k] = val;
+ buf[k] = (char)val;
val += j;
}
Propchange: subversion/branches/master-passphrase/subversion/tests/libsvn_subr/spillbuf-test.c
------------------------------------------------------------------------------
svn:eol-style = native
Modified: subversion/branches/master-passphrase/subversion/tests/libsvn_subr/stream-test.c
URL: http://svn.apache.org/viewvc/subversion/branches/master-passphrase/subversion/tests/libsvn_subr/stream-test.c?rev=1354571&r1=1354570&r2=1354571&view=diff
==============================================================================
--- subversion/branches/master-passphrase/subversion/tests/libsvn_subr/stream-test.c (original)
+++ subversion/branches/master-passphrase/subversion/tests/libsvn_subr/stream-test.c Wed Jun 27 15:12:37 2012
@@ -138,7 +138,7 @@ generate_test_bytes(int num_bytes, apr_p
{
if (c == 127)
repeat++;
- c = (c + 1) % 127;
+ c = (char)((c + 1) % 127);
repeat_iter = repeat;
}
}
Modified: subversion/branches/master-passphrase/subversion/tests/libsvn_subr/string-test.c
URL: http://svn.apache.org/viewvc/subversion/branches/master-passphrase/subversion/tests/libsvn_subr/string-test.c?rev=1354571&r1=1354570&r2=1354571&view=diff
==============================================================================
--- subversion/branches/master-passphrase/subversion/tests/libsvn_subr/string-test.c (original)
+++ subversion/branches/master-passphrase/subversion/tests/libsvn_subr/string-test.c Wed Jun 27 15:12:37 2012
@@ -39,7 +39,7 @@
#include "svn_io.h"
#include "svn_error.h"
#include "svn_string.h" /* This includes <apr_*.h> */
-
+#include "private/svn_string_private.h"
/* A quick way to create error messages. */
static svn_error_t *
@@ -511,6 +511,35 @@ test23(apr_pool_t *pool)
return test_stringbuf_unequal("abc", "abb", pool);
}
+static svn_error_t *
+test24(apr_pool_t *pool)
+{
+ char buffer[SVN_INT64_BUFFER_SIZE];
+ apr_size_t length;
+
+ length = svn__i64toa(buffer, 0);
+ SVN_TEST_ASSERT(length == 1);
+ SVN_TEST_STRING_ASSERT(buffer, "0");
+
+ length = svn__i64toa(buffer, 0x8000000000000000ll);
+ SVN_TEST_ASSERT(length == 20);
+ SVN_TEST_STRING_ASSERT(buffer, "-9223372036854775808");
+
+ length = svn__i64toa(buffer, 0x7fffffffffffffffll);
+ SVN_TEST_ASSERT(length == 19);
+ SVN_TEST_STRING_ASSERT(buffer, "9223372036854775807");
+
+ length = svn__ui64toa(buffer, 0ull);
+ SVN_TEST_ASSERT(length == 1);
+ SVN_TEST_STRING_ASSERT(buffer, "0");
+
+ length = svn__ui64toa(buffer, 0xffffffffffffffffull);
+ SVN_TEST_ASSERT(length == 20);
+ SVN_TEST_STRING_ASSERT(buffer, "18446744073709551615");
+
+ return test_stringbuf_unequal("abc", "abb", pool);
+}
+
/*
====================================================================
If you add a new test to this file, update this array.
@@ -568,5 +597,7 @@ struct svn_test_descriptor_t test_funcs[
"compare stringbufs; different lengths"),
SVN_TEST_PASS2(test23,
"compare stringbufs; same length, different content"),
+ SVN_TEST_PASS2(test24,
+ "verify i64toa"),
SVN_TEST_NULL
};
Modified: subversion/branches/master-passphrase/subversion/tests/libsvn_subr/utf-test.c
URL: http://svn.apache.org/viewvc/subversion/branches/master-passphrase/subversion/tests/libsvn_subr/utf-test.c?rev=1354571&r1=1354570&r2=1354571&view=diff
==============================================================================
--- subversion/branches/master-passphrase/subversion/tests/libsvn_subr/utf-test.c (original)
+++ subversion/branches/master-passphrase/subversion/tests/libsvn_subr/utf-test.c Wed Jun 27 15:12:37 2012
@@ -197,7 +197,7 @@ utf_validate2(apr_pool_t *pool)
/* A random string; experiment shows that it's occasionally (less
than 1%) valid but usually invalid. */
for (j = 0; j < sizeof(str) - 1; ++j)
- str[j] = range_rand(0, 255);
+ str[j] = (char)range_rand(0, 255);
str[sizeof(str) - 1] = 0;
len = strlen(str);
Propchange: subversion/branches/master-passphrase/subversion/tests/libsvn_wc/
------------------------------------------------------------------------------
--- svn:ignore (original)
+++ svn:ignore Wed Jun 27 15:12:37 2012
@@ -9,3 +9,4 @@ entries-compat-test
op-depth-test
wc-lock-tester
wc-incomplete-tester
+wc-queries-test