You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@subversion.apache.org by st...@apache.org on 2010/12/02 21:55:18 UTC
svn commit: r1041580 [34/35] - in
/subversion/branches/gpg-agent-password-store: ./ build/ build/ac-macros/
build/generator/ build/generator/templates/ build/win32/
contrib/hook-scripts/ contrib/server-side/ notes/http-and-webdav/
notes/wc-ng/ subversi...
Modified: subversion/branches/gpg-agent-password-store/subversion/tests/libsvn_wc/entries-compat.c
URL: http://svn.apache.org/viewvc/subversion/branches/gpg-agent-password-store/subversion/tests/libsvn_wc/entries-compat.c?rev=1041580&r1=1041579&r2=1041580&view=diff
==============================================================================
--- subversion/branches/gpg-agent-password-store/subversion/tests/libsvn_wc/entries-compat.c (original)
+++ subversion/branches/gpg-agent-password-store/subversion/tests/libsvn_wc/entries-compat.c Thu Dec 2 20:55:08 2010
@@ -75,7 +75,8 @@
#define MD5_1 "2d18c5e57e84c5b8a5e9a6e13fa394dc"
#define MD5_2 "5d41402abc4b2a76b9719d911017c592"
-#define I_TC_DATA "((conflict F file update edited deleted (version 22 " ROOT_ONE " 1 2 branch1/ft/F none) (version 22 " ROOT_ONE " 1 3 branch1/ft/F file)) (conflict G file update edited deleted (version 22 " ROOT_ONE " 1 2 branch1/ft/F none) (version 22 " ROOT_ONE " 1 3 branch1/ft/F file)) )"
+#define F_TC_DATA "(conflict F file update edited deleted (version 22 " ROOT_ONE " 1 2 branch1/ft/F none) (version 22 " ROOT_ONE " 1 3 branch1/ft/F file))"
+#define G_TC_DATA "(conflict G file update edited deleted (version 22 " ROOT_ONE " 1 2 branch1/ft/F none) (version 22 " ROOT_ONE " 1 3 branch1/ft/F file))"
static const char * const TESTING_DATA = (
/* Load our test data.
@@ -87,415 +88,197 @@ static const char * const TESTING_DATA =
"insert into repository values (2, '" ROOT_TWO "', '" UUID_TWO "'); "
"insert into wcroot values (1, null); "
- /* ### The file_externals column in BASE_NODE is temporary, and will be
+ /* ### The file_externals column in NODES is temporary, and will be
### removed. However, to keep the tests passing, we need to add it
### to the following insert statements. *Be sure to remove it*. */
-#ifndef SVN_WC__NODES_ONLY
- "insert into base_node values ("
- " 1, '', 1, '', null, 'normal', 'dir', "
- " 1, null, null, "
- " 1, " TIME_1s ", '" AUTHOR_1 "', 'infinity', null, null, '()', null, 0, "
- " null); "
- "insert into base_node values ("
- " 1, 'A', null, null, '', 'normal', 'file', "
- " 1, '$md5 $" MD5_1 "', 10, "
- " 1, " TIME_1s ", '" AUTHOR_1 "', null, null, null, '()', null, null, "
- " null); "
- "insert into base_node values ("
- " 1, 'B', null, null, '', 'excluded', 'symlink', "
- " null, null, null, "
- " null, null, null, null, null, null, null, null, null, null); "
- "insert into base_node values ("
- " 1, 'C', null, null, '', 'absent', 'unknown', "
- " null, null, null, "
- " null, null, null, null, null, null, null, null, null, null); "
- "insert into base_node values ("
- " 1, 'D', null, null, '', 'not-present', 'unknown', "
- " null, null, null, "
- " null, null, null, null, null, null, null, null, null, null); "
- "insert into base_node values ("
- " 1, 'E', null, null, '', 'incomplete', 'unknown', "
- " null, null, null, "
- " null, null, null, null, null, null, null, null, null, null); "
- "insert into base_node values ("
- " 1, 'F', null, null, '', 'normal', 'file', "
- " 1, '$md5 $" MD5_1 "', 15, "
- " 1, " TIME_1s ", '" AUTHOR_1 "', null, null, null, '()', null, null, "
- " null); "
- "insert into base_node values ("
- " 1, 'G', 2, 'G-alt', '', 'normal', 'file', "
- " 1, '$md5 $" MD5_1 "', 15, "
- " 2, " TIME_2s ", '" AUTHOR_2 "', null, null, null, '()', null, null, "
- " null); "
- "insert into base_node values ("
- " 1, 'H', null, null, '', 'normal', 'symlink', "
- " 1, null, null, "
- " 1, " TIME_1s ", '" AUTHOR_1 "', null, 'H-target', null, '()', null, "
- " null, null); "
- "insert into base_node values ("
- " 1, 'I', null, null, '', 'normal', 'dir', "
- " 1, null, null, "
- " 1, " TIME_1s ", '" AUTHOR_1 "', null, null, null, '()', null, null, "
- " null); "
- "insert into base_node values ("
- " 1, 'J', null, null, '', 'normal', 'dir', "
- " 1, null, null, "
- " 1, " TIME_1s ", '" AUTHOR_1 "', null, null, null, '()', null, null, "
- " null); "
- "insert into base_node values ("
- " 1, 'J/J-e', null, null, 'J', 'normal', 'dir', "
- " 1, null, null, "
- " 1, " TIME_1s ", '" AUTHOR_1 "', null, null, null, '()', null, null, "
- " null); "
- "insert into base_node values ("
- " 1, 'J/J-e/J-e-a', null, null, 'J/J-e', 'normal', 'file', "
- " 1, '$md5 $" MD5_1 "', 15, "
- " 1, " TIME_1s ", '" AUTHOR_1 "', null, null, null, '()', null, null, "
- " null); "
- "insert into base_node values ("
- " 1, 'J/J-e/J-e-b', null, null, 'J/J-e', 'normal', 'dir', "
- " 1, null, null, "
- " 1, " TIME_1s ", '" AUTHOR_1 "', null, null, null, '()', null, null, "
- " null); "
- "insert into base_node values ("
- " 1, 'J/J-e/J-e-b/Jeba', null, null, 'J/J-e/J-e-b', 'normal', 'file', "
- " 1, '$md5 $" MD5_1 "', 15, "
- " 1, " TIME_1s ", '" AUTHOR_1 "', null, null, null, '()', null, null, "
- " null); "
- "insert into base_node values ("
- " 1, 'J/J-f', null, null, 'J', 'normal', 'dir', "
- " 1, null, null, "
- " 1, " TIME_1s ", '" AUTHOR_1 "', null, null, null, '()', null, null, "
- " null); "
- "insert into base_node values ("
- " 1, 'J/J-f/J-f-a', null, null, 'J/J-f', 'normal', 'dir', "
- " 1, null, null, "
- " 1, " TIME_1s ", '" AUTHOR_1 "', null, null, null, '()', null, null, "
- " null); "
- "insert into base_node values ("
- " 1, 'K', null, null, '', 'normal', 'dir', "
- " 1, null, null, "
- " 1, " TIME_1s ", '" AUTHOR_1 "', null, null, null, '()', null, null, "
- " null); "
- "insert into base_node values ("
- " 1, 'K/K-a', null, null, 'K', 'normal', 'file', "
- " 1, '$md5 $" MD5_1 "', 15, "
- " 1, " TIME_1s ", '" AUTHOR_1 "', null, null, null, '()', null, null, "
- " null); "
- "insert into base_node values ("
- " 1, 'K/K-b', null, null, 'K', 'normal', 'file', "
- " 1, '$md5 $" MD5_1 "', 15, "
- " 1, " TIME_1s ", '" AUTHOR_1 "', null, null, null, '()', null, null, "
- " null); "
- " "
-#endif
-#ifdef SVN_WC__NODES
+
/* load the base nodes into the nodes table */
"insert into nodes values ("
- " 1, '', 0, null, 1, '', 1, 'normal', 'infinity',"
- " null, null, 'dir', 1, " TIME_1s ", '" AUTHOR_1 "', null,"
- " '()', null, null, null, null, null);"
- "insert into nodes values ("
- " 1, 'A', 0, '', null, null, 1, 'normal', null,"
- " null, null, 'file', 1, " TIME_1s ", '" AUTHOR_1 "', '$md5 $" MD5_1 "',"
- " '()', 10, null, null, null, null);"
- "insert into nodes values ("
- " 1, 'B', 0, '', null, null, null, 'excluded', null,"
- " null, null, 'symlink', null, null, null, null,"
- " null, null, null, null, null, null);"
- "insert into nodes values ("
- " 1, 'C', 0, '', null, null, null, 'absent', null,"
- " null, null, 'unknown', null, null, null, null,"
- " null, null, null, null, null, null);"
- "insert into nodes values ("
- " 1, 'D', 0, '', null, null, null, 'not-present', null,"
- " null, null, 'unknown', null, null, null, null,"
- " null, null, null, null, null, null);"
- "insert into nodes values ("
- " 1, 'E', 0, '', null, null, null, 'incomplete', null,"
- " null, null, 'unknown', null, null, null, null,"
- " null, null, null, null, null, null);"
- "insert into nodes values ("
- " 1, 'F', 0, '', null, null, 1, 'normal', null,"
- " null, null, 'file', 1, " TIME_1s ", '" AUTHOR_1 "', '$md5 $" MD5_1 "',"
- " '()', 15, null, null, null, null);"
- "insert into nodes values ("
- " 1, 'G', 0, '', 2, 'G-alt', 1, 'normal', null,"
- " null, null, 'file', 2, " TIME_2s ", '" AUTHOR_2 "', '$md5 $" MD5_1 "',"
- " '()', 15, null, null, null, null);"
- "insert into nodes values ("
- " 1, 'H', 0, '', null, null, 1, 'normal', null,"
- " null, null, 'symlink', 1, " TIME_1s ", '" AUTHOR_1 "', null,"
- " '()', null, null, null, 'H-target', null);"
- "insert into nodes values ("
- " 1, 'I', 0, '', null, null, 1, 'normal', null,"
- " null, null, 'dir', 1, " TIME_1s ", '" AUTHOR_1 "', null,"
- " '()', null, null, null, null, null);"
- "insert into nodes values ("
- " 1, 'J', 0, '', null, null, 1, 'normal', null,"
- " null, null, 'dir', 1, " TIME_1s ", '" AUTHOR_1 "', null,"
- " '()', null, null, null, null, null);"
- "insert into nodes values ("
- " 1, 'J/J-e', 0, 'J', null, null, 1, 'normal', null,"
- " null, null, 'dir', 1, " TIME_1s ", '" AUTHOR_1 "', null,"
- " '()', null, null, null, null, null);"
- "insert into nodes values ("
- " 1, 'J/J-e/J-e-a', 0, 'J/J-e', null, null, 1, 'normal', null,"
- " null, null, 'file', 1, " TIME_1s ", '" AUTHOR_1 "', '$md5 $" MD5_1 "',"
- " '()', 15, null, null, null, null);"
- "insert into nodes values ("
- " 1, 'J/J-e/J-e-b', 0, 'J/J-e', null, null, 1, 'normal', null,"
- " null, null, 'dir', 1, " TIME_1s ", '" AUTHOR_1 "', null,"
- " '()', null, null, null, null, null);"
- "insert into nodes values ("
- " 1, 'J/J-e/J-e-b/Jeba', 0, 'J/J-e/J-e-b', null, null, 1, 'normal', null,"
- " null, null, 'file', 1, " TIME_1s ", '" AUTHOR_1 "', '$md5 $" MD5_1 "',"
- " '()', 15, null, null, null, null);"
- "insert into nodes values ("
- " 1, 'J/J-f', 0, 'J', null, null, 1, 'normal', null,"
- " null, null, 'dir', 1, " TIME_1s ", '" AUTHOR_1 "', null,"
- " '()', null, null, null, null, null);"
- "insert into nodes values ("
- " 1, 'J/J-f/J-f-a', 0, 'J/J-f', null, null, 1, 'normal', null,"
- " null, null, 'dir', 1, " TIME_1s ", '" AUTHOR_1 "', null,"
- " '()', null, null, null, null, null);"
- "insert into nodes values ("
- " 1, 'K', 0, '', null, null, 1, 'normal', null,"
- " null, null, 'dir', 1, " TIME_1s ", '" AUTHOR_1 "', null,"
- " '()', null, null, null, null, null);"
- "insert into nodes values ("
- " 1, 'K/K-a', 0, 'K', null, null, 1, 'normal', null,"
- " null, null, 'file', 1, " TIME_1s ", '" AUTHOR_1 "', '$md5 $" MD5_1 "',"
- " '()', 15, null, null, null, null);"
- "insert into nodes values ("
- " 1, 'K/K-b', 0, 'K', null, null, 1, 'normal', null,"
- " null, null, 'file', 1, " TIME_1s ", '" AUTHOR_1 "', '$md5 $" MD5_1 "',"
- " '()', 15, null, null, null, null);"
+ " 1, '', 0, null, 1, '', 1, 'normal',"
+ " null, null, 'dir', '()', 'infinity', null, null, 1, " TIME_1s ", '" AUTHOR_1 "',"
+ " null, null, null, null);"
+ "insert into nodes values ("
+ " 1, 'A', 0, '', 1, 'A', 1, 'normal',"
+ " null, null, 'file', '()', null, '$md5 $" MD5_1 "', null, 1, " TIME_1s ", '" AUTHOR_1 "',"
+ " 10, null, null, null);"
+ "insert into nodes values ("
+ " 1, 'B', 0, '', 1, 'B', null, 'excluded',"
+ " null, null, 'symlink', null, null, null, null, null, null, null,"
+ " null, null, null, null);"
+ "insert into nodes values ("
+ " 1, 'C', 0, '', 1, 'C', null, 'absent',"
+ " null, null, 'unknown', null, null, null, null, null, null, null,"
+ " null, null, null, null);"
+ "insert into nodes values ("
+ " 1, 'D', 0, '', 1, 'D', null, 'not-present',"
+ " null, null, 'unknown', null, null, null, null, null, null, null,"
+ " null, null, null, null);"
+ "insert into nodes values ("
+ " 1, 'E', 0, '', 1, 'E', null, 'incomplete',"
+ " null, null, 'unknown', null, null, null, null, null, null, null,"
+ " null, null, null, null);"
+ "insert into nodes values ("
+ " 1, 'F', 0, '', 1, 'F', 1, 'normal',"
+ " null, null, 'file', '()', null, '$md5 $" MD5_1 "', null, 1, " TIME_1s ", '" AUTHOR_1 "',"
+ " 15, null, null, null);"
+ "insert into nodes values ("
+ " 1, 'G', 0, '', 2, 'G-alt', 1, 'normal',"
+ " null, null, 'file', '()', null, '$md5 $" MD5_1 "', null, 2, " TIME_2s ", '" AUTHOR_2 "',"
+ " 15, null, null, null);"
+ "insert into nodes values ("
+ " 1, 'H', 0, '', 1, 'H', 1, 'normal',"
+ " null, null, 'symlink', '()', null, null, 'H-target', 1, " TIME_1s ", '" AUTHOR_1 "',"
+ " null, null, null, null);"
+ "insert into nodes values ("
+ " 1, 'I', 0, '', 1, 'I', 1, 'normal',"
+ " null, null, 'dir', '()', null, null, null, 1, " TIME_1s ", '" AUTHOR_1 "',"
+ " null, null, null, null);"
+ "insert into nodes values ("
+ " 1, 'J', 0, '', 1, 'J', 1, 'normal',"
+ " null, null, 'dir', '()', null, null, null, 1, " TIME_1s ", '" AUTHOR_1 "',"
+ " null, null, null, null);"
+ "insert into nodes values ("
+ " 1, 'J/J-e', 0, 'J', 1, 'J/J-e', 1, 'normal',"
+ " null, null, 'dir', '()', null, null, null, 1, " TIME_1s ", '" AUTHOR_1 "',"
+ " null, null, null, null);"
+ "insert into nodes values ("
+ " 1, 'J/J-e/J-e-a', 0, 'J/J-e', 1, 'J/J-e/J-e-a', 1, 'normal',"
+ " null, null, 'file', '()', null, '$md5 $" MD5_1 "', null, 1, " TIME_1s ", '" AUTHOR_1 "',"
+ " 15, null, null, null);"
+ "insert into nodes values ("
+ " 1, 'J/J-e/J-e-b', 0, 'J/J-e', 1, 'J/J-e/J-e-b', 1, 'normal',"
+ " null, null, 'dir', '()', null, null, null, 1, " TIME_1s ", '" AUTHOR_1 "',"
+ " null, null, null, null);"
+ "insert into nodes values ("
+ " 1, 'J/J-e/J-e-b/Jeba', 0, 'J/J-e/J-e-b', 1, 'J/J-e/J-e-b/Jeba', 1, 'normal',"
+ " null, null, 'file', '()', null, '$md5 $" MD5_1 "', null, 1, " TIME_1s ", '" AUTHOR_1 "',"
+ " 15, null, null, null);"
+ "insert into nodes values ("
+ " 1, 'J/J-f', 0, 'J', 1, 'J/J-f', 1, 'normal',"
+ " null, null, 'dir', '()', null, null, null, 1, " TIME_1s ", '" AUTHOR_1 "',"
+ " null, null, null, null);"
+ "insert into nodes values ("
+ " 1, 'J/J-f/J-f-a', 0, 'J/J-f', 1, 'J/J-f/J-f-a', 1, 'normal',"
+ " null, null, 'dir', '()', null, null, null, 1, " TIME_1s ", '" AUTHOR_1 "',"
+ " null, null, null, null);"
+ "insert into nodes values ("
+ " 1, 'K', 0, '', 1, 'K', 1, 'normal',"
+ " null, null, 'dir', '()', null, null, null, 1, " TIME_1s ", '" AUTHOR_1 "',"
+ " null, null, null, null);"
+ "insert into nodes values ("
+ " 1, 'K/K-a', 0, 'K', 1, 'K/K-a', 1, 'normal',"
+ " null, null, 'file', '()', null, '$md5 $" MD5_1 "', null, 1, " TIME_1s ", '" AUTHOR_1 "',"
+ " 15, null, null, null);"
+ "insert into nodes values ("
+ " 1, 'K/K-b', 0, 'K', 1, 'K/K-b', 1, 'normal',"
+ " null, null, 'file', '()', null, '$md5 $" MD5_1 "', null, 1, " TIME_1s ", '" AUTHOR_1 "',"
+ " 15, null, null, null);"
""
-#endif
-#ifndef SVN_WC__NODES_ONLY
- "insert into working_node values ("
- " 1, 'I', '', 'normal', 'dir', "
- " null, null, "
- " 2, " TIME_2s ", '" AUTHOR_2 "', 'immediates', null, "
- " 2, 'some/dir', 2, 0, null, null, '()', 0); "
- "insert into working_node values ("
- " 1, 'J', '', 'normal', 'dir', "
- " null, null, "
- " null, null, null, 'immediates', null, "
- " null, null, null, 0, null, null, '()', 0); "
- "insert into working_node values ("
- " 1, 'J/J-a', 'J', 'normal', 'file', "
- " null, null, "
- " null, null, null, null, null, "
- " null, null, null, 0, null, null, '()', 0); "
- "insert into working_node values ("
- " 1, 'J/J-b', 'J', 'normal', 'dir', "
- " null, null, "
- " 2, " TIME_2s ", '" AUTHOR_2 "', 'infinity', null, "
- " 2, 'some/dir', 2, 0, null, null, '()', 0); "
- "insert into working_node values ("
- " 1, 'J/J-b/J-b-a', 'J/J-b', 'normal', 'dir', "
- " null, null, "
- " 2, " TIME_2s ", '" AUTHOR_2 "', 'infinity', null, "
- " 2, 'another/dir', 2, 0, null, null, '()', 0); "
- "insert into working_node values ("
- " 1, 'J/J-b/J-b-b', 'J/J-b', 'normal', 'file', "
- " null, null, "
- " null, null, null, null, null, "
- " null, null, null, 0, null, null, '()', 0); "
- "insert into working_node values ("
- " 1, 'J/J-c', 'J', 'not-present', 'dir', "
- " null, null, "
- " null, null, null, null, null, "
- " null, null, null, 0, null, null, '()', 0); "
- "insert into working_node values ("
- " 1, 'J/J-c/J-c-a', 'J/J-c', 'not-present', 'dir', "
- " null, null, "
- " null, null, null, null, null, "
- " null, null, null, 0, null, null, '()', 0); "
- "insert into working_node values ("
- " 1, 'J/J-d', 'J', 'normal', 'file', "
- " '$md5 $" MD5_1 "', 10, "
- " 2, " TIME_2s ", '" AUTHOR_2 "', null, null, "
- " 2, 'moved/file', 2, 1, null, null, '()', 0); "
- "insert into working_node values ("
- " 1, 'J/J-e', 'J', 'not-present', 'dir', "
- " null, null, "
- " null, null, null, null, null, "
- " null, null, null, 0, 'other/place', null, '()', 0); "
- "insert into working_node values ("
- " 1, 'J/J-e/J-e-a', 'J/J-e', 'not-present', 'file', "
- " null, null, "
- " null, null, null, null, null, "
- " null, null, null, 0, null, null, '()', 0); "
- "insert into working_node values ("
- " 1, 'J/J-e/J-e-b', 'J/J-e', 'not-present', 'dir', "
- " null, null, "
- " null, null, null, null, null, "
- " null, null, null, 0, null, null, '()', 0); "
- "insert into working_node values ("
- " 1, 'J/J-e/J-e-b/Jeba', 'J/J-e/J-e-b', 'base-deleted', 'file', "
- " null, null, "
- " null, null, null, null, null, "
- " null, null, null, 0, null, null, '()', 0); "
- "insert into working_node values ("
- " 1, 'J/J-f', 'J', 'normal', 'dir', "
- " null, null, "
- " null, null, null, 'immediates', null, "
- " null, null, null, 0, null, null, '()', 0); "
- "insert into working_node values ("
- " 1, 'J/J-f/J-f-a', 'J/J-f', 'base-deleted', 'dir', "
- " null, null, "
- " null, null, null, 'immediates', null, "
- " null, null, null, 0, null, null, '()', 0); "
- "insert into working_node values ("
- " 1, 'K', '', 'base-deleted', 'dir', "
- " null, null, "
- " null, null, null, null, null, "
- " null, null, null, 0, null, null, '()', 0); "
- "insert into working_node values ("
- " 1, 'K/K-a', 'K', 'base-deleted', 'file', "
- " null, null, "
- " null, null, null, null, null, "
- " null, null, null, 0, null, null, '()', 0); "
- "insert into working_node values ("
- " 1, 'K/K-b', 'K', 'base-deleted', 'file', "
- " null, null, "
- " null, null, null, null, null, "
- " null, null, null, 0, 'moved/away', null, '()', 0); "
- "insert into working_node values ("
- " 1, 'L', '', 'normal', 'dir', "
- " null, null, "
- " null, null, null, 'immediates', null, "
- " null, null, null, 0, null, null, '()', 0); "
- "insert into working_node values ("
- " 1, 'L/L-a', 'L', 'not-present', 'dir', "
- " null, null, "
- " null, null, null, 'immediates', null, "
- " null, null, null, 0, null, null, '()', 0); "
- "insert into working_node values ("
- " 1, 'L/L-a/L-a-a', 'L', 'not-present', 'dir', "
- " null, null, "
- " null, null, null, 'immediates', null, "
- " null, null, null, 0, null, null, '()', 0); "
- " "
-#endif
-#ifdef SVN_WC__NODES
/* Load data into NODES table;
### op_depths have not been calculated by me yet;
the value 1 is just 'good enough' to make the nodes WORKING nodes. */
"insert into nodes values ("
- " 1, 'I', 1, '', 2, 'some/dir', 2, 'normal', 'immediates',"
- " 0, null, 'dir', 2, " TIME_2s ", '" AUTHOR_2 "', null, '()',"
- " null, null, null, null, null);"
- "insert into nodes values ("
- " 1, 'J', 1, '', null, null, null, 'normal', 'immediates',"
- " 0, null, 'dir', null, null, null, null, '()',"
- " null, null, null, null, null);"
- "insert into nodes values ("
- " 1, 'J/J-a', 1, 'J', null, null, null, 'normal', null,"
- " 0, null, 'file', null, null, null, null, '()',"
- " null, null, null, null, null);"
- "insert into nodes values ("
- " 1, 'J/J-b', 1, 'J', 2, 'some/dir', 2, 'normal', 'infinity',"
- " 0, null, 'dir', 2, " TIME_2s ", '" AUTHOR_2 "', null, '()',"
- " null, null, null, null, null);"
- "insert into nodes values ("
- " 1, 'J/J-b/J-b-a', 1, 'J/J-b', 2, 'another/dir', 2, 'normal', 'infinity',"
- " 0, null, 'dir', 2, " TIME_2s ", '" AUTHOR_2 "', null, '()',"
- " null, null, null, null, null);"
- "insert into nodes values ("
- " 1, 'J/J-b/J-b-b', 1, 'J/J-b', null, null, null, 'normal', null,"
- " 0, null, 'file', null, null, null, null, '()',"
- " null, null, null, null, null);"
- "insert into nodes values ("
- " 1, 'J/J-c', 1, 'J', null, null, null, 'not-present', null,"
- " 0, null, 'dir', null, null, null, null, '()',"
- " null, null, null, null, null);"
- "insert into nodes values ("
- " 1, 'J/J-c/J-c-a', 1, 'J/J-c', null, null, null, 'not-present', null,"
- " 0, null, 'dir', null, null, null, null, '()',"
- " null, null, null, null, null);"
- "insert into nodes values ("
- " 1, 'J/J-d', 1, 'J', 2, 'moved/file', 2, 'normal', null,"
- " 1, null, 'file', 2, " TIME_2s ", '" AUTHOR_2 "', '$md5 $ " MD5_1 " ',"
- " '()', 10, null, null, null, null);"
- "insert into nodes values ("
- " 1, 'J/J-e', 1, 'J', null, null, null, 'not-present', null,"
- " 0, 'other/place', 'dir', null, null, null, null, '()',"
- " null, null, null, null, null);"
- "insert into nodes values ("
- " 1, 'J/J-e/J-e-a', 1, 'J/J-e', null, null, null, 'not-present', null,"
- " 0, null, 'file', null, null, null, null, '()',"
- " null, null, null, null, null);"
+ " 1, 'I', 1, '', 2, 'some/dir', 2, 'normal',"
+ " 0, null, 'dir', '()', 'immediates', null, null, 2, " TIME_2s ", '" AUTHOR_2 "',"
+ " null, null, null, null);"
+ "insert into nodes values ("
+ " 1, 'J', 1, '', null, null, null, 'normal',"
+ " 0, null, 'dir', '()', 'immediates', null, null, null, null, null,"
+ " null, null, null, null);"
+ "insert into nodes values ("
+ " 1, 'J/J-a', 1, 'J', null, null, null, 'normal',"
+ " 0, null, 'file', '()', null, null, null, null, null, null,"
+ " null, null, null, null);"
+ "insert into nodes values ("
+ " 1, 'J/J-b', 1, 'J', 2, 'some/dir', 2, 'normal',"
+ " 0, null, 'dir', '()', 'infinity', null, null, 2, " TIME_2s ", '" AUTHOR_2 "',"
+ " null, null, null, null);"
+ "insert into nodes values ("
+ " 1, 'J/J-b/J-b-a', 1, 'J/J-b', 2, 'another/dir', 2, 'normal',"
+ " 0, null, 'dir', '()', 'infinity', null, null, 2, " TIME_2s ", '" AUTHOR_2 "',"
+ " null, null, null, null);"
+ "insert into nodes values ("
+ " 1, 'J/J-b/J-b-b', 1, 'J/J-b', null, null, null, 'normal',"
+ " 0, null, 'file', '()', null, null, null, null, null, null,"
+ " null, null, null, null);"
+ "insert into nodes values ("
+ " 1, 'J/J-c', 1, 'J', null, null, null, 'not-present',"
+ " 0, null, 'dir', '()', null, null, null, null, null, null,"
+ " null, null, null, null);"
+ "insert into nodes values ("
+ " 1, 'J/J-c/J-c-a', 1, 'J/J-c', null, null, null, 'not-present',"
+ " 0, null, 'dir', '()', null, null, null, null, null, null,"
+ " null, null, null, null);"
+ "insert into nodes values ("
+ " 1, 'J/J-d', 1, 'J', 2, 'moved/file', 2, 'normal',"
+ " 1, null, 'file', '()', null, '$md5 $" MD5_1 "', null, 2, " TIME_2s ", '" AUTHOR_2 "',"
+ " 10, null, null, null);"
+ "insert into nodes values ("
+ " 1, 'J/J-e', 1, 'J', null, null, null, 'not-present',"
+ " 0, 'other/place', 'dir', '()', null, null, null, null, null, null,"
+ " null, null, null, null);"
+ "insert into nodes values ("
+ " 1, 'J/J-e/J-e-a', 1, 'J/J-e', null, null, null, 'not-present',"
+ " 0, null, 'file', '()', null, null, null, null, null, null,"
+ " null, null, null, null);"
"insert into nodes values ("
" 1, 'J/J-e/J-e-b', 1, 'J/J-e', null, null, null, 'not-present',"
- " null, 0, null, 'dir', null, null, null, null, '()',"
- " null, null, null, null, null);"
+ " 0, null, 'dir', '()', null, null, null, null, null, null,"
+ " null, null, null, null);"
"insert into nodes values ("
" 1, 'J/J-e/J-e-b/Jeba', 1, 'J/J-e/J-e-b', null, null, null, 'base-deleted',"
- " null, 0, null, 'file', null, null, null, null, '()',"
- " null, null, null, null, null);"
+ " 0, null, 'file', '()', null, null, null, null, null, null,"
+ " null, null, null, null);"
"insert into nodes values ("
- " 1, 'J/J-f', 1, 'J', null, null, null, 'normal', 'immediates',"
- " 0, null, 'dir', null, null, null, null, '()',"
- " null, null, null, null, null);"
+ " 1, 'J/J-f', 1, 'J', null, null, null, 'normal',"
+ " 0, null, 'dir', '()', 'immediates', null, null, null, null, null,"
+ " null, null, null, null);"
"insert into nodes values ("
" 1, 'J/J-f/J-f-a', 1, 'J/J-f', null, null, null, 'base-deleted',"
- " 'immediates', 0, null, 'dir', null, null, null, null, '()',"
- " null, null, null, null, null);"
+ " 0, null, 'dir', '()', 'immediates', null, null, null, null, null,"
+ " null, null, null, null);"
"insert into nodes values ("
- " 1, 'K', 1, '', null, null, null, 'base-deleted', null,"
- " 0, null, 'dir', null, null, null, null, '()',"
- " null, null, null, null, null);"
- "insert into nodes values ("
- " 1, 'K/K-a', 1, 'K', null, null, null, 'base-deleted', null,"
- " 0, null, 'file', null, null, null, null, '()',"
- " null, null, null, null, null);"
- "insert into nodes values ("
- " 1, 'K/K-b', 1, 'K', null, null, null, 'base-deleted', null,"
- " 0, 'moved/away', 'file', null, null, null, null, '()',"
- " null, null, null, null, null);"
- "insert into nodes values ("
- " 1, 'L', 1, '', null, null, null, 'normal', 'immediates',"
- " 0, null, 'dir', null, null, null, null, '()',"
- " null, null, null, null, null);"
- "insert into nodes values ("
- " 1, 'L/L-a', 1, 'L', null, null, null, 'not-present', 'immediates',"
- " 0, null, 'dir', null, null, null, null, '()',"
- " null, null, null, null, null);"
- "insert into nodes values ("
- " 1, 'L/L-a/L-a-a', 1, 'L', null, null, null, 'not-present', 'immediates',"
- " 0, null, 'dir', null, null, null, null, '()',"
- " null, null, null, null, null);"
-#endif
+ " 1, 'K', 1, '', null, null, null, 'base-deleted',"
+ " 0, null, 'dir', '()', null, null, null, null, null, null,"
+ " null, null, null, null);"
+ "insert into nodes values ("
+ " 1, 'K/K-a', 1, 'K', null, null, null, 'base-deleted',"
+ " 0, null, 'file', '()', null, null, null, null, null, null,"
+ " null, null, null, null);"
+ "insert into nodes values ("
+ " 1, 'K/K-b', 1, 'K', null, null, null, 'base-deleted',"
+ " 0, 'moved/away', 'file', '()', null, null, null, null, null, null,"
+ " null, null, null, null);"
+ "insert into nodes values ("
+ " 1, 'L', 1, '', null, null, null, 'normal',"
+ " 0, null, 'dir', '()', 'immediates', null, null, null, null, null,"
+ " null, null, null, null);"
+ "insert into nodes values ("
+ " 1, 'L/L-a', 1, 'L', null, null, null, 'not-present',"
+ " 0, null, 'dir', '()', 'immediates', null, null, null, null, null,"
+ " null, null, null, null);"
+ "insert into nodes values ("
+ " 1, 'L/L-a/L-a-a', 1, 'L', null, null, null, 'not-present',"
+ " 0, null, 'dir', '()', 'immediates', null, null, null, null, null,"
+ " null, null, null, null);"
"insert into actual_node values ("
" 1, 'I', '', null, null, null, null, null, 'changelist', null, "
- "'" I_TC_DATA "', null, null, null, null);"
+ " null, null, null, null, null);"
+ "insert into actual_node values ("
+ " 1, 'F', '', null, null, null, null, null, null, null, "
+ " '" F_TC_DATA "', null, null, null, null);"
+ "insert into actual_node values ("
+ " 1, 'G', '', null, null, null, null, null, null, null, "
+ " '" G_TC_DATA "', null, null, null, null);"
" "
-#ifndef SVN_WC__NODES_ONLY
- "insert into base_node values ("
- " 1, 'M', null, null, '', 'normal', 'dir', "
- " 1, null, null, "
- " 1, " TIME_1s ", '" AUTHOR_1 "', null, null, null, '()', null, null, "
- " null); "
- "insert into working_node values ("
- " 1, 'M/M-a', 'M', 'not-present', 'file', "
- " null, null, "
- " null, null, null, null, null, "
- " null, null, null, 0, null, null, '()', 0); "
-#endif
-#ifdef SVN_WC__NODES
"insert into nodes values ("
- " 1, 'M', 0, '', null, null, 1, 'normal', null,"
- " null, null, 'dir', 1, " TIME_1s ", '" AUTHOR_1 "', null,"
- " '()', null, null, null, null, null);"
+ " 1, 'M', 0, '', 1, 'M', 1, 'normal', "
+ " null, null, 'dir', '()', null, null, null, 1, " TIME_1s ", '" AUTHOR_1 "', "
+ " null, null, null, null);"
"insert into nodes values ("
- " 1, 'M/M-a', 0, 'M', null, null, 1, 'not-present', null,"
- " null, null, 'file', 1, null, null, null,"
- " '()', null, null, null, null, null);"
-#endif
+ " 1, 'M/M-a', 0, 'M', 1, 'M/M-a', 1, 'not-present', "
+ " null, null, 'file', '()', null, null, null, 1, null, null, "
+ " null, null, null, null);"
);
@@ -509,19 +292,10 @@ static const char * const M_TESTING_DATA
"insert into repository values (2, '" ROOT_TWO "', '" UUID_TWO "'); "
"insert into wcroot values (1, null); "
-#ifndef SVN_WC__NODES_ONLY
- "insert into base_node values ("
- " 1, '', 1, 'M', null, 'normal', 'dir', "
- " 1, null, null, "
- " 1, " TIME_1s ", '" AUTHOR_1 "', 'infinity', null, null, '()', null, 0, "
- " null); "
-#endif
-#ifdef SVN_WC__NODES
"insert into nodes values ("
- " 1, '', 0, null, 1, 'M', 1, 'normal', 'infinity',"
- " null, null, 'dir', 1, " TIME_1s ", '" AUTHOR_1 "', null,"
- " '()', null, null, null, null, null);"
-#endif
+ " 1, '', 0, null, 1, 'M', 1, 'normal',"
+ " null, null, 'dir', '()', 'infinity', null, null, 1, " TIME_1s ", '" AUTHOR_1 "',"
+ " null, null, null, null);"
);
WC_QUERIES_SQL_DECLARE_STATEMENTS(statements);
@@ -559,17 +333,13 @@ create_fake_wc(const char *subdir, int f
const char *dirpath;
const char * const my_statements[] = {
statements[STMT_CREATE_SCHEMA],
-#ifdef SVN_WC__NODES
statements[STMT_CREATE_NODES],
-#endif
TESTING_DATA,
NULL
};
const char * const M_statements[] = {
statements[STMT_CREATE_SCHEMA],
-#ifdef SVN_WC__NODES
statements[STMT_CREATE_NODES],
-#endif
M_TESTING_DATA,
NULL
};
@@ -768,7 +538,7 @@ test_access_baton_like_locking(apr_pool_
SVN_INVALID_REVNUM, NULL, NULL, NULL, NULL, pool));
SVN_ERR(svn_wc_locked(&locked, D3, pool));
SVN_TEST_ASSERT(locked);
- SVN_ERR(svn_wc_revert3(D, adm_access, -1, FALSE,
+ SVN_ERR(svn_wc_revert3(D, adm_access, svn_depth_infinity, FALSE,
NULL, NULL, NULL, NULL, NULL, pool));
SVN_ERR(svn_wc_locked(&locked, D3, pool));
SVN_TEST_ASSERT(!locked);
Modified: subversion/branches/gpg-agent-password-store/subversion/tests/libsvn_wc/pristine-store-test.c
URL: http://svn.apache.org/viewvc/subversion/branches/gpg-agent-password-store/subversion/tests/libsvn_wc/pristine-store-test.c?rev=1041580&r1=1041579&r2=1041580&view=diff
==============================================================================
--- subversion/branches/gpg-agent-password-store/subversion/tests/libsvn_wc/pristine-store-test.c (original)
+++ subversion/branches/gpg-agent-password-store/subversion/tests/libsvn_wc/pristine-store-test.c Thu Dec 2 20:55:08 2010
@@ -40,6 +40,8 @@
#include "svn_wc.h"
#include "svn_client.h"
+#include "utils.h"
+
#include "../../libsvn_wc/wc.h"
#include "../../libsvn_wc/wc_db.h"
#include "../../libsvn_wc/wc-queries.h"
@@ -48,18 +50,9 @@
#include "private/svn_wc_private.h"
#include "../svn_test.h"
-#include "../svn_test_fs.h"
-
-#define REPOSITORIES_WORK_DIR "svn-test-work/repositories"
-#define WCS_WORK_DIR "svn-test-work/working-copies"
-/* Create an empty repository and WC for the test TEST_NAME, and open a WC
- * DB context. Set *REPOS_URL to the URL of the new repository, *WC_ABSPATH
- * to the root path of the new WC, and *DB to a new DB context.
- *
- * Create the repository and WC in subdirectories called repos/TEST_NAME and
- * wcs/TEST_NAME respectively, within the current working directory. */
+/* Create repos and WC, and also set *DB to a new DB context. */
static svn_error_t *
create_repos_and_wc(const char **repos_url,
const char **wc_abspath,
@@ -68,41 +61,8 @@ create_repos_and_wc(const char **repos_u
const svn_test_opts_t *opts,
apr_pool_t *pool)
{
- const char *repos_path = svn_relpath_join(REPOSITORIES_WORK_DIR, test_name,
- pool);
- const char *wc_path = svn_relpath_join(WCS_WORK_DIR, test_name, pool);
-
- /* Remove the repo and WC dirs if they already exist, to ensure the test
- * will run even if a previous failed attempt was not cleaned up. */
- SVN_ERR(svn_io_remove_dir2(repos_path, TRUE, NULL, NULL, pool));
- SVN_ERR(svn_io_remove_dir2(wc_path, TRUE, NULL, NULL, pool));
-
- /* Create the parent dirs of the repo and WC if necessary. */
- SVN_ERR(svn_io_make_dir_recursively(REPOSITORIES_WORK_DIR, pool));
- SVN_ERR(svn_io_make_dir_recursively(WCS_WORK_DIR, pool));
-
- /* Create a repos and set *REPOS_URL to its path. */
- {
- svn_repos_t *repos;
-
- SVN_ERR(svn_test__create_repos(&repos, repos_path, opts, pool));
- SVN_ERR(svn_uri_get_file_url_from_dirent(repos_url, repos_path, pool));
- }
-
- /* Create a WC */
- {
- svn_client_ctx_t *ctx;
- svn_opt_revision_t head_rev = { svn_opt_revision_head, {0} };
-
- SVN_ERR(svn_client_create_context(&ctx, pool));
- /* SVN_ERR(svn_config_get_config(&ctx->config, config_dir, pool)); */
- SVN_ERR(svn_dirent_get_absolute(wc_abspath, wc_path, pool));
- SVN_ERR(svn_client_checkout3(NULL, *repos_url, *wc_abspath,
- &head_rev, &head_rev, svn_depth_infinity,
- FALSE /* ignore_externals */,
- FALSE /* allow_unver_obstructions */,
- ctx, pool));
- }
+ SVN_ERR(svn_test__create_repos_and_wc(repos_url, wc_abspath, test_name,
+ opts, pool));
/* Open a DB context */
SVN_ERR(svn_wc__db_open(db, svn_wc__db_openmode_readonly, NULL,
@@ -256,9 +216,7 @@ pristine_get_translated(const svn_test_o
SVN_ERR(svn_wc__db_wclock_obtain(wc_ctx->db, dirname, 0, FALSE, pool));
- SVN_ERR(svn_wc_add4(wc_ctx, versioned_abspath, svn_depth_empty,
- NULL, SVN_INVALID_REVNUM, NULL, NULL, NULL, NULL,
- pool));
+ SVN_ERR(svn_wc_add_from_disk(wc_ctx, versioned_abspath, NULL, NULL, pool));
SVN_ERR(svn_wc_prop_set4(wc_ctx, versioned_abspath,
"svn:keywords", svn_string_create("Rev", pool),
FALSE, NULL, NULL, pool));
Modified: subversion/branches/gpg-agent-password-store/subversion/tests/libsvn_wc/tree-conflict-data-test.c
URL: http://svn.apache.org/viewvc/subversion/branches/gpg-agent-password-store/subversion/tests/libsvn_wc/tree-conflict-data-test.c?rev=1041580&r1=1041579&r2=1041580&view=diff
==============================================================================
--- subversion/branches/gpg-agent-password-store/subversion/tests/libsvn_wc/tree-conflict-data-test.c (original)
+++ subversion/branches/gpg-agent-password-store/subversion/tests/libsvn_wc/tree-conflict-data-test.c Thu Dec 2 20:55:08 2010
@@ -53,15 +53,14 @@ fail(apr_pool_t *pool, const char *fmt,
static svn_error_t *
test_read_tree_conflict(apr_pool_t *pool)
{
- svn_wc_conflict_description2_t *conflict;
- apr_hash_t *conflicts;
+ const svn_wc_conflict_description2_t *conflict;
svn_wc_conflict_description2_t *exp_conflict;
const char *tree_conflict_data;
- apr_hash_index_t *hi;
const char *local_abspath;
+ const svn_skel_t *skel;
- tree_conflict_data = "((conflict Foo.c file update deleted edited "
- "(version 0 2 -1 0 0 ) (version 0 2 -1 0 0 )))";
+ tree_conflict_data = "(conflict Foo.c file update deleted edited "
+ "(version 0 2 -1 0 0 ) (version 0 2 -1 0 0 ))";
SVN_ERR(svn_dirent_get_absolute(&local_abspath, "Foo.c", pool));
exp_conflict = svn_wc_conflict_description_create_tree2(
@@ -70,11 +69,8 @@ test_read_tree_conflict(apr_pool_t *pool
exp_conflict->action = svn_wc_conflict_action_delete;
exp_conflict->reason = svn_wc_conflict_reason_edited;
- SVN_ERR(svn_wc__read_tree_conflicts(&conflicts, tree_conflict_data, "",
- pool));
-
- hi = apr_hash_first(pool, conflicts);
- conflict = svn__apr_hash_index_val(hi);
+ skel = svn_skel__parse(tree_conflict_data, strlen(tree_conflict_data), pool);
+ SVN_ERR(svn_wc__deserialize_conflict(&conflict, skel, "", pool, pool));
if ((conflict->node_kind != exp_conflict->node_kind) ||
(conflict->action != exp_conflict->action) ||
@@ -87,120 +83,13 @@ test_read_tree_conflict(apr_pool_t *pool
}
static svn_error_t *
-test_read_2_tree_conflicts(apr_pool_t *pool)
-{
- const char *tree_conflict_data;
- svn_wc_conflict_description2_t *conflict1, *conflict2;
- apr_hash_t *conflicts;
- svn_wc_conflict_description2_t *exp_conflict1, *exp_conflict2;
- apr_hash_index_t *hi;
- const char *local_abspath;
-
- tree_conflict_data =
- "((conflict Foo.c file update deleted edited "
- "(version 0 2 -1 0 0 ) (version 0 2 -1 0 0 )) "
- "(conflict Bar.h file update edited deleted "
- "(version 0 2 -1 0 0 ) (version 0 2 -1 0 0 )))";
-
- SVN_ERR(svn_dirent_get_absolute(&local_abspath, "Foo.c", pool));
- exp_conflict1 = svn_wc_conflict_description_create_tree2(
- local_abspath, svn_node_file, svn_wc_operation_update,
- NULL, NULL, pool);
- exp_conflict1->action = svn_wc_conflict_action_delete;
- exp_conflict1->reason = svn_wc_conflict_reason_edited;
-
- SVN_ERR(svn_dirent_get_absolute(&local_abspath, "Bar.h", pool));
- exp_conflict2 = svn_wc_conflict_description_create_tree2(
- local_abspath, svn_node_file, svn_wc_operation_update,
- NULL, NULL, pool);
- exp_conflict2->action = svn_wc_conflict_action_edit;
- exp_conflict2->reason = svn_wc_conflict_reason_deleted;
-
- SVN_ERR(svn_wc__read_tree_conflicts(&conflicts, tree_conflict_data, "",
- pool));
-
- hi = apr_hash_first(pool, conflicts);
- conflict1 = svn__apr_hash_index_val(hi);
- if ((conflict1->node_kind != exp_conflict1->node_kind) ||
- (conflict1->action != exp_conflict1->action) ||
- (conflict1->reason != exp_conflict1->reason) ||
- (conflict1->operation != exp_conflict1->operation) ||
- (strcmp(conflict1->local_abspath, exp_conflict1->local_abspath) != 0))
- return fail(pool, "Tree conflict struct #1 has bad data");
-
- hi = apr_hash_next(hi);
- conflict2 = svn__apr_hash_index_val(hi);
- if ((conflict2->node_kind != exp_conflict2->node_kind) ||
- (conflict2->action != exp_conflict2->action) ||
- (conflict2->reason != exp_conflict2->reason) ||
- (conflict2->operation != exp_conflict2->operation) ||
- (strcmp(conflict2->local_abspath, exp_conflict2->local_abspath) != 0))
- return fail(pool, "Tree conflict struct #2 has bad data");
-
- return SVN_NO_ERROR;
-}
-
-/* This needs to be adjusted in case the constants for the
- * delimiters change... */
-static const char* broken_tree_conflict_test_data[] = {
- /* Missing descriptions */
- "|Bar.h:file:update:edited:deleted::::::::",
- "Foo.c:file:update:deleted:edited::::::::|",
- "|||||||",
- "",
- /* Missing fields */
- "Foo.c:fileupdate:deleted:edited::::::::",
- "Foo.c",
- "::::",
- ":::",
- "Foo.c:::::::::::::;",
- /* Bad separators */
- "Foo.c:file:update:deleted:edited::::::::$Bar.h:file:update:edited:deleted::::::::",
- "Foo.c|file|update|deleted|edited:::::::::Bar.h|file|update|edited|deleted::::::::",
- /* Missing separators */
- "Foo.c:file:update:deleted:edited::::::::Bar.h:file:update:edited:deleted::::::::",
- "Foo.c:fileupdate:deleted:edited::::::::",
- /* Unescaped separators */
- "F|oo.c:file:update:deleted:edited::::::::",
- "F:oo.c:file:update:deleted:edited::::::::",
- /* Unescaped escape */
- "Foo.c\\:file:update:deleted:edited::::::::",
- "Foo.c\\",
- /* Illegally escaped char */
- "\\Foo.c:file:update:deleted:edited::::::::",
- NULL
-};
-
-static svn_error_t *
-test_read_invalid_tree_conflicts(apr_pool_t *pool)
-{
- int i;
- const char *tree_conflict_data;
- apr_hash_t *conflicts;
- svn_error_t *err;
-
- for (i = 0; broken_tree_conflict_test_data[i] != NULL; i++)
- {
- tree_conflict_data = broken_tree_conflict_test_data[i];
- err = svn_wc__read_tree_conflicts(&conflicts, tree_conflict_data, "",
- pool);
- if (err == SVN_NO_ERROR)
- return fail(pool,
- "Error in broken tree conflict data was not detected:\n"
- " %s", tree_conflict_data);
- svn_error_clear(err);
- }
- return SVN_NO_ERROR;
-}
-
-static svn_error_t *
test_write_tree_conflict(apr_pool_t *pool)
{
svn_wc_conflict_description2_t *conflict;
const char *tree_conflict_data;
- apr_hash_t *conflicts;
const char *expected;
const char *local_abspath;
+ svn_skel_t *skel;
SVN_ERR(svn_dirent_get_absolute(&local_abspath, "Foo.c", pool));
@@ -210,14 +99,11 @@ test_write_tree_conflict(apr_pool_t *poo
conflict->action = svn_wc_conflict_action_delete;
conflict->reason = svn_wc_conflict_reason_edited;
- conflicts = apr_hash_make(pool);
- apr_hash_set(conflicts, conflict->local_abspath, APR_HASH_KEY_STRING,
- conflict);
-
- expected = "((conflict Foo.c file update deleted edited "
- "(version 0 2 -1 0 0 ) (version 0 2 -1 0 0 )))";
+ SVN_ERR(svn_wc__serialize_conflict(&skel, conflict, pool, pool));
+ tree_conflict_data = svn_skel__unparse(skel, pool)->data;
- SVN_ERR(svn_wc__write_tree_conflicts(&tree_conflict_data, conflicts, pool));
+ expected = "(conflict Foo.c file update deleted edited "
+ "(version 0 2 -1 0 0 ) (version 0 2 -1 0 0 ))";
if (strcmp(expected, tree_conflict_data) != 0)
return fail(pool, "Unexpected text from tree conflict\n"
@@ -227,60 +113,6 @@ test_write_tree_conflict(apr_pool_t *poo
return SVN_NO_ERROR;
}
-static svn_error_t *
-test_write_2_tree_conflicts(apr_pool_t *pool)
-{
- svn_wc_conflict_description2_t *conflict1, *conflict2;
- apr_hash_t *conflicts;
- const char *tree_conflict_data;
- const char *expected1;
- const char *expected2;
- const char *local_abspath;
-
- SVN_ERR(svn_dirent_get_absolute(&local_abspath, "Foo.c", pool));
- conflict1 = svn_wc_conflict_description_create_tree2(
- local_abspath, svn_node_file, svn_wc_operation_update,
- NULL, NULL, pool);
- conflict1->action = svn_wc_conflict_action_delete;
- conflict1->reason = svn_wc_conflict_reason_edited;
-
- SVN_ERR(svn_dirent_get_absolute(&local_abspath, "Bar.h", pool));
- conflict2 = svn_wc_conflict_description_create_tree2(
- local_abspath, svn_node_file, svn_wc_operation_update,
- NULL, NULL, pool);
- conflict2->action = svn_wc_conflict_action_edit;
- conflict2->reason = svn_wc_conflict_reason_deleted;
-
- conflicts = apr_hash_make(pool);
- apr_hash_set(conflicts, conflict1->local_abspath, APR_HASH_KEY_STRING,
- conflict1);
- apr_hash_set(conflicts, conflict2->local_abspath, APR_HASH_KEY_STRING,
- conflict2);
-
- /* We don't know the order the hash will spit out the data, so just test
- for both possibilities. */
- expected1 = "((conflict Foo.c file update deleted edited "
- "(version 0 2 -1 0 0 ) (version 0 2 -1 0 0 )) "
- "(conflict Bar.h file update edited deleted "
- "(version 0 2 -1 0 0 ) (version 0 2 -1 0 0 )))";
- expected2 = "((conflict Bar.h file update edited deleted "
- "(version 0 2 -1 0 0 ) (version 0 2 -1 0 0 )) "
- "(conflict Foo.c file update deleted edited "
- "(version 0 2 -1 0 0 ) (version 0 2 -1 0 0 )))";
-
- SVN_ERR(svn_wc__write_tree_conflicts(&tree_conflict_data, conflicts, pool));
-
- if (strcmp(expected1, tree_conflict_data) != 0
- && strcmp(expected2, tree_conflict_data) != 0)
- return fail(pool, "Unexpected text from tree conflict\n"
- " Expected: %s\n"
- " OR %s\n"
- " Actual: %s\n", expected1, expected2,
- tree_conflict_data);
-
- return SVN_NO_ERROR;
-}
-
#ifdef THIS_TEST_RAISES_MALFUNCTION
static svn_error_t *
test_write_invalid_tree_conflicts(apr_pool_t *pool)
@@ -380,14 +212,8 @@ struct svn_test_descriptor_t test_funcs[
SVN_TEST_NULL,
SVN_TEST_PASS2(test_read_tree_conflict,
"read 1 tree conflict"),
- SVN_TEST_PASS2(test_read_2_tree_conflicts,
- "read 2 tree conflicts"),
- SVN_TEST_XFAIL2(test_read_invalid_tree_conflicts,
- "detect broken tree conflict data"),
SVN_TEST_PASS2(test_write_tree_conflict,
"write 1 tree conflict"),
- SVN_TEST_PASS2(test_write_2_tree_conflicts,
- "write 2 tree conflicts"),
#ifdef THIS_TEST_RAISES_MALFUNCTION
SVN_TEST_PASS2(test_write_invalid_tree_conflicts,
"detect broken tree conflict data while writing"),
Modified: subversion/branches/gpg-agent-password-store/subversion/tests/svn_test_main.c
URL: http://svn.apache.org/viewvc/subversion/branches/gpg-agent-password-store/subversion/tests/svn_test_main.c?rev=1041580&r1=1041579&r2=1041580&view=diff
==============================================================================
--- subversion/branches/gpg-agent-password-store/subversion/tests/svn_test_main.c (original)
+++ subversion/branches/gpg-agent-password-store/subversion/tests/svn_test_main.c Thu Dec 2 20:55:08 2010
@@ -191,9 +191,12 @@ do_test_num(const char *progname,
svn_boolean_t test_failed;
const char *msg = NULL; /* the message this individual test prints out */
const struct svn_test_descriptor_t *desc;
+ const int array_size = get_array_size();
/* Check our array bounds! */
- if ((test_num > get_array_size()) || (test_num <= 0))
+ if (test_num < 0)
+ test_num += array_size + 1;
+ if ((test_num > array_size) || (test_num <= 0))
{
printf("FAIL: %s: THERE IS NO TEST NUMBER %2d\n", progname, test_num);
skip_cleanup = TRUE;
@@ -424,9 +427,12 @@ main(int argc, const char *argv[])
{
for (i = 1; i < argc; i++)
{
- if (svn_ctype_isdigit(argv[i][0]))
+ if (svn_ctype_isdigit(argv[i][0]) || argv[i][0] == '-')
{
int test_num = atoi(argv[i]);
+ if (test_num == 0)
+ /* A --option argument, most likely. */
+ continue;
ran_a_test = TRUE;
if (do_test_num(prog_name, test_num, FALSE, &opts, test_pool))
@@ -458,6 +464,5 @@ main(int argc, const char *argv[])
svn_pool_destroy(pool); /* takes test_pool with it */
apr_terminate();
- exit(got_error);
return got_error;
}
Modified: subversion/branches/gpg-agent-password-store/tools/client-side/svnmucc/svnmucc-test.py
URL: http://svn.apache.org/viewvc/subversion/branches/gpg-agent-password-store/tools/client-side/svnmucc/svnmucc-test.py?rev=1041580&r1=1041579&r2=1041580&view=diff
==============================================================================
--- subversion/branches/gpg-agent-password-store/tools/client-side/svnmucc/svnmucc-test.py (original)
+++ subversion/branches/gpg-agent-password-store/tools/client-side/svnmucc/svnmucc-test.py Thu Dec 2 20:55:08 2010
@@ -286,6 +286,13 @@ def main():
'propset', 'testprop', 'true', 'foo/z.c',
'propset', 'testprop', 'true', 'foo/foo')
+ # revision 19
+ run_svnmucc(['M /foo/z.c',
+ 'M /foo/foo',
+ ], #---------
+ 'propsetf', 'testprop', sys.argv[0], 'foo/z.c',
+ 'propsetf', 'testprop', sys.argv[0], 'foo/foo')
+
# Expected missing revision error
xrun_svnmucc(['svnmucc: \'a\' is not a revision'
], #---------
Modified: subversion/branches/gpg-agent-password-store/tools/client-side/svnmucc/svnmucc.c
URL: http://svn.apache.org/viewvc/subversion/branches/gpg-agent-password-store/tools/client-side/svnmucc/svnmucc.c?rev=1041580&r1=1041579&r2=1041580&view=diff
==============================================================================
--- subversion/branches/gpg-agent-password-store/tools/client-side/svnmucc/svnmucc.c (original)
+++ subversion/branches/gpg-agent-password-store/tools/client-side/svnmucc/svnmucc.c Thu Dec 2 20:55:08 2010
@@ -1023,8 +1023,10 @@ main(int argc, const char **argv)
if (++i == action_args->nelts)
insufficient(pool);
- handle_error(read_propvalue_file(&(action->prop_value),
- propval_file, pool), pool);
+ err = read_propvalue_file(&(action->prop_value), propval_file, pool);
+ if (err)
+ handle_error(err, pool);
+
action->action = ACTION_PROPSET;
}
}
@@ -1084,9 +1086,11 @@ main(int argc, const char **argv)
svn_string_create("committed using svnmucc", pool));
}
else
- /* -F or -m specified; use that even if --with-revprop=svn:log. */
- apr_hash_set(revprops, SVN_PROP_REVISION_LOG, APR_HASH_KEY_STRING,
- svn_string_create(message, pool));
+ {
+ /* -F or -m specified; use that even if --with-revprop=svn:log. */
+ apr_hash_set(revprops, SVN_PROP_REVISION_LOG, APR_HASH_KEY_STRING,
+ svn_string_create(message, pool));
+ }
if ((err = execute(actions, anchor, revprops, username, password,
config_dir, non_interactive, base_revision, pool)))
Modified: subversion/branches/gpg-agent-password-store/tools/dev/unix-build/Makefile.svn
URL: http://svn.apache.org/viewvc/subversion/branches/gpg-agent-password-store/tools/dev/unix-build/Makefile.svn?rev=1041580&r1=1041579&r2=1041580&view=diff
==============================================================================
--- subversion/branches/gpg-agent-password-store/tools/dev/unix-build/Makefile.svn (original)
+++ subversion/branches/gpg-agent-password-store/tools/dev/unix-build/Makefile.svn Thu Dec 2 20:55:08 2010
@@ -29,8 +29,8 @@ DISTDIR = $(PWD)/distfiles
SRCDIR = $(PWD)/src
OBJDIR = $(PWD)/objdir
-BDB_MAJOR_VER = 4.8
-BDB_VER = $(BDB_MAJOR_VER).30
+BDB_MAJOR_VER = 4.7
+BDB_VER = $(BDB_MAJOR_VER).25
APR_VER = 1.4.2
APR_ICONV_VER = 1.2.1
GNU_ICONV_VER = 1.13.1
@@ -38,6 +38,7 @@ APR_UTIL_VER = 1.3.9
HTTPD_VER = 2.2.15
NEON_VER = 0.29.3
SERF_VER = 0.7.x
+SERF_OLD_VER = 0.3.1
CYRUS_SASL_VER = 2.1.23
SQLITE_VER = 3.6.23.1
@@ -45,7 +46,6 @@ BDB_DIST = db-$(BDB_VER).tar.gz
APR_ICONV_DIST = apr-iconv-$(APR_ICONV_VER).tar.gz
GNU_ICONV_DIST = libiconv-$(GNU_ICONV_VER).tar.gz
NEON_DIST = neon-$(NEON_VER).tar.gz
-#SERF_DIST = serf-$(SERF_VER).tar.gz
SQLITE_DIST = sqlite-$(SQLITE_VER).tar.gz
CYRUS_SASL_DIST = cyrus-sasl-$(CYRUS_SASL_VER).tar.gz
HTTPD_DIST = httpd-$(HTTPD_VER).tar.bz2
@@ -70,6 +70,7 @@ HTTPD_URL = http://archive.apache.org/di
NEON_URL = http://webdav.org/neon/$(NEON_DIST)
#SERF_URL = http://serf.googlecode.com/files/$(SERF_DIST)
SERF_URL = http://serf.googlecode.com/svn/branches/$(SERF_VER)
+SERF_OLD_URL = http://serf.googlecode.com/svn/tags/$(SERF_OLD_VER)
SQLITE_URL = http://www.sqlite.org/$(SQLITE_DIST)
CYRUS_SASL_URL = ftp://ftp.andrew.cmu.edu/pub/cyrus-mail/$(CYRUS_SASL_DIST)
@@ -81,6 +82,7 @@ APR_UTIL_SRCDIR = $(SRCDIR)/apr-util-$(A
HTTPD_SRCDIR = $(SRCDIR)/httpd-$(HTTPD_VER)
NEON_SRCDIR = $(SRCDIR)/neon-$(NEON_VER)
SERF_SRCDIR = $(SRCDIR)/serf-$(SERF_VER)
+SERF_OLD_SRCDIR = $(SRCDIR)/serf-$(SERF_OLD_VER)
SQLITE_SRCDIR = $(SRCDIR)/sqlite-$(SQLITE_VER)
CYRUS_SASL_SRCDIR = $(SRCDIR)/cyrus-sasl-$(CYRUS_SASL_VER)
SVN_SRCDIR = $(SVN_WC)
@@ -93,6 +95,7 @@ APR_UTIL_OBJDIR = $(OBJDIR)/apr-util-$(A
HTTPD_OBJDIR = $(OBJDIR)/httpd-$(HTTPD_VER)
NEON_OBJDIR = $(OBJDIR)/neon-$(NEON_VER)
SERF_OBJDIR = $(OBJDIR)/serf-$(SERF_VER)
+SERF_OLD_OBJDIR = $(OBJDIR)/serf-$(SERF_OLD_VER)
SQLITE_OBJDIR = $(OBJDIR)/sqlite-$(SQLITE_VER)
CYRUS_SASL_OBJDIR = $(OBJDIR)/cyrus-sasl-$(CYRUS_SASL_VER)
SVN_OBJDIR = $(OBJDIR)/$(SVN_REL_WC)
@@ -102,6 +105,10 @@ SVN_OBJDIR = $(OBJDIR)/$(SVN_REL_WC)
# builds!
svn_builddir ?=$(SVN_WC)
+ifdef PROFILE
+PROFILE_CFLAGS=-pg
+endif
+
#######################################################################
# Main targets.
#######################################################################
@@ -109,17 +116,18 @@ svn_builddir ?=$(SVN_WC)
.PHONY: all reset clean nuke
all: dirs-create bdb-install apr-install iconv-install apr-util-install \
- httpd-install neon-install serf-install sqlite-install \
- cyrus-sasl-install svn-install svn-bindings-install
+ httpd-install neon-install serf-install serf-old-install \
+ sqlite-install cyrus-sasl-install svn-install svn-bindings-install
# Use these to start a build from the beginning.
reset: dirs-reset bdb-reset apr-reset iconv-reset apr-util-reset \
- httpd-reset neon-reset serf-reset sqlite-reset cyrus-sasl-reset \
- svn-reset
+ httpd-reset neon-reset serf-reset serf-old-reset sqlite-reset \
+ cyrus-sasl-reset svn-reset
-# Use to save disc space.
+# Use to save disk space.
clean: bdb-clean apr-clean iconv-clean apr-util-clean httpd-clean \
- neon-clean serf-clean cyrus-sasl-clean svn-clean
+ neon-clean serf-clean serf-old-clean sqlite-clean cyrus-sasl-clean \
+ svn-clean
# Nukes everything (including installed binaries!)
# Use this to start ALL OVER AGAIN! Use with caution!
@@ -186,7 +194,8 @@ $(BDB_OBJDIR)/.retrieved: $(DISTDIR)/$(B
# configure bdb
$(BDB_OBJDIR)/.configured: $(BDB_OBJDIR)/.retrieved
cd $(BDB_SRCDIR)/build_unix \
- && env CFLAGS="-g" ../dist/configure \
+ && env CFLAGS="-g $(PROFILE_CFLAGS)" \
+ ../dist/configure \
--prefix=$(PREFIX)/bdb \
--enable-debug
touch $@
@@ -224,6 +233,12 @@ $(APR_OBJDIR)/.retrieved:
fi
touch $@
+ifdef THREADING
+THREADS_FLAG=--enable-threads
+else
+THREADS_FLAG=--disable-threads
+endif
+
# configure apr
$(APR_OBJDIR)/.configured: $(APR_OBJDIR)/.retrieved
cp $(APR_SRCDIR)/build/apr_hints.m4 \
@@ -233,10 +248,11 @@ $(APR_OBJDIR)/.configured: $(APR_OBJDIR)
> $(APR_SRCDIR)/build/apr_hints.m4
cd $(APR_SRCDIR) && ./buildconf
cd $(APR_OBJDIR) \
- && env CFLAGS="-O0 -g" $(APR_SRCDIR)/configure \
+ && env CFLAGS="-O0 -g $(PROFILE_CFLAGS)" \
+ $(APR_SRCDIR)/configure \
--prefix=$(PREFIX)/apr \
--enable-maintainer-mode \
- --disable-threads
+ $(THREADS_FLAG)
touch $@
# compile apr
@@ -277,7 +293,8 @@ $(APR_ICONV_OBJDIR)/.retrieved: $(DISTDI
# configure apr-iconv
$(APR_ICONV_OBJDIR)/.configured: $(APR_ICONV_OBJDIR)/.retrieved
cd $(APR_ICONV_OBJDIR) \
- && env CFLAGS="-g" $(APR_ICONV_SRCDIR)/configure \
+ && env CFLAGS="-g $(PROFILE_CFLAGS)" \
+ $(APR_ICONV_SRCDIR)/configure \
--prefix=$(PREFIX)/apr \
--with-apr=$(PREFIX)/apr
touch $@
@@ -285,7 +302,7 @@ $(APR_ICONV_OBJDIR)/.configured: $(APR_I
# compile apr-iconv
$(APR_ICONV_OBJDIR)/.compiled: $(APR_ICONV_OBJDIR)/.configured
(cd $(APR_ICONV_OBJDIR) \
- && make CPPFLAGS="-D_OSD_POSIX" CFLAGS="-g -O0")
+ && make CPPFLAGS="-D_OSD_POSIX" CFLAGS="-g -O0 $(PROFILE_CFLAGS)")
touch $@
# install apr-iconv
@@ -356,7 +373,8 @@ $(GNU_ICONV_OBJDIR)/.configured: $(GNU_I
cd $(SRCDIR)/libiconv-${GNU_ICONV_VER} && \
${MAKE} -f Makefile.devel lib/aliases.h
cd $(GNU_ICONV_OBJDIR) \
- && env CFLAGS="-g" $(GNU_ICONV_SRCDIR)/configure \
+ && env CFLAGS="-g $(PROFILE_CFLAGS)" \
+ $(GNU_ICONV_SRCDIR)/configure \
--prefix=$(PREFIX)/iconv \
--enable-extra-encodings
touch $@
@@ -423,7 +441,7 @@ $(APR_UTIL_OBJDIR)/.configured: $(APR_UT
cd $(APR_UTIL_SRCDIR) && ./buildconf --with-apr=$(APR_SRCDIR)
cd $(APR_UTIL_OBJDIR) \
&& env LD_LIBRARY_PATH=$(PREFIX)/bdb/lib \
- CFLAGS="-O0 -g" \
+ CFLAGS="-O0 -g $(PROFILE_CFLAGS)" \
$(APR_UTIL_SRCDIR)/configure \
--prefix=$(PREFIX)/apr \
--enable-maintainer-mode \
@@ -471,7 +489,8 @@ $(HTTPD_OBJDIR)/.retrieved: $(DISTDIR)/$
# configure httpd
$(HTTPD_OBJDIR)/.configured: $(HTTPD_OBJDIR)/.retrieved
cd $(HTTPD_OBJDIR) \
- && $(HTTPD_SRCDIR)/configure \
+ && CFLAGS="$(PROFILE_CFLAGS)" \
+ $(HTTPD_SRCDIR)/configure \
--prefix=$(PREFIX)/httpd \
--enable-maintainer-mode \
--enable-ssl \
@@ -545,12 +564,13 @@ endif
# configure neon
$(NEON_OBJDIR)/.configured: $(NEON_OBJDIR)/.retrieved
cd $(NEON_SRCDIR) && ./autogen.sh
- if [ -n "$(KRB5_CONFIG_PATH)" -a -d "$(KRB5_CONFIG_PATH)" ]; then \
+ if [ -n "$(KRB5_CONFIG_PATH)" ] && [ -d "$(KRB5_CONFIG_PATH)" ]; then \
cp $(KRB5_CONFIG_PATH)/krb5-config $(NEON_OBJDIR); \
chmod +x $(NEON_OBJDIR)/krb5-config; \
fi
cd $(NEON_OBJDIR) \
- && env CFLAGS="-g" $(NEON_SRCDIR)/configure \
+ && env CFLAGS="-g $(PROFILE_CFLAGS)" \
+ $(NEON_SRCDIR)/configure \
PATH=$(NEON_OBJDIR):$$PATH \
--prefix=$(PREFIX)/neon \
--with-ssl \
@@ -608,7 +628,8 @@ $(SERF_OBJDIR)/.retrieved:
# compile serf (serf won't compile outside its source tree)
$(SERF_OBJDIR)/.compiled: $(SERF_OBJDIR)/.retrieved
cd $(SERF_SRCDIR) && \
- env CFLAGS="-O0 -g" ./serfmake --with-apr=$(PREFIX)/apr \
+ env CFLAGS="-O0 -g $(PROFILE_CFLAGS)" \
+ ./serfmake --with-apr=$(PREFIX)/apr \
--prefix=$(PREFIX)/serf \
build
touch $@
@@ -623,6 +644,48 @@ $(SERF_OBJDIR)/.installed: $(SERF_OBJDIR
touch $@
#######################################################################
+# serf-old (compatible with Subversion 1.5)
+#######################################################################
+
+serf-old-retrieve: $(SERF_OLD_OBJDIR)/.retrieved
+serf-old-configure: $(SERF_OLD_OBJDIR)/.configured
+serf-old-compile: $(SERF_OLD_OBJDIR)/.compiled
+serf-old-install: $(SERF_OLD_OBJDIR)/.installed
+serf-old-reset:
+ $(foreach f, .retrieved .configured .compiled .installed, \
+ rm -f $(SERF_OLD_OBJDIR)/$(f);)
+
+serf-old-clean:
+ -(cd $(SERF_OLD_SRCDIR) && ./serfmake clean)
+
+# retrieve serf if not present yet
+$(SERF_OLD_OBJDIR)/.retrieved:
+ [ -d $(SERF_OLD_OBJDIR) ] || mkdir -p $(SERF_OLD_OBJDIR)
+ if [ ! -d $(SERF_OLD_SRCDIR) ]; then \
+ svn export $(SERF_OLD_URL) $(SERF_OLD_SRCDIR); \
+ fi
+ touch $@
+
+# compile serf (serf won't compile outside its source tree)
+$(SERF_OLD_OBJDIR)/.compiled: $(SERF_OLD_OBJDIR)/.retrieved
+ cd $(SERF_OLD_SRCDIR) && \
+ env CFLAGS="-O0 -g $(PROFILE_CFLAGS)" \
+ ./serfmake --with-apr=$(PREFIX)/apr \
+ --prefix=$(PREFIX)/serf-old \
+ build
+ touch $@
+
+# install serf
+$(SERF_OLD_OBJDIR)/.installed: $(SERF_OLD_OBJDIR)/.compiled
+ cd $(SERF_OLD_SRCDIR) && \
+ ./serfmake --with-apr=$(PREFIX)/apr \
+ --with-apr-util=$(PREFIX)/apr \
+ --prefix=$(PREFIX)/serf-old \
+ install
+ touch $@
+
+
+#######################################################################
# sqlite
#######################################################################
@@ -634,6 +697,9 @@ sqlite-reset:
$(foreach f, .retrieved .configured .compiled .installed, \
rm -f $(SQLITE_OBJDIR)/$(f);)
+sqlite-clean:
+ -cd $(SQLITE_OBJDIR) && make clean
+
# fetch distfile for sqlite
$(DISTDIR)/$(SQLITE_DIST):
cd $(DISTDIR) && $(FETCH_CMD) $(SQLITE_URL)
@@ -644,13 +710,20 @@ $(SQLITE_OBJDIR)/.retrieved: $(DISTDIR)/
tar -C $(SRCDIR) -zxf $(DISTDIR)/$(SQLITE_DIST)
touch $@
+ifdef THREADING
+THREADSAFE_FLAG=--enable-threadsafe
+else
+THREADSAFE_FLAG=--disable-threadsafe
+endif
+
# configure sqlite
$(SQLITE_OBJDIR)/.configured: $(SQLITE_OBJDIR)/.retrieved
cd $(SQLITE_OBJDIR) \
- && env CFLAGS="-g" $(SQLITE_SRCDIR)/configure \
+ && env CFLAGS="-g $(PROFILE_CFLAGS)" \
+ $(SQLITE_SRCDIR)/configure \
--prefix=$(PREFIX)/sqlite \
--disable-tcl \
- --disable-threadsafe
+ $(THREADSAFE_FLAG)
touch $@
# compile sqlite
@@ -676,7 +749,7 @@ cyrus-sasl-reset:
rm -f $(CYRUS_SASL_OBJDIR)/$(f);)
cyrus-sasl-clean:
- -(cd $(CYRUS_SASL_OBJDIR) && make clean)
+ -(cd $(CYRUS_SASL_OBJDIR) && make distclean)
# fetch distfile for cyrus-sasl
$(DISTDIR)/$(CYRUS_SASL_DIST):
@@ -692,12 +765,22 @@ $(CYRUS_SASL_OBJDIR)/.retrieved: $(DISTD
> $(CYRUS_SASL_SRCDIR)/plugins/digestmd5.c.patched
mv $(CYRUS_SASL_SRCDIR)/plugins/digestmd5.c.patched \
$(CYRUS_SASL_SRCDIR)/plugins/digestmd5.c
+ifeq ($(UNAME),OpenBSD)
+ # Fixes GSSAPI support on OpenBSD, which hasn't got libroken:
+ for f in `grep -l -R -- -lroken $(CYRUS_SASL_SRCDIR)`; do \
+ sed -e 's/-lroken//g' < $$f > $$f.tmp && \
+ mv $$f.tmp $$f; \
+ done
+ chmod +x $(CYRUS_SASL_SRCDIR)/configure
+endif
touch $@
# configure cyrus-sasl
$(CYRUS_SASL_OBJDIR)/.configured: $(CYRUS_SASL_OBJDIR)/.retrieved
cd $(CYRUS_SASL_OBJDIR) \
- && env CFLAGS="-g" $(CYRUS_SASL_SRCDIR)/configure \
+ && env CFLAGS="-g $(PROFILE_CFLAGS)" \
+ CPPFLAGS="-I/usr/include/kerberosV" \
+ $(CYRUS_SASL_SRCDIR)/configure \
--with-dbpath=$(PREFIX)/cyrus-sasl/etc/sasldb2 \
--with-plugindir=$(PREFIX)/cyrus-sasl/lib/sasl2 \
--with-configdir=$(PREFIX)/cyrus-sasl/lib/sasl2 \
@@ -757,7 +840,7 @@ $(SVN_OBJDIR)/.retrieved:
branchdir="$(BRANCH)"; \
co="co"; \
fi; \
- if [ ! -d $(SVN_WC) ]; then \
+ if [ ! -d $(SVN_WC) ] && [ ! -h $(SVN_WC) ]; then \
svn $${co} $(SUBVERSION_REPOS_URL)/$${branchdir} \
$(SVN_WC); \
fi
@@ -765,18 +848,40 @@ $(SVN_OBJDIR)/.retrieved:
ifeq ($(BRANCH_MAJOR),1.5)
BDB_FLAG=$(PREFIX)/bdb
+SERF_FLAG=--with-serf="$(PREFIX)/serf-old"
+MOD_DAV_SVN=modules/mod_dav_svn.so
+MOD_AUTHZ_SVN=modules/mod_authz_svn.so
+DISABLE_NEON_VERSION_CHECK=--disable-neon-version-check
else ifeq ($(BRANCH_MAJOR),1.4)
BDB_FLAG=$(PREFIX)/bdb
+MOD_DAV_SVN=modules/mod_dav_svn.so
+MOD_AUTHZ_SVN=modules/mod_authz_svn.so
+DISABLE_NEON_VERSION_CHECK=--disable-neon-version-check
else ifeq ($(BRANCH_MAJOR),1.3)
BDB_FLAG=$(PREFIX)/bdb
+MOD_DAV_SVN=modules/mod_dav_svn.so
+MOD_AUTHZ_SVN=modules/mod_authz_svn.so
+DISABLE_NEON_VERSION_CHECK=--disable-neon-version-check
else ifeq ($(BRANCH_MAJOR),1.2)
BDB_FLAG=$(PREFIX)/bdb
+MOD_DAV_SVN=modules/mod_dav_svn.so
+MOD_AUTHZ_SVN=modules/mod_authz_svn.so
+DISABLE_NEON_VERSION_CHECK=--disable-neon-version-check
else ifeq ($(BRANCH_MAJOR),1.1)
BDB_FLAG=$(PREFIX)/bdb
+MOD_DAV_SVN=modules/mod_dav_svn.so
+MOD_AUTHZ_SVN=modules/mod_authz_svn.so
+DISABLE_NEON_VERSION_CHECK=--disable-neon-version-check
else ifeq ($(BRANCH_MAJOR),1.0)
BDB_FLAG=$(PREFIX)/bdb
+MOD_DAV_SVN=modules/mod_dav_svn.so
+MOD_AUTHZ_SVN=modules/mod_authz_svn.so
+DISABLE_NEON_VERSION_CHECK=--disable-neon-version-check
else
BDB_FLAG=db.h:$(PREFIX)/bdb/include:$(PREFIX)/bdb/lib:db-$(BDB_MAJOR_VER)
+SERF_FLAG=--with-serf="$(PREFIX)/serf"
+MOD_DAV_SVN=modules/svn-$(WC)/mod_dav_svn.so
+MOD_AUTHZ_SVN=modules/svn-$(WC)/mod_authz_svn.so
endif
ifeq ($(ENABLE_JAVA_BINDINGS),yes)
@@ -786,6 +891,14 @@ else
JAVAHL_FLAG=--enable-javahl=no
endif
+ifdef PROFILE
+SVN_ALL_STATIC=--enable-all-static
+else
+SVN_WITH_HTTPD=--with-apxs="$(PREFIX)/httpd/bin/apxs" \
+ --with-apache-libexecdir="$(PREFIX)/httpd/modules/svn-$(WC)"
+SVN_WITH_SASL=--with-sasl="$(PREFIX)/cyrus-sasl"
+endif
+
# configure svn
$(SVN_OBJDIR)/.configured: $(SVN_OBJDIR)/.retrieved
@if [ $(ENABLE_JAVA_BINDINGS) = yes ]; then \
@@ -804,22 +917,23 @@ $(SVN_OBJDIR)/.configured: $(SVN_OBJDIR)
--prefix="$(SVN_PREFIX)" \
--with-apr="$(PREFIX)/apr" \
--with-apr-util="$(PREFIX)/apr" \
- --with-apxs="$(PREFIX)/httpd/bin/apxs" \
- --with-apache-libexecdir=$(PREFIX)/httpd/modules/svn-$(WC) \
--with-neon="$(PREFIX)/neon" \
- --with-serf="$(PREFIX)/serf" \
+ $(SVN_WITH_HTTPD) \
+ $(SVN_WITH_SASL) \
+ $(SERF_FLAG) \
--with-sqlite="$(PREFIX)/sqlite" \
--with-berkeley-db="$(BDB_FLAG)" \
- --with-sasl="$(PREFIX)/cyrus-sasl" \
--with-ruby-sitedir="$(SVN_PREFIX)/lib/ruby/site_ruby" \
--disable-mod-activation \
- $(JAVAHL_FLAG)
+ $(JAVAHL_FLAG) \
+ $(SVN_ALL_STATIC) \
+ $(DISABLE_NEON_VERSION_CHECK)
touch $@
# compile svn
$(SVN_OBJDIR)/.compiled: $(SVN_OBJDIR)/.configured
cd $(svn_builddir) \
- && make
+ && make EXTRA_CFLAGS="$(PROFILE_CFLAGS)"
touch $@
# install svn
@@ -879,8 +993,8 @@ httpd-conf:
echo "# httpd config for make check" > $(HTTPD_CHECK_CONF)
echo "ServerRoot \"$(PREFIX)/httpd\"" >> $(HTTPD_CHECK_CONF)
echo "Listen localhost:$(HTTPD_CHECK_PORT)" >> $(HTTPD_CHECK_CONF)
- echo "LoadModule dav_svn_module modules/svn-$(WC)/mod_dav_svn.so" >> $(HTTPD_CHECK_CONF)
- echo "LoadModule authz_svn_module modules/svn-$(WC)/mod_authz_svn.so" >> $(HTTPD_CHECK_CONF)
+ echo "LoadModule dav_svn_module $(MOD_DAV_SVN)" >> $(HTTPD_CHECK_CONF)
+ echo "LoadModule authz_svn_module $(MOD_AUTHZ_SVN)" >> $(HTTPD_CHECK_CONF)
echo "DocumentRoot "$(PREFIX)/httpd/htdocs"" >> $(HTTPD_CHECK_CONF)
echo "# These two Locations are used for 'make check'" >> $(HTTPD_CHECK_CONF)
echo "<Directory />" >> $(HTTPD_CHECK_CONF)
@@ -917,7 +1031,11 @@ httpd-conf:
echo 'RedirectMatch ^/svn-test-work/repositories/REDIRECT-TEMP-(.*)$$ /svn-test-work/repositories/$$1' >> $(HTTPD_CHECK_CONF)
# We need this to make sure some targets below pick up the right libraries
-LD_LIBRARY_PATH=$(PREFIX)/apr/lib:$(PREFIX)/iconv/lib:$(PREFIX)/bdb/lib:$(PREFIX)/neon/lib:$(PREFIX)/serf/lib:$(PREFIX)/sqlite/lib:$(PREFIX)/svn-$(WC)/lib
+LD_LIBRARY_PATH=$(PREFIX)/apr/lib:$(PREFIX)/iconv/lib:$(PREFIX)/bdb/lib:$(PREFIX)/neon/lib:$(PREFIX)/serf/lib:$(PREFIX)/sqlite/lib:$(PREFIX)/cyrus-sasl/lib:$(PREFIX)/iconv/lib:$(PREFIX)/svn-$(WC)/lib
+
+.PHONY: libpath
+libpath:
+ @echo export LD_LIBRARY_PATH=$(LD_LIBRARY_PATH):$$LD_LIBRARY_PATH
.PHONY: start-svnserve stop-svnserve start-httpd stop-httpd
@@ -927,7 +1045,7 @@ HTTPD_CMD = env LD_LIBRARY_PATH=$(LD_LIB
HTTPD_START_CMD = $(HTTPD_CMD) -k start
HTTPD_STOP_CMD = $(HTTPD_CMD) -k stop
-SVNSERVE_START_CMD = $(svn_builddir)/subversion/svnserve/svnserve \
+SVNSERVE_START_CMD = $(SVN_PREFIX)/bin/svnserve \
--listen-host 127.0.0.1 \
--pid-file $(PWD)/svnserve-$(WC).pid \
-d -r $(svn_builddir)/subversion/tests/cmdline
@@ -952,45 +1070,62 @@ stop-svnserve:
# run tests in parallel
PARALLEL=PARALLEL=1 CLEANUP=1
+TEST_LOGS=tests.log fails.log
svn-check-neon: httpd-conf $(SVN_OBJDIR)/.compiled $(SVN_OBJDIR)/.bindings-compiled
$(HTTPD_START_CMD)
- cd $(svn_builddir) && make check FS_TYPE=fsfs \
+ -cd $(svn_builddir) && make check FS_TYPE=fsfs \
BASE_URL=http://localhost:$(HTTPD_CHECK_PORT) HTTP_LIBRARY=neon \
$(PARALLEL)
- ln -f $(svn_builddir)/tests.log $(svn_builddir)/tests.log.ra_neon-fsfs
- cd $(svn_builddir) && make check FS_TYPE=bdb \
+ -$(foreach log, $(TEST_LOGS), \
+ test -f $(svn_builddir)/$(log) && cp -f $(svn_builddir)/$(log) \
+ $(svn_builddir)/$(log).$@-fsfs;)
+ -cd $(svn_builddir) && make check FS_TYPE=bdb \
BASE_URL=http://localhost:$(HTTPD_CHECK_PORT) HTTP_LIBRARY=neon \
$(PARALLEL)
- ln -f $(svn_builddir)/tests.log $(svn_builddir)/tests.log.ra_neon-bdb
+ -$(foreach log, $(TEST_LOGS), \
+ test -f $(svn_builddir)/$(log) && cp -f $(svn_builddir)/$(log) \
+ $(svn_builddir)/$(log).$@-bdb;)
$(HTTPD_STOP_CMD)
svn-check-serf: httpd-conf $(SVN_OBJDIR)/.compiled $(SVN_OBJDIR)/.bindings-compiled
$(HTTPD_START_CMD)
- cd $(svn_builddir) && make check FS_TYPE=fsfs \
+ -cd $(svn_builddir) && make check FS_TYPE=fsfs \
BASE_URL=http://localhost:$(HTTPD_CHECK_PORT) HTTP_LIBRARY=serf \
$(PARALLEL)
- ln -f $(svn_builddir)/tests.log $(svn_builddir)/tests.log.ra_serf-fsfs
- cd $(svn_builddir) && make check FS_TYPE=bdb \
+ -$(foreach log, $(TEST_LOGS), \
+ test -f $(svn_builddir)/$(log) && cp -f $(svn_builddir)/$(log) \
+ $(svn_builddir)/$(log).$@-fsfs;)
+ -cd $(svn_builddir) && make check FS_TYPE=bdb \
BASE_URL=http://localhost:$(HTTPD_CHECK_PORT) HTTP_LIBRARY=serf \
$(PARALLEL)
- ln -f $(svn_builddir)/tests.log $(svn_builddir)/tests.log.ra_serf-bdb
+ -$(foreach log, $(TEST_LOGS), \
+ test -f $(svn_builddir)/$(log) && cp -f $(svn_builddir)/$(log) \
+ $(svn_builddir)/$(log).$@-bdb;)
$(HTTPD_STOP_CMD)
svn-check-local:
- cd $(svn_builddir) && make check FS_TYPE=fsfs $(PARALLEL)
- ln -f $(svn_builddir)/tests.log $(svn_builddir)/tests.log.ra_local-fsfs
- cd $(svn_builddir) && make check FS_TYPE=bdb $(PARALLEL)
- ln -f $(svn_builddir)/tests.log $(svn_builddir)/tests.log.ra_local-bdb
+ -cd $(svn_builddir) && make check FS_TYPE=fsfs $(PARALLEL)
+ -$(foreach log, $(TEST_LOGS), \
+ test -f $(svn_builddir)/$(log) && cp -f $(svn_builddir)/$(log) \
+ $(svn_builddir)/$(log).$@-fsfs;)
+ -cd $(svn_builddir) && make check FS_TYPE=bdb $(PARALLEL)
+ -$(foreach log, $(TEST_LOGS), \
+ test -f $(svn_builddir)/$(log) && cp -f $(svn_builddir)/$(log) \
+ $(svn_builddir)/$(log).$@-bdb;)
svn-check-svn:
$(SVNSERVE_START_CMD)
- cd $(svn_builddir) && make check FS_TYPE=fsfs BASE_URL=svn://127.0.0.1 \
- $(PARALLEL)
- ln -f $(svn_builddir)/tests.log $(svn_builddir)/tests.log.ra_svn-fsfs
- cd $(svn_builddir) && make check FS_TYPE=bdb BASE_URL=svn://127.0.0.1 \
- $(PARALLEL)
- ln -f $(svn_builddir)/tests.log $(svn_builddir)/tests.log.ra_svn-bdb
+ -cd $(svn_builddir) && make check FS_TYPE=fsfs \
+ BASE_URL=svn://127.0.0.1 $(PARALLEL)
+ -$(foreach log, $(TEST_LOGS), \
+ test -f $(svn_builddir)/$(log) && cp -f $(svn_builddir)/$(log) \
+ $(svn_builddir)/$(log).$@-fsfs;)
+ -cd $(svn_builddir) && make check FS_TYPE=bdb \
+ BASE_URL=svn://127.0.0.1 $(PARALLEL)
+ -$(foreach log, $(TEST_LOGS), \
+ test -f $(svn_builddir)/$(log) && cp -f $(svn_builddir)/$(log) \
+ $(svn_builddir)/$(log).$@-bdb;)
$(SVNSERVE_STOP_CMD)
.PHONY: svn-check-swig-pl svn-check-swig-py svn-check-swig-rb svn-check-javahl
@@ -1003,20 +1138,40 @@ RUBYLIB=$(SVN_PREFIX)/lib/ruby/site_ruby
grep ^svn_cv_ruby_sitedir_libsuffix $(svn_builddir)/config.log | \
cut -d'=' -f2)
svn-check-swig-pl:
- cd $(svn_builddir) && \
- env LD_LIBRARY_PATH=$(LD_LIBRARY_PATH) make check-swig-pl
+ -if [ $(ENABLE_PERL_BINDINGS) = yes ]; then \
+ (cd $(svn_builddir) && \
+ env LD_LIBRARY_PATH=$(LD_LIBRARY_PATH) \
+ make check-swig-pl 2>&1) | \
+ tee $(svn_builddir)/tests.log.bindings.pl; \
+ fi
+
svn-check-swig-py:
- cd $(svn_builddir) && \
- env LD_LIBRARY_PATH=$(LD_LIBRARY_PATH) make check-swig-py
+ -if [ $(ENABLE_PYTHON_BINDINGS) = yes ]; then \
+ (cd $(svn_builddir) && \
+ env LD_LIBRARY_PATH=$(LD_LIBRARY_PATH) \
+ make check-swig-py 2>&1) | \
+ tee $(svn_builddir)/tests.log.bindings.py; \
+ fi
+
+# We add the svn prefix to PATH here because the ruby tests
+# attempt to start an svnserve binary found in PATH.
svn-check-swig-rb:
- cd $(svn_builddir)/subversion/bindings/swig/ruby/test && \
- env RUBYLIB=$(RUBYLIB) \
- LD_LIBRARY_PATH=$(LD_LIBRARY_PATH) \
- ruby run-test.rb --verbose=verbose
+ -if [ $(ENABLE_RUBY_BINDINGS) = yes ]; then \
+ (cd $(svn_builddir)/subversion/bindings/swig/ruby/test && \
+ env RUBYLIB=$(RUBYLIB) \
+ LD_LIBRARY_PATH=$(LD_LIBRARY_PATH) \
+ PATH=$(SVN_PREFIX)/bin:$$PATH \
+ ruby run-test.rb --verbose=normal 2>&1) | \
+ tee $(svn_builddir)/tests.log.bindings.rb; \
+ fi
+
svn-check-javahl:
- cd $(svn_builddir) && \
- env LD_LIBRARY_PATH=$(LD_LIBRARY_PATH) \
- make check-javahl
+ -if [ $(ENABLE_JAVA_BINDINGS) = yes ]; then \
+ (cd $(svn_builddir) && \
+ env LD_LIBRARY_PATH=$(LD_LIBRARY_PATH) \
+ make check-javahl 2>&1) | \
+ tee $(svn_builddir)/tests.log.bindings.javahl; \
+ fi
svn-check: svn-check-local svn-check-svn svn-check-neon svn-check-serf svn-check-bindings
@@ -1051,7 +1206,7 @@ endif
@echo "openssl: `openssl version | cut -d' ' -f2`"
@echo "swig: `swig -version | grep Version | cut -d' ' -f3`"
@echo "python: `python --version 2>&1 | cut -d' ' -f2`"
- @echo "perl: `perl -version | grep ^This | cut -d' ' -f4 | sed -e 's/^v//'`"
+ @echo "perl: `eval \`perl -V:version\`; echo $$version`"
@echo "ruby: `ruby --version | cut -d' ' -f2`"
ifeq ($(ENABLE_JAVA_BINDINGS),yes)
@echo "java: `java -version 2>&1 | grep version | cut -d' ' -f3 | sed -e 's/\"//g'`"
Modified: subversion/branches/gpg-agent-password-store/tools/dev/wc-format.py
URL: http://svn.apache.org/viewvc/subversion/branches/gpg-agent-password-store/tools/dev/wc-format.py?rev=1041580&r1=1041579&r2=1041580&view=diff
==============================================================================
--- subversion/branches/gpg-agent-password-store/tools/dev/wc-format.py (original)
+++ subversion/branches/gpg-agent-password-store/tools/dev/wc-format.py Thu Dec 2 20:55:08 2010
@@ -4,11 +4,14 @@ import os
import sqlite3
import sys
+MIN_SINGLE_DB_FORMAT = 19
-def print_format(wc_path):
+def get_format(wc_path):
entries = os.path.join(wc_path, '.svn', 'entries')
wc_db = os.path.join(wc_path, '.svn', 'wc.db')
+ formatno = 'not under version control'
+
if os.path.exists(entries):
formatno = int(open(entries).readline())
elif os.path.exists(wc_db):
@@ -16,15 +19,23 @@ def print_format(wc_path):
curs = conn.cursor()
curs.execute('pragma user_version;')
formatno = curs.fetchone()[0]
- else:
- formatno = 'not under version control'
+ elif os.path.exists(wc_path):
+ parent_path = os.path.dirname(os.path.abspath(wc_path))
+ if wc_path != parent_path:
+ formatno = get_format(parent_path)
+ if formatno >= MIN_SINGLE_DB_FORMAT:
+ return formatno
+ return formatno
+
+def print_format(wc_path):
# see subversion/libsvn_wc/wc.h for format values and information
# 1.0.x -> 1.3.x: format 4
# 1.4.x: format 8
# 1.5.x: format 9
# 1.6.x: format 10
# 1.7.x: format XXX
+ formatno = get_format(wc_path)
print '%s: %s' % (wc_path, formatno)
Modified: subversion/branches/gpg-agent-password-store/tools/diff/diff.c
URL: http://svn.apache.org/viewvc/subversion/branches/gpg-agent-password-store/tools/diff/diff.c?rev=1041580&r1=1041579&r2=1041580&view=diff
==============================================================================
--- subversion/branches/gpg-agent-password-store/tools/diff/diff.c (original)
+++ subversion/branches/gpg-agent-password-store/tools/diff/diff.c Thu Dec 2 20:55:08 2010
@@ -1,4 +1,4 @@
-/* diff-test.c -- test driver for text diffs
+/* diff.c -- test driver for text diffs
*
* ====================================================================
* Licensed to the Apache Software Foundation (ASF) under one
@@ -28,68 +28,121 @@
#include "svn_pools.h"
#include "svn_diff.h"
#include "svn_io.h"
-
+#include "svn_utf.h"
static svn_error_t *
do_diff(svn_stream_t *ostream,
- const char *original, const char *modified,
+ const char *original,
+ const char *modified,
svn_boolean_t *has_changes,
+ svn_diff_file_options_t *options,
+ svn_boolean_t show_c_function,
apr_pool_t *pool)
{
svn_diff_t *diff;
- SVN_ERR(svn_diff_file_diff(&diff, original, modified, pool));
-
+ SVN_ERR(svn_diff_file_diff_2(&diff, original, modified, options, pool));
*has_changes = svn_diff_contains_diffs(diff);
+ return svn_diff_file_output_unified3(ostream, diff, original, modified,
+ NULL, NULL, SVN_APR_LOCALE_CHARSET,
+ NULL, show_c_function, pool);
+}
- SVN_ERR(svn_diff_file_output_unified(ostream, diff,
- original, modified,
- NULL, NULL, pool));
-
- return NULL;
+static void
+print_usage(svn_stream_t *ostream, const char *progname,
+ apr_pool_t *pool)
+{
+ svn_error_clear(svn_stream_printf(ostream, pool,
+ "Usage: %s [OPTIONS] <file1> <file2>\n"
+ "\n"
+ "Display the differences between <file1> and <file2> in unified diff\n"
+ "format. OPTIONS are diff extensions as described by 'svn help diff'.\n"
+ "Use '--' alone to indicate that no more options follow.\n",
+ progname));
}
-int main(int argc, char *argv[])
+int main(int argc, const char *argv[])
{
apr_pool_t *pool;
svn_stream_t *ostream;
- int rc;
svn_error_t *svn_err;
+ svn_boolean_t has_changes;
+ svn_diff_file_options_t *diff_options;
+ apr_array_header_t *options_array;
+ int i;
+ const char *from = NULL;
+ const char *to = NULL;
+ svn_boolean_t show_c_function = FALSE;
+ svn_boolean_t no_more_options = FALSE;
apr_initialize();
+ atexit(apr_terminate);
pool = svn_pool_create(NULL);
svn_err = svn_stream_for_stdout(&ostream, pool);
if (svn_err)
{
- svn_handle_error2(svn_err, stdout, FALSE, "diff-test: ");
- rc = 2;
+ svn_handle_error2(svn_err, stdout, FALSE, "diff: ");
+ return 2;
}
- else if (argc == 3)
+
+ options_array = apr_array_make(pool, 0, sizeof(const char *));
+
+ for (i = 1 ; i < argc ; i++)
{
- svn_boolean_t has_changes;
-
- svn_err = do_diff(ostream, argv[1], argv[2], &has_changes, pool);
- if (svn_err == NULL)
+ if (!no_more_options && (argv[i][0] == '-'))
{
- rc = has_changes ? 1 : 0;
+ /* Special case: '--' means "no more options follow" */
+ if (argv[i][1] == '-' && !argv[i][2])
+ {
+ no_more_options = TRUE;
+ continue;
+ }
+ /* Special case: we need to detect '-p' and handle it specially */
+ if (argv[i][1] == 'p' && !argv[i][2])
+ {
+ show_c_function = TRUE;
+ continue;
+ }
+ APR_ARRAY_PUSH(options_array, const char *) = argv[i];
}
else
{
- svn_handle_error2(svn_err, stdout, FALSE, "diff-test: ");
- rc = 2;
+ if (from == NULL)
+ from = argv[i];
+ else if (to == NULL)
+ to = argv[i];
+ else
+ {
+ print_usage(ostream, argv[0], pool);
+ return 2;
+ }
}
}
- else
+
+ if (!from || !to)
{
- svn_error_clear(svn_stream_printf(ostream, pool,
- "Usage: %s <file1> <file2>\n",
- argv[0]));
- rc = 2;
+ print_usage(ostream, argv[0], pool);
+ return 2;
}
- apr_terminate();
+ diff_options = svn_diff_file_options_create(pool);
+
+ svn_err = svn_diff_file_options_parse(diff_options, options_array, pool);
+ if (svn_err)
+ {
+ svn_handle_error2(svn_err, stdout, FALSE, "diff: ");
+ return 2;
+ }
+
+ svn_err = do_diff(ostream, from, to, &has_changes,
+ diff_options, show_c_function, pool);
+ if (svn_err)
+ {
+ svn_handle_error2(svn_err, stdout, FALSE, "diff: ");
+ return 2;
+ }
- return rc;
+ return has_changes ? 1 : 0;
}
Modified: subversion/branches/gpg-agent-password-store/tools/diff/diff3.c
URL: http://svn.apache.org/viewvc/subversion/branches/gpg-agent-password-store/tools/diff/diff3.c?rev=1041580&r1=1041579&r2=1041580&view=diff
==============================================================================
--- subversion/branches/gpg-agent-password-store/tools/diff/diff3.c (original)
+++ subversion/branches/gpg-agent-password-store/tools/diff/diff3.c Thu Dec 2 20:55:08 2010
@@ -1,4 +1,4 @@
-/* diff3-test.c -- test driver for 3-way text merges
+/* diff3.c -- test driver for 3-way text merges
*
* ====================================================================
* Licensed to the Apache Software Foundation (ASF) under one
@@ -66,7 +66,7 @@ int main(int argc, char *argv[])
svn_err = svn_stream_for_stdout(&ostream, pool);
if (svn_err)
{
- svn_handle_error2(svn_err, stdout, FALSE, "diff3-test: ");
+ svn_handle_error2(svn_err, stdout, FALSE, "diff3: ");
rc = 2;
}
else if (argc == 4)
@@ -81,7 +81,7 @@ int main(int argc, char *argv[])
}
else
{
- svn_handle_error2(svn_err, stdout, FALSE, "diff3-test: ");
+ svn_handle_error2(svn_err, stdout, FALSE, "diff3: ");
rc = 2;
}
}
Modified: subversion/branches/gpg-agent-password-store/tools/diff/diff4.c
URL: http://svn.apache.org/viewvc/subversion/branches/gpg-agent-password-store/tools/diff/diff4.c?rev=1041580&r1=1041579&r2=1041580&view=diff
==============================================================================
--- subversion/branches/gpg-agent-password-store/tools/diff/diff4.c (original)
+++ subversion/branches/gpg-agent-password-store/tools/diff/diff4.c Thu Dec 2 20:55:08 2010
@@ -1,4 +1,4 @@
-/* diff4-test.c -- test driver for 3-way text merges
+/* diff4.c -- test driver for 4-way text merges
*
* ====================================================================
* Licensed to the Apache Software Foundation (ASF) under one
@@ -67,7 +67,7 @@ int main(int argc, char *argv[])
svn_err = svn_stream_for_stdout(&ostream, pool);
if (svn_err)
{
- svn_handle_error2(svn_err, stdout, FALSE, "diff4-test: ");
+ svn_handle_error2(svn_err, stdout, FALSE, "diff4: ");
rc = 2;
}
else if (argc == 5)
@@ -77,7 +77,7 @@ int main(int argc, char *argv[])
pool);
if (svn_err != NULL)
{
- svn_handle_error2(svn_err, stdout, FALSE, "diff4-test: ");
+ svn_handle_error2(svn_err, stdout, FALSE, "diff4: ");
rc = 2;
}
}