Author: rhuijben
Date: Thu Feb 19 18:42:56 2015
New Revision: 1660969
URL: http://svn.apache.org/r1660969
Log:
Fix the assertion that currently breaks backwards blame when passing
a revision in which the file isn't changed.
* subversion/libsvn_client/blame.c
(file_rev_handler): Handle reverse blames properly when determining
if a version is outside the requested version range.
Modified:
subversion/trunk/subversion/libsvn_client/blame.c
Modified: subversion/trunk/subversion/libsvn_client/blame.c
URL:
http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_client/blame.c?rev=1660969&r1=1660968&r2=1660969&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_client/blame.c (original)
+++ subversion/trunk/subversion/libsvn_client/blame.c Thu Feb 19 18:42:56 2015
@@ -489,10 +489,12 @@ file_rev_handler(void *baton, const char
/* Create the rev structure. */
delta_baton->rev = apr_pcalloc(frb->mainpool, sizeof(struct rev));
- if (revnum < MIN(frb->start_rev, frb->end_rev))
+ if ((frb->start_rev < frb->end_rev)
+ ? (revnum < MIN(frb->start_rev, frb->end_rev))
+ : (revnum > MAX(frb->start_rev, frb->end_rev)))
{
- /* We shouldn't get more than one revision before the starting
- revision (unless of including merged revisions). */
+ /* 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)
|| frb->include_merged_revisions);