Julian Foad wrote:
> Does this attempt look like a sane way to determine whether a WC
> directory tree is the same as a repos directory tree?
> This is for the tree-conflict case where a merge wants to delete a dir,
> but first wants to know whether this WC dir is identical to the
> merge-left source dir.
> I'm trying again to write a comparison function,
> libsvn_client/merge.c:dirs_same_p(). This attempt uses some of the guts
> of repos_wc_diff() from libsvn_client/diff.c. Note that diff "summarize"
> would be doing much the same as this - retrieving minimal info on the
> differences - but is not implemented for repos:WC diffs. It looks like I
> can do it this way. The sheer number of access batons and callbacks and
> editors and things needed to set up this comparison is a bit daunting
> for me, but if it sounds reasonable I will plug in all the bits I can
> find and see if it works.
> Any comments gratefully received.
As far as I can tell (which isn't very far yet I'm afraid), approach 1 (the
diff editor) seems like the best choice in terms of reusing code, while
approach 2 frankly seems to be easier to read and understand.
If an empty subdir was removed, that is a change to the tree and a potential
tree conflict trigger. However, when I run `svn diff', I don't see if
directories were removed or not (see attached script, I ran it using the
current tree-conflicts branch). Is this due to the specific usage of the
diff editor in that case, or could it also be a problem here?
Neels Hofmeyr -- elego Software Solutions GmbH
Gustav-Meyer-Allee 25 / Gebäude 12, 13355 Berlin, Germany
phone: +49 30 23458696 mobile: +49 177 2345869 fax: +49 30 23458695
http://www.elegosoft.com | Geschäftsführer: Olaf Wagner | Sitz: Berlin
Handelsreg: Amtsgericht Charlottenburg HRB 77719 | USt-IdNr: DE163214194
Received on 2008-09-02 05:22:02 CEST