You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@subversion.apache.org by Daniel Becroft <dj...@gmail.com> on 2011/01/31 06:21:42 UTC

[PATCH] Fix issue 3686 - executable flag is not maintained during a merge

Hi,

Attached is a (work-in-progress) patch to fix issue 3686[1].

For those unfamiliar with the issue: when a binary file (with svn:executable
set) is modified as a result of a merge, the executable flag is missing
post-merge. A commit will restore the flag.

I've looked into the code, and have found the problem. Essentially, in
libsvn_client/merge.c, there is a "Special case" merge for binary files.
Essentially, if the WORKING version is equal to the LEFT version, then we
directly copy the RIGHT over the top. As a result, the file never gets
included in the workqueue, and the sync_file_flags task is never run.

I believe the solution is to move this logic from libsvn_client to
libsvn_wc, and specifically the merge_binary_file function. This has further
effects as well. This function would always raise a conflict for binary
files, whereas now it will attempt to merge (using the above special case
logic), and if this isn't possible, then raise the conflict.

I'm submitting this patch as a "am I on the right track?" submission, rather
than a final job. I'll craft a log message if I'm correct.

Cheers,
Daniel B.

Re: [PATCH] Fix issue 3686 - executable flag is not maintained during a merge

Posted by Daniel Becroft <dj...@gmail.com>.
 On Tue, Feb 1, 2011 at 12:24 AM, C. Michael Pilato <cm...@collab.net>wrote:

> On 01/31/2011 12:21 AM, Daniel Becroft wrote:
> > I'm submitting this patch as a "am I on the right track?" submission,
> rather
> > than a final job. I'll craft a log message if I'm correct.
>
> Heh, I remember when this special-case was introduced.  Oh, memories...
>
> Anyway, I've not deeply reviewed what you've done thus far, but +1 on the
> approach.
>

Thanks for that, Michael (I believe you committed this special case as well,
back in 2003 or there abouts). I'll finish up the patch and re-submit with a
complete log message.

Cheers,
Daniel B.

Re: [PATCH] Fix issue 3686 - executable flag is not maintained during a merge

Posted by "C. Michael Pilato" <cm...@collab.net>.
On 01/31/2011 12:21 AM, Daniel Becroft wrote:
> I'm submitting this patch as a "am I on the right track?" submission, rather
> than a final job. I'll craft a log message if I'm correct.

Heh, I remember when this special-case was introduced.  Oh, memories...

Anyway, I've not deeply reviewed what you've done thus far, but +1 on the
approach.

-- 
C. Michael Pilato <cm...@collab.net>
CollabNet   <>   www.collab.net   <>   Distributed Development On Demand