[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

[RFC] Don't allow a non-existent path to be a tree conflict victim?

From: Julian Foad <julianfoad_at_btopenworld.com>
Date: Tue, 04 Nov 2008 17:36:23 +0000

I'm wondering if we should change the fact that a tree conflict victim
can presently be a non-existent node in the WC, because it's awkward to
work with.


  * A tree conflict can arise on a non-existent or unversioned victim.
(e.g. A merge tries to move a file which was earlier deleted and
committed in the target, so does not currently exist in the target.)

  * A tree conflict can only arise on a victim that is an immediate
child of a versioned parent. (If an incoming change applies somewhere
inside an unversioned directory tree, the conflict is raised higher up
the tree structure and not down at this level).

  * The metadata about the tree conflict is stored in the WC entry of
the victim's immediate parent.

  * We can access the metadata about the tree conflict on any victim,
given the victim's path. (svn_wc_get_tree_conflict().)

So far, so good - there is always a place to store and retrieve the tree
conflict information about the victim, whether the victim exists or not.


  * Recursion (walking) of the tree is now difficult if we want to reach
all interesting nodes including tree conflict victims. The normal WC
"walker" function svn_wc_walk_entries3() only walks versioned items. We
need either to change it or to work around this limitation in each point
of use.

  * A node without an 'entry' cannot be a member of a changelist. I
don't know if this matters much in itself, but it is a limitation and an
asymmetry and an indicator that something is wrong.

Already, the implementation of "status" and "info" has suffered from
complexity and inconsistency because of this: I'm pretty sure that "svn
info -R" recurses into a different set of nodes than "svn status" does.
I'm now trying to implement per-victim resolve and revert, and it's
difficult without a tree walker that visits nonexistent tree-conflicted


  a) Make it easier to crawl the tree, including such nodes. Either an
extension to svn_wc_walk_entries3(), or a supplementatry walker.

  b) Ensure there is always a WC entry for a path whenever we have any
state to record about that path. Create a WC entry, with some suitable
state indicator that it is "unversioned" or of node kind "none", when we
raise a conflict on such a path.

I haven't gone far down either road but I will do.


- Julian

To unsubscribe, e-mail: dev-unsubscribe_at_subversion.tigris.org
For additional commands, e-mail: dev-help_at_subversion.tigris.org
Received on 2008-11-04 18:36:43 CET

This is an archived mail posted to the Subversion Dev mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.