You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@subversion.apache.org by rh...@apache.org on 2015/03/24 14:14:11 UTC
svn commit: r1668883 - in /subversion/trunk/subversion: include/svn_ra.h
tests/cmdline/log_tests.py
Author: rhuijben
Date: Tue Mar 24 13:14:11 2015
New Revision: 1668883
URL: http://svn.apache.org/r1668883
Log:
Fix a long standing documentation bug with how all ra layers behave. Add
regression test to use quite a few code paths that weren't touched in
the log tests before, more specifically combinations of ranges and a peg
revision.
* subversion/include/svn_ra.h
(svn_ra_get_log2): Fix documentation, with how this function always behaved.
* subversion/tests/cmdline/log_tests.py
(log_on_deleted_deep): Add new regression test.
(test_list): Add log_on_deleted_deep.
Modified:
subversion/trunk/subversion/include/svn_ra.h
subversion/trunk/subversion/tests/cmdline/log_tests.py
Modified: subversion/trunk/subversion/include/svn_ra.h
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/include/svn_ra.h?rev=1668883&r1=1668882&r2=1668883&view=diff
==============================================================================
--- subversion/trunk/subversion/include/svn_ra.h (original)
+++ subversion/trunk/subversion/include/svn_ra.h Tue Mar 24 13:14:11 2015
@@ -1551,7 +1551,7 @@ svn_ra_do_diff(svn_ra_session_t *session
* revisions in which at least one of @a paths was changed (i.e., if
* file, text or props changed; if dir, props changed or an entry
* was added or deleted). Each path is an <tt>const char *</tt>, relative
- * to the @a session's common parent.
+ * to the repository root of @ session.
*
* If @a limit is greater than zero only invoke @a receiver on the first
* @a limit logs.
Modified: subversion/trunk/subversion/tests/cmdline/log_tests.py
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/tests/cmdline/log_tests.py?rev=1668883&r1=1668882&r2=1668883&view=diff
==============================================================================
--- subversion/trunk/subversion/tests/cmdline/log_tests.py (original)
+++ subversion/trunk/subversion/tests/cmdline/log_tests.py Tue Mar 24 13:14:11 2015
@@ -2686,6 +2686,99 @@ def log_revision_move_copy(sbox):
'log', '-v', '-q', sbox.wc_dir,
'-c3')
+def log_on_deleted_deep(sbox):
+ "log on deleted deep path"
+
+ sbox.build()
+ sbox.simple_propset('k', 'v', 'A/B/E/alpha')
+ sbox.simple_commit() #r2
+ sbox.simple_propset('k', 'v', 'A/B/E/beta')
+ sbox.simple_commit() #r3
+
+ sbox.simple_update() # Or commit fails
+ sbox.simple_move('A/B', 'B')
+ sbox.simple_commit() #r4
+
+ expected_output = svntest.verify.RegexListOutput([
+ r'-+\n',
+ r'r1 .*\n',
+ r'-+\n',
+ r'r2 .*\n',
+ r'-+\n',
+ r'r2 .*\n',
+ r'-+\n',
+ r'r3 .*\n',
+ r'-+\n',
+ ])
+ # In deleted location
+ svntest.actions.run_and_verify_svn(expected_output, [],
+ 'log', sbox.repo_url + '/A/B/E@3',
+ '-q', '-c', '1-2,2-3')
+
+ svntest.actions.run_and_verify_svn(expected_output, [],
+ 'log', sbox.repo_url + '/A/B/E@3',
+ 'alpha', 'beta',
+ '-q', '-c', '1-2,2-3')
+
+ # In new location
+ svntest.actions.run_and_verify_svn(expected_output, [],
+ 'log', sbox.repo_url + '/B/E',
+ '-q', '-c', '1-2,2-3')
+
+ svntest.actions.run_and_verify_svn(expected_output, [],
+ 'log', sbox.repo_url + '/B/E@4',
+ 'alpha', 'beta',
+ '-q', '-c', '1-2,2-3')
+
+ expected_output = svntest.verify.RegexListOutput([
+ r'-+\n',
+ r'r1 .*\n',
+ r'-+\n',
+ r'r2 .*\n',
+ r'-+\n',
+ ])
+ # 2 ranges
+ svntest.actions.run_and_verify_svn(expected_output, [],
+ 'log', sbox.repo_url + '/A/B/E@3',
+ 'alpha',
+ '-q', '-c', '1,2')
+
+ svntest.actions.run_and_verify_svn(expected_output, [],
+ 'log', sbox.repo_url + '/B/E',
+ 'alpha',
+ '-q', '-c', '1,2')
+
+ svntest.actions.run_and_verify_svn(expected_output, [],
+ 'log', sbox.repo_url + '/A/B/E@3',
+ '',
+ '-q', '-c', '1,2')
+
+ svntest.actions.run_and_verify_svn(expected_output, [],
+ 'log', sbox.repo_url + '/B/E',
+ '',
+ '-q', '-c', '1,2')
+
+ # 1 range
+ svntest.actions.run_and_verify_svn(expected_output, [],
+ 'log', sbox.repo_url + '/A/B/E@3',
+ 'alpha',
+ '-q', '-c', '1-2')
+
+ svntest.actions.run_and_verify_svn(expected_output, [],
+ 'log', sbox.repo_url + '/B/E',
+ 'alpha',
+ '-q', '-c', '1-2')
+
+ svntest.actions.run_and_verify_svn(expected_output, [],
+ 'log', sbox.repo_url + '/A/B/E@3',
+ '',
+ '-q', '-c', '1-2')
+
+ svntest.actions.run_and_verify_svn(expected_output, [],
+ 'log', sbox.repo_url + '/B/E',
+ '',
+ '-q', '-c', '1-2')
+
########################################################################
# Run the tests
@@ -2736,6 +2829,7 @@ test_list = [ None,
mergeinfo_log,
merge_sensitive_log_xml_reverse_merges,
log_revision_move_copy,
+ log_on_deleted_deep,
]
if __name__ == '__main__':