Author: rhuijben
Date: Thu Feb 19 19:48:19 2015
New Revision: 1660991
URL: http://svn.apache.org/r1660991
Log:
Following up on r1660969 and r1660975, reinstate an additional
condition on the check whether we are blaming the initial
revision.
* subversion/libsv* subversion/libsvn_client/blame.c
(file_rev_handler): Disable check when we expect merged
revisions, not just for merged revisions... as there
could be a merged revision before the first revision.
* subversion/tests/cmdline/blame_tests.py
(expected_output): Expect that merged revisions are
reported as such, even when they are outside the
passed range.
Modified:
subversion/trunk/subversion/libsvn_client/blame.c
subversion/trunk/subversion/tests/cmdline/blame_tests.py
Modified: subversion/trunk/subversion/libsvn_client/blame.c
URL:
http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_client/blame.c?rev=1660991&r1=1660990&r2=1660991&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_client/blame.c (original)
+++ subversion/trunk/subversion/libsvn_client/blame.c Thu Feb 19 19:48:19 2015
@@ -504,7 +504,8 @@ file_rev_handler(void *baton, const char
{
/* We shouldn't get more than one revision outside the
specified range (unless we alsoe receive merged revisions) */
- SVN_ERR_ASSERT(frb->last_filename == NULL);
+ SVN_ERR_ASSERT(frb->last_filename == NULL
+ || frb->include_merged_revisions);
/* The file existed before start_rev; generate no blame info for
lines from this revision (or before). */
Modified: subversion/trunk/subversion/tests/cmdline/blame_tests.py
URL:
http://svn.apache.org/viewvc/subversion/trunk/subversion/tests/cmdline/blame_tests.py?rev=1660991&r1=1660990&r2=1660991&view=diff
==============================================================================
--- subversion/trunk/subversion/tests/cmdline/blame_tests.py (original)
+++ subversion/trunk/subversion/tests/cmdline/blame_tests.py Thu Feb 19
19:48:19 2015
@@ -748,7 +748,7 @@ def blame_output_after_merge(sbox):
# Next test with the -g option with -rN:M
expected_output = [ " - - New version of file 'mu'.\n",
" - - 2nd line in file 'mu'.\n",
- "G - - new 3rd line in file 'mu'.\n",
+ "G 5 jrandom new 3rd line in file 'mu'.\n",
"G 6 jrandom add 3.5 line in file 'mu'.\n",
" - - 4th line in file 'mu'.\n",
" - - 5th line in file 'mu'.\n",
@@ -950,16 +950,16 @@ def blame_youngest_to_oldest(sbox):
orig_line = open(iota).read()
line = "New contents for iota\n"
svntest.main.file_append(iota, line)
- sbox.simple_commit()
+ sbox.simple_commit() #r2
# Move the file, to check that the operation will peg correctly.
iota_moved = sbox.ospath('iota_moved')
sbox.simple_move('iota', 'iota_moved')
- sbox.simple_commit()
+ sbox.simple_commit() #r3
# Delete a line.
open(iota_moved, 'w').write(line)
- sbox.simple_commit()
+ sbox.simple_commit() #r4
expected_output = [
' %d jrandom %s\n' % (3, orig_line[:-1]),
@@ -967,6 +967,15 @@ def blame_youngest_to_oldest(sbox):
svntest.actions.run_and_verify_svn(expected_output, [],
'blame', '-r4:1', iota_moved)
+ svntest.actions.run_and_verify_svn(expected_output, [],
+ 'blame', '-rHEAD:1', iota_moved)
+
+ expected_output = [
+ ' %d jrandom %s\n' % (2, line[:-1]),
+ ]
+ svntest.actions.run_and_verify_svn(expected_output, [],
+ 'blame', '-r1:HEAD', iota_moved)
+
########################################################################
# Run the tests