You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@subversion.apache.org by gs...@apache.org on 2010/04/23 04:08:20 UTC

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

Author: gstein
Date: Fri Apr 23 02:08:20 2010
New Revision: 937133

URL: http://svn.apache.org/viewvc?rev=937133&view=rev
Log:
Expand some comments in svn_wc__internal_node_get_url about states when we
should (or not) return URLs, and how.

* subversion/libsvn_wc/node.c:
  (svn_wc__internal_node_url): note that we probably should NOT return a
    URL for deleted nodes. that we defininitely cannot return a URL for an
    obstructed add (or more precisely: we cannot use scan_addition to do
    that). and that we can derive a URL for many of the "not here" cases.

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=937133&r1=937132&r2=937133&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_wc/node.c (original)
+++ subversion/trunk/subversion/libsvn_wc/node.c Fri Apr 23 02:08:20 2010
@@ -295,15 +295,19 @@ svn_wc__internal_node_get_url(const char
     {
       if (status == svn_wc__db_status_normal
           || status == svn_wc__db_status_incomplete
-          || status == svn_wc__db_status_deleted)
+          || status == svn_wc__db_status_deleted
+          || status == svn_wc__db_status_obstructed_delete)
         {
+          /* ### we should NOT do this for status_deleted, or
+             ### status_obstructed_delete. those may represent
+             ### the deletion of a child of a copied tree, NOT
+             ### a BASE node.  */
           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
-               || status == svn_wc__db_status_obstructed_add)
+      else if (status == svn_wc__db_status_added)
         {
           SVN_ERR(svn_wc__db_scan_addition(NULL, NULL, &repos_relpath,
                                            &repos_root_url, NULL, NULL, NULL,
@@ -313,6 +317,10 @@ svn_wc__internal_node_get_url(const char
         }
       else
         {
+          /* Status: obstructed, obstructed_add, absent, excluded,
+             not_present  */
+          /* ### we should be able to derive a URL for absent, excluded,
+             ### and not-present, since those cannot be switched.  */
           *url = NULL;
           return SVN_NO_ERROR;
         }