You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@subversion.apache.org by Julian Foad <ju...@btopenworld.com> on 2012/04/11 15:50:19 UTC

docco improvement for svn_wc__db_scan_deletion()

Suggesting a docco improvement for svn_wc__db_scan_deletion():

--- Base (BASE)
+++ Locally Modified (Based On LOCAL)
@@ -2600,10 +2600,10 @@
    MOVED_TO_ABSPATH will specify the path where this node was moved to
    if the node has moved-away.
 
-   If the node was moved-away, MOVED_TO_OP_ROOT_ABSPATH will specify the root
-   of the copy operation that created the move destination.
-   If LOCAL_ABSPATH itself is the root of the copy, MOVED_TO_OP_ROOT_ABSPATH
-   equals MOVED_TO_ABSPATH.
+   If the node was moved-away, MOVED_TO_OP_ROOT_ABSPATH will specify the
+   target-root of the move operation.  If LOCAL_ABSPATH itself is the
+   source-root of the move, then MOVED_TO_OP_ROOT_ABSPATH equals
+   MOVED_TO_ABSPATH.
 
    All OUT parameters may be set to NULL to indicate a lack of interest in
    that piece of information.



OK to commit?

(There's more to do, but gotta start somewhere.)

- Julian


Re: docco improvement for svn_wc__db_scan_deletion()

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

>> -----Original Message-----
>> From: MARTIN PHILIP [mailto:codematters@ntlworld.com] On Behalf Of Philip
>> Martin
>> Sent: woensdag 11 april 2012 16:33
>> To: Julian Foad
>> Cc: SubversionDevelopment
>> Subject: Re: docco improvement for svn_wc__db_scan_deletion()

>> To be honest I'm not sure exactly what this function is supposed to do
>> with multi-layer-move, or whether what it does at the moment is correct.
>> Consider:
>> 
>>   svn mv A/f A/g
>>   svn mv A B
>> 
>>   select op_depth, local_relpath, presence, moved_to, moved_here
>>   from nodes order by op_depth, local_relpath"
>> 
>> 0||normal||
>> 0|A|normal||
>> 0|A/f|normal||
>> 1|A|base-deleted|B|
>> 1|A/f|base-deleted||
>> 1|B|normal||1
>> 1|B/f|normal||1
>> 2|B/f|base-deleted|B/g|0
>> 2|B/g|normal||1
>> 
>> What are MOVED_TO_ABSPATH and MOVED_TO_OP_ROOT_ABSPATH for A/f?
>
> "The world was much simpler when we stored moved_from only at op_depth 0/BASE."

I assume you mean moved_to rather than moved_from.

> The original WC-NG model only allowed moving files once.

What is "original"?  BASE+WORKING?  NODES with op_depth=0 for moved_to?

> The whole moving of files that aren't committed yet model is not well
> defined (yet). And I'm not entirely sure if it can be well-defined
> with cases like this.

I see problems with the scan_deletion API.  I suppose that might
indicate a problem with the data model, but it may simply be that the
query API is wrong.

-- 
uberSVN: Apache Subversion Made Easy
http://www.uberSVN.com

RE: docco improvement for svn_wc__db_scan_deletion()

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

> -----Original Message-----
> From: MARTIN PHILIP [mailto:codematters@ntlworld.com] On Behalf Of Philip
> Martin
> Sent: woensdag 11 april 2012 16:33
> To: Julian Foad
> Cc: SubversionDevelopment
> Subject: Re: docco improvement for svn_wc__db_scan_deletion()
> 
> Julian Foad <ju...@btopenworld.com> writes:
> 
> > Suggesting a docco improvement for svn_wc__db_scan_deletion():
> >
> > --- Base (BASE)
> > +++ Locally Modified (Based On LOCAL)
> > @@ -2600,10 +2600,10 @@
> >     MOVED_TO_ABSPATH will specify the path where this node was moved to
> >     if the node has moved-away.
> >
> > -   If the node was moved-away, MOVED_TO_OP_ROOT_ABSPATH will specify
> the root
> > -   of the copy operation that created the move destination.
> > -   If LOCAL_ABSPATH itself is the root of the copy,
> MOVED_TO_OP_ROOT_ABSPATH
> > -   equals MOVED_TO_ABSPATH.
> > +   If the node was moved-away, MOVED_TO_OP_ROOT_ABSPATH will specify
> the
> > +   target-root of the move operation.  If LOCAL_ABSPATH itself is the
> > +   source-root of the move, then MOVED_TO_OP_ROOT_ABSPATH equals
> > +   MOVED_TO_ABSPATH.
> >
> >     All OUT parameters may be set to NULL to indicate a lack of interest in
> >     that piece of information.
> >
> >
> >
> > OK to commit?
> >
> > (There's more to do, but gotta start somewhere.)
> 
> I suppose it's better.
> 
> To be honest I'm not sure exactly what this function is supposed to do
> with multi-layer-move, or whether what it does at the moment is correct.
> Consider:
> 
>   svn mv A/f A/g
>   svn mv A B
> 
>   select op_depth, local_relpath, presence, moved_to, moved_here
>   from nodes order by op_depth, local_relpath"
> 
> 0||normal||
> 0|A|normal||
> 0|A/f|normal||
> 1|A|base-deleted|B|
> 1|A/f|base-deleted||
> 1|B|normal||1
> 1|B/f|normal||1
> 2|B/f|base-deleted|B/g|0
> 2|B/g|normal||1
> 
> What are MOVED_TO_ABSPATH and MOVED_TO_OP_ROOT_ABSPATH for A/f?

"The world was much simpler when we stored moved_from only at op_depth 0/BASE."
The original WC-NG model only allowed moving files once.

The whole moving of files that aren't committed yet model is not well defined (yet). And I'm not entirely sure if it can be well-defined with cases like this.

	Bert


Re: docco improvement for svn_wc__db_scan_deletion()

Posted by Philip Martin <ph...@wandisco.com>.
Julian Foad <ju...@btopenworld.com> writes:

> Suggesting a docco improvement for svn_wc__db_scan_deletion():
>
> --- Base (BASE)
> +++ Locally Modified (Based On LOCAL)
> @@ -2600,10 +2600,10 @@
>     MOVED_TO_ABSPATH will specify the path where this node was moved to
>     if the node has moved-away.
>  
> -   If the node was moved-away, MOVED_TO_OP_ROOT_ABSPATH will specify the root
> -   of the copy operation that created the move destination.
> -   If LOCAL_ABSPATH itself is the root of the copy, MOVED_TO_OP_ROOT_ABSPATH
> -   equals MOVED_TO_ABSPATH.
> +   If the node was moved-away, MOVED_TO_OP_ROOT_ABSPATH will specify the
> +   target-root of the move operation.  If LOCAL_ABSPATH itself is the
> +   source-root of the move, then MOVED_TO_OP_ROOT_ABSPATH equals
> +   MOVED_TO_ABSPATH.
>  
>     All OUT parameters may be set to NULL to indicate a lack of interest in
>     that piece of information.
>
>
>
> OK to commit?
>
> (There's more to do, but gotta start somewhere.)

I suppose it's better.

To be honest I'm not sure exactly what this function is supposed to do
with multi-layer-move, or whether what it does at the moment is correct.
Consider:

  svn mv A/f A/g
  svn mv A B

  select op_depth, local_relpath, presence, moved_to, moved_here
  from nodes order by op_depth, local_relpath"

0||normal||
0|A|normal||
0|A/f|normal||
1|A|base-deleted|B|
1|A/f|base-deleted||
1|B|normal||1
1|B/f|normal||1
2|B/f|base-deleted|B/g|0
2|B/g|normal||1

What are MOVED_TO_ABSPATH and MOVED_TO_OP_ROOT_ABSPATH for A/f?

-- 
uberSVN: Apache Subversion Made Easy
http://www.uberSVN.com