LogoopenSUSE Build Service > Projects
Sign Up | Log In

View File fix-abort-on-blame.diff of Package subversion (Project openSUSE:Evergreen:11.2)

------------------------------------------------------------------------
r1031165 | cmpilato | 2010-11-04 20:18:07 +0100 (Do, 04. Nov 2010) | 9 Zeilen

Fix issue #3666 ("Assertion frb->last_filename == NULL fails in
libsvn_client/blame.c")

* subversion/libsvn_client/blame.c
  (file_rev_handler): Tweak an assertion condition to account for the
    realities of included mergeinfo.

* subversion/tests/cmdline/blame_tests.py
  (test_list): No longer expect blame_merge_info() to fail.
------------------------------------------------------------------------
--- subversion/libsvn_client/blame.c	(Revision 1031164)
+++ subversion/libsvn_client/blame.c	(Revision 1031165)
@@ -93,6 +93,8 @@ struct file_rev_baton {
   /* These are used for tracking merged revisions. */
   svn_boolean_t include_merged_revisions;
   svn_boolean_t merged_revision;
+  svn_boolean_t seen_merged_revision;
+
   struct blame_chain *merged_chain;  /* the merged blame chain. */
   /* name of file containing the previous merged revision of the file */
   const char *last_original_filename;
@@ -490,8 +492,10 @@ file_rev_handler(void *baton, const char
 
   if (revnum < frb->start_rev)
     {
-      /* We shouldn't get more than one revision before start. */
-      SVN_ERR_ASSERT(frb->last_filename == NULL);
+      /* We shouldn't get more than one revision before the starting
+         revision (unless of including merged revisions). */
+      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). */