You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@subversion.apache.org by "Neels J. Hofmeyr" <ne...@elego.de> on 2008/11/20 05:14:32 UTC

Issue #3322, branch tc_url_rev


Julian Foad wrote:
> I have made a start on this. See attached. If you'd like to work on it
> tonight that would be great.

I've been doing other stuff until now, so I'm not going to get far. I've
created a branch for it: tc_url_rev.

Some comments:

[[[
-  /** The node type of the path being operated on */
+  /** The node type of the path being operated on (for a tree conflict,
+   *  ### which version?) */
   svn_node_kind_t node_kind;
]]]

I was thinking recently that we should actually have all sides.

+  /** The node type of the path being operated on, on the source's
+   * merge-left side of the operation. @see .... */
+  svn_node_kind_t node_kind_source_left;
+
+  /** The node type of the path being operated on, on the source's
+   * merge-right side of the operation. @see .... */
+  svn_node_kind_t node_kind_source_right;
+
+  /** The node type of the path being operated on, on the target side
+   * of the operation, usually the working copy. @see node_kind_... */
+  svn_node_kind_t node_kind_target;


There is be a conflict when the merge-left is not the same kind as the
target, currently.

There also is a conflict when the merge-right side is obstructed, e.g. by a
different node kind. ... can that happen ? ... yes, it can, right?


[[[
   /** If not NULL, an open working copy access baton to either the
    *  path itself (if @c path is a directory), or to the parent
-   *  directory (if @c path is a file.) */
+   *  directory (if @c path is a file.) For a tree conflict,
+   *  ### to what? */
   svn_wc_adm_access_t *access;
]]]

Currently, definitely always to the parent dir, even for dirs. If we're
going to have TCs on the victims, then this would be as the comment says.

[[[
+ * NODE_KIND must the the node kind of "old" and "theirs" and "mine";
]]]
fixed typo.

[[[
+ * this function cannot cope with node kind clashes.
]]]
Could, if we reported all node kinds. But as below, this might become quite
complex...

