subversion-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From pbu...@apache.org
Subject svn commit: r1148071 - /subversion/trunk/subversion/libsvn_client/merge.c
Date Mon, 18 Jul 2011 22:09:29 GMT
Author: pburba
Date: Mon Jul 18 22:09:29 2011
New Revision: 1148071

URL: http://svn.apache.org/viewvc?rev=1148071&view=rev
Log:
* subversion/libsvn_client/merge.c
  (get_invalid_inherited_mergeinfo): Correct the doc string to accurately
   describe the RA session passed by this functions only caller.  More
   importantly, return the RA session to it's original value *only* if we
   needed to reparent it in the first place!  This is a recipe for pointing
   the RA session to the root of the repository and causing issue #3242
   problems.


Modified:
    subversion/trunk/subversion/libsvn_client/merge.c

Modified: subversion/trunk/subversion/libsvn_client/merge.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_client/merge.c?rev=1148071&r1=1148070&r2=1148071&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_client/merge.c (original)
+++ subversion/trunk/subversion/libsvn_client/merge.c Mon Jul 18 22:09:29 2011
@@ -3196,9 +3196,8 @@ fix_deleted_subtree_ranges(const char *u
    inherited mergeinfo describes non-existent paths, then set
    *INVALID_INHERITED_MERGEINFO to an empty hash.
 
-   RA_SESSION is an open session that points to TARGET_ABSPATH's repository
-   location or to the location of one of TARGET_ABSPATH's parents.  It may
-   be temporarily reparented.
+   RA_SESSION is an open session that may be temporarily reparented as
+   needed by this function.
 
    RESULT_POOL is used to allocate *INVALID_INHERITED_MERGEINFO, SCRATCH_POOL
    is used for any temporary allocations. */
@@ -3260,8 +3259,12 @@ get_invalid_inherited_mergeinfo(svn_merg
                                         repos_raw_inherited, FALSE,
                                         result_pool, scratch_pool));
         }
-      SVN_ERR(svn_client__ensure_ra_session_url(&session_url, ra_session,
-                                                session_url, scratch_pool));
+
+      /* If we needed to temporarily reparent RA_SESSION, then point it
+         back to its original URL. */
+      if (session_url)
+        SVN_ERR(svn_client__ensure_ra_session_url(&session_url, ra_session,
+                                                  session_url, scratch_pool));
     }
   return SVN_NO_ERROR;
 }



Mime
View raw message