You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@subversion.apache.org by da...@apache.org on 2010/06/26 16:55:09 UTC

svn commit: r958232 - /subversion/trunk/subversion/libsvn_wc/node.c

Author: dannas
Date: Sat Jun 26 14:55:09 2010
New Revision: 958232

URL: http://svn.apache.org/viewvc?rev=958232&view=rev
Log:
Follow-up to r958007.

We have to check added before checking have_base as an add will be
added below its parent, but can still overlay a switched (base)node.

* subversion/libsvn_wc/node.c
  (svn_wc__internal_node_get_url,
   svn_wc__node_get_repos_relpath): See above.

Suggested by: rhuijben

Modified:
    subversion/trunk/subversion/libsvn_wc/node.c

Modified: subversion/trunk/subversion/libsvn_wc/node.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_wc/node.c?rev=958232&r1=958231&r2=958232&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_wc/node.c (original)
+++ subversion/trunk/subversion/libsvn_wc/node.c Sat Jun 26 14:55:09 2010
@@ -339,14 +339,7 @@ svn_wc__internal_node_get_url(const char
                                scratch_pool, scratch_pool));
   if (repos_relpath == NULL)
     {
-      if (have_base)
-        {
-          SVN_ERR(svn_wc__db_scan_base_repos(&repos_relpath, &repos_root_url,
-                                             NULL,
-                                             db, local_abspath,
-                                             scratch_pool, scratch_pool));
-        }
-      else if (status == svn_wc__db_status_added)
+      if (status == svn_wc__db_status_added)
         {
           SVN_ERR(svn_wc__db_scan_addition(NULL, NULL, &repos_relpath,
                                            &repos_root_url, NULL, NULL, NULL,
@@ -354,6 +347,13 @@ svn_wc__internal_node_get_url(const char
                                            db, local_abspath,
                                            scratch_pool, scratch_pool));
         }
+      else if (have_base)
+        {
+          SVN_ERR(svn_wc__db_scan_base_repos(&repos_relpath, &repos_root_url,
+                                             NULL,
+                                             db, local_abspath,
+                                             scratch_pool, scratch_pool));
+        }
       else if (status == svn_wc__db_status_absent
                || status == svn_wc__db_status_excluded
                || status == svn_wc__db_status_not_present
@@ -418,14 +418,7 @@ svn_wc__node_get_repos_relpath(const cha
                                scratch_pool, scratch_pool));
   if (*repos_relpath == NULL)
     {
-      if (have_base)
-        {
-          SVN_ERR(svn_wc__db_scan_base_repos(repos_relpath, NULL,
-                                             NULL,
-                                             wc_ctx->db, local_abspath,
-                                             scratch_pool, scratch_pool));
-        }
-      else if (status == svn_wc__db_status_added)
+      if (status == svn_wc__db_status_added)
         {
           SVN_ERR(svn_wc__db_scan_addition(NULL, NULL, repos_relpath,
                                            NULL, NULL, NULL, NULL,
@@ -433,6 +426,13 @@ svn_wc__node_get_repos_relpath(const cha
                                            wc_ctx->db, local_abspath,
                                            scratch_pool, scratch_pool));
         }
+      else if (have_base)
+        {
+          SVN_ERR(svn_wc__db_scan_base_repos(repos_relpath, NULL,
+                                             NULL,
+                                             wc_ctx->db, local_abspath,
+                                             scratch_pool, scratch_pool));
+        }
       else if (status == svn_wc__db_status_absent
                || status == svn_wc__db_status_excluded
                || status == svn_wc__db_status_not_present



Re: svn commit: r958232 - /subversion/trunk/subversion/libsvn_wc/node.c

Posted by Greg Stein <gs...@gmail.com>.
On Sat, Jun 26, 2010 at 10:55,  <da...@apache.org> wrote:
> Author: dannas
> Date: Sat Jun 26 14:55:09 2010
> New Revision: 958232
>
> URL: http://svn.apache.org/viewvc?rev=958232&view=rev
> Log:
> Follow-up to r958007.
>
> We have to check added before checking have_base as an add will be
> added below its parent, but can still overlay a switched (base)node.

Would be nice to have a comment in the code base, similar to above.

Cheers,
-g