You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@subversion.apache.org by ph...@apache.org on 2010/08/02 14:19:12 UTC

svn commit: r981479 - /subversion/trunk/subversion/libsvn_wc/adm_files.c

Author: philip
Date: Mon Aug  2 12:19:12 2010
New Revision: 981479

URL: http://svn.apache.org/viewvc?rev=981479&view=rev
Log:
* subversion/libsvn_wc/adm_files.c
  (svn_wc__internal_ensure_adm): Scan if the repository information is not
   immediately available.

Suggested by: rhuijben

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

Modified: subversion/trunk/subversion/libsvn_wc/adm_files.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_wc/adm_files.c?rev=981479&r1=981478&r2=981479&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_wc/adm_files.c (original)
+++ subversion/trunk/subversion/libsvn_wc/adm_files.c Mon Aug  2 12:19:12 2010
@@ -648,6 +648,24 @@ svn_wc__internal_ensure_adm(svn_wc__db_t
                               "revision %ld in '%s'"),
                             revision, db_revision, local_abspath);
 
+      if (!db_repos_root_url)
+        {
+          if (status == svn_wc__db_status_added)
+            SVN_ERR(svn_wc__db_scan_addition(NULL, NULL,
+                                             &db_repos_relpath,
+                                             &db_repos_root_url,
+                                             &db_repos_uuid,
+                                             NULL, NULL, NULL, NULL,
+                                             db, local_abspath,
+                                             scratch_pool, scratch_pool));
+          else
+            SVN_ERR(svn_wc__db_scan_base_repos(&db_repos_relpath,
+                                               &db_repos_root_url,
+                                               &db_repos_uuid,
+                                               db, local_abspath,
+                                               scratch_pool, scratch_pool));
+        }
+
       /* The caller gives us a URL which should match the entry. However,
          some callers compensate for an old problem in entry->url and pass
          the copyfrom_url instead. See ^/notes/api-errata/wc002.txt. As



Re: svn commit: r981479 - /subversion/trunk/subversion/libsvn_wc/adm_files.c

Posted by Philip Martin <ph...@wandisco.com>.
"Bert Huijben" <be...@qqmail.nl> writes:

>> -----Original Message-----
>> From: philip@apache.org [mailto:philip@apache.org]
>> Sent: maandag 2 augustus 2010 14:19
>> To: commits@subversion.apache.org
>> Subject: svn commit: r981479 -
>> /subversion/trunk/subversion/libsvn_wc/adm_files.c
>> 
>> Author: philip
>> Date: Mon Aug  2 12:19:12 2010
>> New Revision: 981479
>> 
>> URL: http://svn.apache.org/viewvc?rev=981479&view=rev
>> Log:
>> * subversion/libsvn_wc/adm_files.c
>>   (svn_wc__internal_ensure_adm): Scan if the repository information is
>> not
>>    immediately available.
>> 
>> Suggested by: rhuijben
>> 
>> Modified:
>>     subversion/trunk/subversion/libsvn_wc/adm_files.c
>> 
>> Modified: subversion/trunk/subversion/libsvn_wc/adm_files.c
>> URL:
>> http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_wc/adm_
>> files.c?rev=981479&r1=981478&r2=981479&view=diff
>> =======================================================================
>> =======
>> --- subversion/trunk/subversion/libsvn_wc/adm_files.c (original)
>> +++ subversion/trunk/subversion/libsvn_wc/adm_files.c Mon Aug  2
>> 12:19:12 2010
>> @@ -648,6 +648,24 @@ svn_wc__internal_ensure_adm(svn_wc__db_t
>>                                "revision %ld in '%s'"),
>>                              revision, db_revision, local_abspath);
>> 
>> +      if (!db_repos_root_url)
>> +        {
>> +          if (status == svn_wc__db_status_added)
>> +            SVN_ERR(svn_wc__db_scan_addition(NULL, NULL,
>> +                                             &db_repos_relpath,
>> +                                             &db_repos_root_url,
>> +                                             &db_repos_uuid,
>> +                                             NULL, NULL, NULL, NULL,
>> +                                             db, local_abspath,
>> +                                             scratch_pool,
>> scratch_pool));
>> +          else
>> +            SVN_ERR(svn_wc__db_scan_base_repos(&db_repos_relpath,
>> +                                               &db_repos_root_url,
>> +                                               &db_repos_uuid,
>> +                                               db, local_abspath,
>> +                                               scratch_pool,
>> scratch_pool));
>
>
> What about a deleted child of a copy operation?

The function simply returns if the node is deleted.  I recently mae it
return if the node is not-present as well.

-- 
Philip

Re: svn commit: r981479 - /subversion/trunk/subversion/libsvn_wc/adm_files.c

Posted by Philip Martin <ph...@wandisco.com>.
"Bert Huijben" <be...@qqmail.nl> writes:

>> -----Original Message-----
>> From: philip@apache.org [mailto:philip@apache.org]
>> Sent: maandag 2 augustus 2010 14:19
>> To: commits@subversion.apache.org
>> Subject: svn commit: r981479 -
>> /subversion/trunk/subversion/libsvn_wc/adm_files.c
>> 
>> Author: philip
>> Date: Mon Aug  2 12:19:12 2010
>> New Revision: 981479
>> 
>> URL: http://svn.apache.org/viewvc?rev=981479&view=rev
>> Log:
>> * subversion/libsvn_wc/adm_files.c
>>   (svn_wc__internal_ensure_adm): Scan if the repository information is
>> not
>>    immediately available.
>> 
>> Suggested by: rhuijben
>> 
>> Modified:
>>     subversion/trunk/subversion/libsvn_wc/adm_files.c
>> 
>> Modified: subversion/trunk/subversion/libsvn_wc/adm_files.c
>> URL:
>> http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_wc/adm_
>> files.c?rev=981479&r1=981478&r2=981479&view=diff
>> =======================================================================
>> =======
>> --- subversion/trunk/subversion/libsvn_wc/adm_files.c (original)
>> +++ subversion/trunk/subversion/libsvn_wc/adm_files.c Mon Aug  2
>> 12:19:12 2010
>> @@ -648,6 +648,24 @@ svn_wc__internal_ensure_adm(svn_wc__db_t
>>                                "revision %ld in '%s'"),
>>                              revision, db_revision, local_abspath);
>> 
>> +      if (!db_repos_root_url)
>> +        {
>> +          if (status == svn_wc__db_status_added)
>> +            SVN_ERR(svn_wc__db_scan_addition(NULL, NULL,
>> +                                             &db_repos_relpath,
>> +                                             &db_repos_root_url,
>> +                                             &db_repos_uuid,
>> +                                             NULL, NULL, NULL, NULL,
>> +                                             db, local_abspath,
>> +                                             scratch_pool,
>> scratch_pool));
>> +          else
>> +            SVN_ERR(svn_wc__db_scan_base_repos(&db_repos_relpath,
>> +                                               &db_repos_root_url,
>> +                                               &db_repos_uuid,
>> +                                               db, local_abspath,
>> +                                               scratch_pool,
>> scratch_pool));
>
>
> What about a deleted child of a copy operation?

The function simply returns if the node is deleted.  I recently mae it
return if the node is not-present as well.

-- 
Philip

RE: svn commit: r981479 - /subversion/trunk/subversion/libsvn_wc/adm_files.c

Posted by Bert Huijben <be...@qqmail.nl>.

> -----Original Message-----
> From: philip@apache.org [mailto:philip@apache.org]
> Sent: maandag 2 augustus 2010 14:19
> To: commits@subversion.apache.org
> Subject: svn commit: r981479 -
> /subversion/trunk/subversion/libsvn_wc/adm_files.c
> 
> Author: philip
> Date: Mon Aug  2 12:19:12 2010
> New Revision: 981479
> 
> URL: http://svn.apache.org/viewvc?rev=981479&view=rev
> Log:
> * subversion/libsvn_wc/adm_files.c
>   (svn_wc__internal_ensure_adm): Scan if the repository information is
> not
>    immediately available.
> 
> Suggested by: rhuijben
> 
> Modified:
>     subversion/trunk/subversion/libsvn_wc/adm_files.c
> 
> Modified: subversion/trunk/subversion/libsvn_wc/adm_files.c
> URL:
> http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_wc/adm_
> files.c?rev=981479&r1=981478&r2=981479&view=diff
> =======================================================================
> =======
> --- subversion/trunk/subversion/libsvn_wc/adm_files.c (original)
> +++ subversion/trunk/subversion/libsvn_wc/adm_files.c Mon Aug  2
> 12:19:12 2010
> @@ -648,6 +648,24 @@ svn_wc__internal_ensure_adm(svn_wc__db_t
>                                "revision %ld in '%s'"),
>                              revision, db_revision, local_abspath);
> 
> +      if (!db_repos_root_url)
> +        {
> +          if (status == svn_wc__db_status_added)
> +            SVN_ERR(svn_wc__db_scan_addition(NULL, NULL,
> +                                             &db_repos_relpath,
> +                                             &db_repos_root_url,
> +                                             &db_repos_uuid,
> +                                             NULL, NULL, NULL, NULL,
> +                                             db, local_abspath,
> +                                             scratch_pool,
> scratch_pool));
> +          else
> +            SVN_ERR(svn_wc__db_scan_base_repos(&db_repos_relpath,
> +                                               &db_repos_root_url,
> +                                               &db_repos_uuid,
> +                                               db, local_abspath,
> +                                               scratch_pool,
> scratch_pool));


What about a deleted child of a copy operation?

That is why I suggested that || !have_base on the first case. (I'm not 100% sure if that is enough to handle all 4th tree cases though as BASE_NODE might be switched below the delete)

	Bert 



RE: svn commit: r981479 - /subversion/trunk/subversion/libsvn_wc/adm_files.c

Posted by Bert Huijben <be...@qqmail.nl>.

> -----Original Message-----
> From: philip@apache.org [mailto:philip@apache.org]
> Sent: maandag 2 augustus 2010 14:19
> To: commits@subversion.apache.org
> Subject: svn commit: r981479 -
> /subversion/trunk/subversion/libsvn_wc/adm_files.c
> 
> Author: philip
> Date: Mon Aug  2 12:19:12 2010
> New Revision: 981479
> 
> URL: http://svn.apache.org/viewvc?rev=981479&view=rev
> Log:
> * subversion/libsvn_wc/adm_files.c
>   (svn_wc__internal_ensure_adm): Scan if the repository information is
> not
>    immediately available.
> 
> Suggested by: rhuijben
> 
> Modified:
>     subversion/trunk/subversion/libsvn_wc/adm_files.c
> 
> Modified: subversion/trunk/subversion/libsvn_wc/adm_files.c
> URL:
> http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_wc/adm_
> files.c?rev=981479&r1=981478&r2=981479&view=diff
> =======================================================================
> =======
> --- subversion/trunk/subversion/libsvn_wc/adm_files.c (original)
> +++ subversion/trunk/subversion/libsvn_wc/adm_files.c Mon Aug  2
> 12:19:12 2010
> @@ -648,6 +648,24 @@ svn_wc__internal_ensure_adm(svn_wc__db_t
>                                "revision %ld in '%s'"),
>                              revision, db_revision, local_abspath);
> 
> +      if (!db_repos_root_url)
> +        {
> +          if (status == svn_wc__db_status_added)
> +            SVN_ERR(svn_wc__db_scan_addition(NULL, NULL,
> +                                             &db_repos_relpath,
> +                                             &db_repos_root_url,
> +                                             &db_repos_uuid,
> +                                             NULL, NULL, NULL, NULL,
> +                                             db, local_abspath,
> +                                             scratch_pool,
> scratch_pool));
> +          else
> +            SVN_ERR(svn_wc__db_scan_base_repos(&db_repos_relpath,
> +                                               &db_repos_root_url,
> +                                               &db_repos_uuid,
> +                                               db, local_abspath,
> +                                               scratch_pool,
> scratch_pool));


What about a deleted child of a copy operation?

That is why I suggested that || !have_base on the first case. (I'm not 100% sure if that is enough to handle all 4th tree cases though as BASE_NODE might be switched below the delete)

	Bert