All pastes #32130 Raw Edit

Stuff

public text v1 · immutable
#32130 ·published 2005-12-02 18:58 UTC
rendered paste body
Index: subversion/libsvn_client/blame.c
===================================================================
--- subversion/libsvn_client/blame.c    (revision 17572)
+++ subversion/libsvn_client/blame.c    (working copy)
@@ -1,3 +1,4 @@
+
 /*
  * blame.c:  return blame messages
  *
@@ -59,6 +60,7 @@
   const char *target;
   svn_client_ctx_t *ctx;
   const char *last_filename;
+  const char *last_blame;   /* last file used to blame against */
   svn_subst_eol_style_t eol_style;
   const char *eol_str;
   struct rev *rev;     /* the rev for which blame is being assigned
@@ -313,6 +315,7 @@
 {
   struct delta_baton *dbaton = baton;
   struct file_rev_baton *frb = dbaton->file_rev_baton;
+  const char *blame_file;
  
   /* Call the wrapped handler first. */
   SVN_ERR (dbaton->wrapped_handler (window, dbaton->wrapped_baton));
@@ -332,30 +335,31 @@
   if (svn_subst_translation_required (frb->eol_style, frb->eol_str,
                                       NULL, FALSE, FALSE))
     {
-      const char *translation_tgt;
-
       SVN_ERR (svn_io_open_unique_file2 (NULL,
-                                         &translation_tgt,
+                                         &blame_file,
                                          frb->tmp_path,
                                          ".tmp",
                                          svn_io_file_del_on_pool_cleanup,
                                          frb->currpool));
       SVN_ERR (svn_subst_copy_and_translate3 (dbaton->filename,
-                                              translation_tgt,
+                                              blame_file,
                                               frb->eol_str, FALSE,
                                               NULL, FALSE, FALSE,
                                               frb->currpool));
-      dbaton->filename = translation_tgt;
     }
+  else
+    blame_file = dbaton->filename;
  
+
   /* Process this file. */
-  SVN_ERR (add_file_blame (frb->last_filename,
-                           dbaton->filename, frb));
+  SVN_ERR (add_file_blame (frb->last_blame,
+                           blame_file, frb));
  
   /* Prepare for next revision. */
  
   /* Remember the file name so we can diff it with the next revision. */
   frb->last_filename = dbaton->filename;
+  frb->last_blame = blame_file;
  
   /* Switch pools. */
   {