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

Re: prop conflict editing and newlines

From: Karl Fogel <kfogel_at_red-bean.com>
Date: 2007-11-25 06:44:32 CET

"David Glasser" <glasser@davidglasser.net> writes:
> Hmm, so I got a prop conflict on 1.4.x and selected (e)dit and got this:
>
> <<<<<<< (modified)
> [...lots of stuff]=======
> [...lots more stuff]>>>>>>>
> (latest)
>
> Shouldn't there be newlines before the middle and end conflict markers?

+1. It seems our code for this stuff is pathetically unabstracted; we
apparently don't even have #defined constants for the marker texts:

   $ find . -name "*.[ch]" -print | xargs grep '>>>>>' \
                                  | magically-eliminate-irrelevant-matches
   ./subversion/libsvn_wc/merge.c: \
        right_marker = apr_psprintf(pool, ">>>>>>> %s", right_label);
   ./subversion/libsvn_wc/merge.c: \
        right_marker = ">>>>>>> .new";
   ./subversion/libsvn_diff/diff_file.c: \
        : apr_psprintf(pool, ">>>>>>> %s",
   ./subversion/libsvn_diff/diff_memory.c: \
        ? conflict_latest : ">>>>>>> (latest)",
   $

I haven't even looked at those areas to see how to conditionally add a
newline iff a newline doesn't already precede the marker. But that's
what we'd want to do, I think.

-Karl

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Sun Nov 25 06:44:40 2007

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.