[[[
Index: subversion/libsvn_wc/update_editor.c
===================================================================
--- subversion/libsvn_wc/update_editor.c	(revision 34272)
+++ subversion/libsvn_wc/update_editor.c	(working copy)
@@ -1391,18 +1391,21 @@ check_tree_conflict(svn_wc_conflict_desc
                     svn_wc_conflict_action_t action,
                     apr_pool_t *pool)
 {
+  svn_node_kind_t their_node_kind = svn_node_unknown;
   svn_wc_conflict_reason_t reason = (svn_wc_conflict_reason_t)(-1);

   switch (action)
     {
     case svn_wc_conflict_action_edit:
       /* Use case 1: Modifying a locally-deleted item. */
+      /* ### their_node_kind = ?; */
]]]

Hmm! That's a good question.


I'm sorry, my time's up for today. So let's all use the branch and schaukel
this baby.

~Neels



Re: Issue #3322, branch tc_url_rev

Posted by Julian Foad <ju...@btopenworld.com>.
On Fri, 2008-11-21 at 05:53 +0100, Neels J. Hofmeyr wrote:
> Hey Julian,
> 
> I'm getting the idea that we should rather report
> 
>  Older URL: (file) file://my/repos/trunk/foo@2
>  Their URL: (dir) file://my/repos/branches/bar/foo@7
> 
> When I'm going to *use* this information, I don't necessarily want it
> separated, but rather all in one so I can just copy-paste it. That would
> also make the documentation a lot simpler.

Yes, I was thinking that too. It seemed important to separate the repos
URL from the path-in-repos for storage (though I'm not 100% sure), and
it makes for neater output in some ways, but... yes, the most usable for
the command-line is a single URL@REV.

I will do that now.

- Julian



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Re: Issue #3322, branch tc_url_rev

Posted by "Neels J. Hofmeyr" <ne...@elego.de>.
Hey Julian,

I'm getting the idea that we should rather report

 Older URL: (file) file://my/repos/trunk/foo@2
 Their URL: (dir) file://my/repos/branches/bar/foo@7

When I'm going to *use* this information, I don't necessarily want it
separated, but rather all in one so I can just copy-paste it. That would
also make the documentation a lot simpler.

Good?
~Neels



Re: Issue #3322, branch tc_url_rev

Posted by Julian Foad <ju...@btopenworld.com>.
On Thu, 2008-11-20 at 14:22 +0000, Julian Foad wrote:
> On Thu, 2008-11-20 at 06:14 +0100, Neels J. Hofmeyr wrote:
> > [[[
> > Index: subversion/libsvn_wc/update_editor.c
> > ===================================================================
> > --- subversion/libsvn_wc/update_editor.c	(revision 34272)
> > +++ subversion/libsvn_wc/update_editor.c	(working copy)
> > @@ -1391,18 +1391,21 @@ check_tree_conflict(svn_wc_conflict_desc
> >                      svn_wc_conflict_action_t action,
> >                      apr_pool_t *pool)
> >  {
> > +  svn_node_kind_t their_node_kind = svn_node_unknown;
> >    svn_wc_conflict_reason_t reason = (svn_wc_conflict_reason_t)(-1);
> > 
> >    switch (action)
> >      {
> >      case svn_wc_conflict_action_edit:
> >        /* Use case 1: Modifying a locally-deleted item. */
> > +      /* ### their_node_kind = ?; */
> > ]]]
> > 
> > Hmm! That's a good question.

This bit, I haven't investigated yet.


> > I'm sorry, my time's up for today. So let's all use the branch and schaukel
> > this baby.
> 
> I'll continue.

OK, I've done a chunk of the rest of it: merge fills in the data nicely,
it gets stored in the WC, and "svn info" prints it. If you'd like to
have a go at some more tonight, be my guest.

- Julian



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Re: Issue #3322, branch tc_url_rev

Posted by Julian Foad <ju...@btopenworld.com>.
On Thu, 2008-11-20 at 06:14 +0100, Neels J. Hofmeyr wrote:
> 
> Julian Foad wrote:
> > I have made a start on this. See attached. If you'd like to work on it
> > tonight that would be great.
> 
> I've been doing other stuff until now, so I'm not going to get far. I've
> created a branch for it: tc_url_rev.

Great.

> Some comments:
> 
> [[[
> -  /** The node type of the path being operated on */
> +  /** The node type of the path being operated on (for a tree conflict,
> +   *  ### which version?) */
>    svn_node_kind_t node_kind;
> ]]]
> 
> I was thinking recently that we should actually have all sides.
> 
> +  /** The node type of the path being operated on, on the source's
> +   * merge-left side of the operation. @see .... */
> +  svn_node_kind_t node_kind_source_left;
> +
> +  /** The node type of the path being operated on, on the source's
> +   * merge-right side of the operation. @see .... */
> +  svn_node_kind_t node_kind_source_right;
> +
> +  /** The node type of the path being operated on, on the target side
> +   * of the operation, usually the working copy. @see node_kind_... */
> +  svn_node_kind_t node_kind_target;

Yes... That's why I included a "node_kind" field in the "older_version"
and "their_version" data. (I am not yet trying to include data for the
"target"/"mine" version, because it's often not a repository version,
but I would aim to do so eventually.)


> There is be a conflict when the merge-left is not the same kind as the
> target, currently.
> 
> There also is a conflict when the merge-right side is obstructed, e.g. by a
> different node kind. ... can that happen ? ... yes, it can, right?

Something like that, yes.


> [[[
>    /** If not NULL, an open working copy access baton to either the
>     *  path itself (if @c path is a directory), or to the parent
> -   *  directory (if @c path is a file.) */
> +   *  directory (if @c path is a file.) For a tree conflict,
> +   *  ### to what? */
>    svn_wc_adm_access_t *access;
> ]]]
> 
> Currently, definitely always to the parent dir, even for dirs. If we're
> going to have TCs on the victims, then this would be as the comment says.

Thanks.

> [[[
> + * NODE_KIND must the the node kind of "old" and "theirs" and "mine";
> ]]]
> fixed typo.
> 
> [[[
> + * this function cannot cope with node kind clashes.
> ]]]
> Could, if we reported all node kinds. But as below, this might become quite
> complex...
> 
> [[[
> Index: subversion/libsvn_wc/update_editor.c
> ===================================================================
> --- subversion/libsvn_wc/update_editor.c	(revision 34272)
> +++ subversion/libsvn_wc/update_editor.c	(working copy)
> @@ -1391,18 +1391,21 @@ check_tree_conflict(svn_wc_conflict_desc
>                      svn_wc_conflict_action_t action,
>                      apr_pool_t *pool)
>  {
> +  svn_node_kind_t their_node_kind = svn_node_unknown;
>    svn_wc_conflict_reason_t reason = (svn_wc_conflict_reason_t)(-1);
> 
>    switch (action)
>      {
>      case svn_wc_conflict_action_edit:
>        /* Use case 1: Modifying a locally-deleted item. */
> +      /* ### their_node_kind = ?; */
> ]]]
> 
> Hmm! That's a good question.
> 
> 
> I'm sorry, my time's up for today. So let's all use the branch and schaukel
> this baby.

I'll continue.

- Julian



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org