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

[PATCH] Fix failing three-way diff for properties

From: Daniel Näslund <daniel_at_longitudo.com>
Date: Thu, 29 Oct 2009 23:50:56 +0100

[[[
Fix failing three way diff for properties when invoking diff-full (df)
in the interactive conflict resolutioner.

* subversion/libsvn_wc/util.c
  (svn_wc__cd2_to_cd): All the usual files needed in a three way diff is
    available for properties as well as markers for binary format and
    mime.

* subversion/svn/conflict-callbacks.c
  (svn_cl__conflict_handler): Set diff_allowed only if desc->is_binary
    is false.
]]]

It turned out that when creating svn_wc__cd2_to_cd someone forgot that
we now have the ability to do three way diffs for properties.

I changed the condition for when a diff is allowed in the conflict
handler but I wonder... If no mime-type is set is_binary is set to false
for properties. But how do I set a mime-type for a property? This may be
a bit too simple.

Another thing is that we may end up with those pescious 'No newline at
end of file' :
[[[
Conflict for property 'prop' discovered on '/tmp/branch/foo'.
Select: (p) postpone, (df) diff-full, (e) edit,
        (s) show all options: df
--- /tmp/branch/svn-VLCOnf tor okt 29 23:44:33 2009
+++ /tmp/svn-IUkBeS tor okt 29 23:44:33 2009
@@ -1,4 +1,10 @@
-A
-Whole
-Lotta
-Lines
\ No newline at end of file
+<<<<<<< (modified)
+The
+Brown
+Fox
+Jumped=======
+Some
+Other
+Randomly
+Choosen
+Words>>>>>>> (latest)
]]]

For clarity I could always add a newline to the properties when diffing.
Since they will not be used for resolution by hand no harm done. But the
markers will always be alone on one line increasing readability. Is that
ok?

I haven't run make check yet. Will do it first thing tomorrow.

/Daniel

Received on 2009-10-29 23:51:10 CET

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