You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@subversion.apache.org by Scott Palmer <sc...@2connected.org> on 2005/01/02 04:12:06 UTC
Odd merge conflicts
I was recently experimenting with working on new features in a branch.
I tried to keep my branch up to date by periodically merging changes
from the trunk into my branch. It did not go well.
I made a branch, added a new file to the branch and put some
experimental code in that new file. I merged changes from the trunk
using:
(all of the svn commands below were executed in the root of the
branch's working copy.)
svn merge -rA:B svn://blah/trunk
where A: is the revision in which my branch was created, and B is the
same revision as the current HEAD
That worked fine, and I checked in the branch with the new changes and
updated the working copy.
Then after many more changes on the trunk, and NO changes on the
branch, I tried again with:
svn -rB:HEAD svn://blah/trunk
Where B is the same revision as B in the previous merge.
This resulted in numerous conflicted files. The thing is those files
were never modified in the working copy, so why would they be
conflicted? whatever changes were made in the trunk should have neatly
applied, but instead it seems that the entire file was considered
conflicted.
Now one of the changes to the files on the trunk included adding the
svn:eol-style property to all the files. Does the addition of the
svn:eol-style property in the trunk mess up the merge?
Scott
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Re: Odd merge conflicts
Posted by Scott Palmer <sc...@2connected.org>.
On Jan 10, 2005, at 4:47 PM, Ben Collins-Sussman wrote:
> Scott,
>
> Your algorithmic description of "keeping the branch in sync with the
> trunk" sounds spot-on.
Good.
> AFAIK, adding eol-style properties as part of a merge shouldn't create
> any problems. It's no different than running 'svn propset' by hand on
> your working copy.
Thanks, that was the part I was waiting to hear about... Now that you
have confirmed this I will try to find the time to make an attempt at
reproducing the issue. I'm suspecting that it may have been something
silly to do with reformatting whitespace, but I need to double check.
I should be able to confirm this by stepping back through the revisions
of the branch to before the merge and then attempting the merge again
in a fresh working copy.
Scott
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Re: Odd merge conflicts
Posted by Scott Palmer <sc...@2connected.org>.
On Jan 10, 2005, at 4:47 PM, Ben Collins-Sussman wrote:
> AFAIK, adding eol-style properties as part of a merge shouldn't create
> any problems. It's no different than running 'svn propset' by hand on
> your working copy.
>
I thought about this some more. As I recall, when svn:eol-style is set
to 'native' the files are stored in the repository with LF line
termination only, when checking out on Windows the line endings are
changed to CR LF only for the working copy, right?
If that is the case, then when I added the svn:eol-style property on my
windows machine all of the files that previously had CR LF line
terminations in the repository were replaced with a file that differed
on every single line from the previous version. That would be the case
even though when I ran 'svn st' in my working copy before committing
the change it only showed the modification of the file's properties
only, and not the files contents.
Is it possible that the massive EOL changes confused the merge - given
that the entire file appeared different? You see, my branched copy was
on Mac OS X, so it would naturally use LF termination, but all of the
files that I had not edited on the Mac would still have the CR LF line
termination because I had not yet set the svn:eol-style property to
native in the branch.
I figure that on a unix flavor OS it would be just the property that
gets set, and the LF line terminations would not need to be touched in
the repository. Perhaps making the same procedure work fine.
Here were my steps, sorry it isn't an exact recipe yet.. I'm going to
try this all tomorrow when I have the Windows machine and the Mac sided
by side.
1 - the svn:eol-style property was NOT set initially.
2 - I started trunk development on Windows, most files had CR LF line
endings
3 - I made a development branch on Mac OS X
4 - I changed several files on the trunk through several revisions and
merged in into my dev branch on the Mac, which only added new files and
did make significant changes to any existing files.
5 - I merged the trunk to my dev branch, it worked fine.
6 - I made more changes on the trunk, including the addition of the
svn:eol-style property which I set to 'native' for each file.
7 - I merged the trunk into the branch on the Mac. That's when things
did not go well. All line endings would need to be changed as part of
the merge.
Scott
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Re: Odd merge conflicts
Posted by Ben Collins-Sussman <su...@collab.net>.
On Jan 10, 2005, at 3:37 PM, Scott Palmer wrote:
>
> On Jan 10, 2005, at 4:28 PM, John Schulz wrote:
>
>> Did you ever get your question answered? I've been keeping track on
>> the svn list and haven't seen a concrete resolution. :-)
>
> No, what you see below is all I got. Even if I was off by one, which
> I don't think I am (someone please tell me), I think the merge should
> have been clean for most cases.
>
>
Scott,
Your algorithmic description of "keeping the branch in sync with the
trunk" sounds spot-on. It's exactly the algorithm we're following as
we develop the new locking feature on a branch. And I've even
documented it in the book last weekend:
http://svnbook.red-bean.com/en/1.1/ch04s04.html#svn-ch-4-sect-4.4
AFAIK, adding eol-style properties as part of a merge shouldn't create
any problems. It's no different than running 'svn propset' by hand on
your working copy.
In any case, the problem is that your description is purely anecdotal.
Unless you can show us a transcript of the exact commands and results,
there's not much we can do to help.
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Re: Odd merge conflicts
Posted by Scott Palmer <sc...@2connected.org>.
On Jan 10, 2005, at 4:28 PM, John Schulz wrote:
> Did you ever get your question answered? I've been keeping track on
> the svn list and haven't seen a concrete resolution. :-)
No, what you see below is all I got. Even if I was off by one, which I
don't think I am (someone please tell me), I think the merge should
have been clean for most cases.
Scott
> On Jan 01, 2005, at 23:46, Scott Palmer wrote:
>> On Jan 1, 2005, at 11:30 PM, Christopher Ness wrote:
>>> On Sat, 2005-01-01 at 23:12 -0500, Scott Palmer wrote:
>>>> I tried again with:
>>>>
>>>> svn -rB:HEAD svn://blah/trunk
>>>
>>> Off by one error? Did you try to merge the changes in revision B
>>> twice
>>> into your branch with the above command? Perhaps...
>>>
>>> svn -r{B+1}:HEAD svn://blah/trunk
>>
>> I thought about that. The merge is basically applying the diff
>> between the supplied revisions is it not? So -r1:2 would merge the
>> changes to go from rev 1 to rev 2, and -r2:3 would merge the changes
>> to go from rev 2 to rev 3. Right?
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Re: Odd merge conflicts
Posted by Scott Palmer <sc...@2connected.org>.
On Jan 1, 2005, at 11:30 PM, Christopher Ness wrote:
> On Sat, 2005-01-01 at 23:12 -0500, Scott Palmer wrote:
>> I tried again with:
>>
>> svn -rB:HEAD svn://blah/trunk
>
> Off by one error? Did you try to merge the changes in revision B twice
> into your branch with the above command? Perhaps...
>
> svn -r{B+1}:HEAD svn://blah/trunk
I thought about that. The merge is basically applying the diff between
the supplied revisions is it not? So -r1:2 would merge the changes to
go from rev 1 to rev 2, and -r2:3 would merge the changes to go from
rev 2 to rev 3. Right?
Scott
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org