You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@subversion.apache.org by Bogdan Cristea <cr...@gmail.com> on 2008/10/22 12:20:04 UTC
Merging two branches
I have a mixed c,c++ and java source files in two different branches. I
have done a checkout from one branch, then I have used svn merge
svn://other/branch, but when the svn client discovers a conflict between
different versions of the same file (for example a java file) the entire file
content is marked as different even if in reality only several lines differ.
This issue is annoying when the file is large and one needs only to see
the lines where the two file versions differ. Is there a way to solve this
issue?
regards
--
Bogdan Cristea
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Re: Merging two branches
Posted by Andy Levy <an...@gmail.com>.
On Wed, Oct 22, 2008 at 14:52, Bogdan Cristea <cr...@gmail.com> wrote:
> This could be indeed an explanation, the development environment is
> mixed between Windows and Linux.
> Is there a way to be sure that all submitted files use the same line endings ?
Unless you have a need for specific line endings in your files,
svn:eol-style set to native can help alleviate a lot of the trouble.
As can using editors on Windows which have a clue about non-Windows EOL markers.
> On Wed, Oct 22, 2008 at 9:04 PM, Tyler Roscoe <ty...@cryptio.net> wrote:
>> On Wed, Oct 22, 2008 at 03:20:04PM +0300, Bogdan Cristea wrote:
>>> I have a mixed c,c++ and java source files in two different branches. I
>>> have done a checkout from one branch, then I have used svn merge
>>> svn://other/branch, but when the svn client discovers a conflict between
>>> different versions of the same file (for example a java file) the entire file
>>> content is marked as different even if in reality only several lines differ.
>>> This issue is annoying when the file is large and one needs only to see
>>> the lines where the two file versions differ. Is there a way to solve this
>>> issue?
>>
>> Is it possible you are getting conflicts because of whitespace/line
>> endings issues? Do you have a mixed development environment (Windows +
>> UNIX)?
>>
>> tyler
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
>> For additional commands, e-mail: users-help@subversion.tigris.org
>>
>>
>
>
>
> --
> Bogdan Cristea
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
> For additional commands, e-mail: users-help@subversion.tigris.org
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Re: Merging two branches
Posted by Adam Monsen <ha...@gmail.com>.
On Wed, Oct 22, 2008 at 1:52 PM, Bogdan Cristea wrote:
> Is there a way to be sure that all submitted files use the same line endings ?
Yep, as Andy just mentioned.
Here's a small guide I wrote on this topic:
http://article.gmane.org/gmane.comp.finance.mifos.devel/4172/
Hope this helps,
-Adam
--
Adam Monsen
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Re: Merging two branches
Posted by Bogdan Cristea <cr...@gmail.com>.
This could be indeed an explanation, the development environment is
mixed between Windows and Linux.
Is there a way to be sure that all submitted files use the same line endings ?
On Wed, Oct 22, 2008 at 9:04 PM, Tyler Roscoe <ty...@cryptio.net> wrote:
> On Wed, Oct 22, 2008 at 03:20:04PM +0300, Bogdan Cristea wrote:
>> I have a mixed c,c++ and java source files in two different branches. I
>> have done a checkout from one branch, then I have used svn merge
>> svn://other/branch, but when the svn client discovers a conflict between
>> different versions of the same file (for example a java file) the entire file
>> content is marked as different even if in reality only several lines differ.
>> This issue is annoying when the file is large and one needs only to see
>> the lines where the two file versions differ. Is there a way to solve this
>> issue?
>
> Is it possible you are getting conflicts because of whitespace/line
> endings issues? Do you have a mixed development environment (Windows +
> UNIX)?
>
> tyler
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
> For additional commands, e-mail: users-help@subversion.tigris.org
>
>
--
Bogdan Cristea
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Re: Merging two branches
Posted by Tyler Roscoe <ty...@cryptio.net>.
On Wed, Oct 22, 2008 at 03:20:04PM +0300, Bogdan Cristea wrote:
> I have a mixed c,c++ and java source files in two different branches. I
> have done a checkout from one branch, then I have used svn merge
> svn://other/branch, but when the svn client discovers a conflict between
> different versions of the same file (for example a java file) the entire file
> content is marked as different even if in reality only several lines differ.
> This issue is annoying when the file is large and one needs only to see
> the lines where the two file versions differ. Is there a way to solve this
> issue?
Is it possible you are getting conflicts because of whitespace/line
endings issues? Do you have a mixed development environment (Windows +
UNIX)?
tyler
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Re: Merging two branches
Posted by Ryan Schmidt <su...@ryandesign.com>.
On Oct 24, 2008, at 07:50, Bogdan Cristea wrote:
> On Friday 24 October 2008 15:44:42 you wrote:
>
>> On Fri, Oct 24, 2008 at 07:52, Bogdan Cristea wrote:
>>
>>> I have tried to change the svn:eol-style property to native in both
>>> branches, but still when the svn client discovers a conflict between
>>> different versions of the same file (for example a java file) the
>>> entire
>>> file content is marked as different. Are there any solutions to
>>> get only
>>> the exact lines where the two versions differ when pushing
>>> 'e' (edit)?
>>> BTW I use svn 1.5.3
>>
>> Simply setting the property isn't enough. If you have mixed line
>> endings, there will still be problems; you need to set the property
>> AND correct the line endings the first time.
>
> Suversion book says:
>
>> This causes the file to contain the EOL markers that are native to
>> the
>> operating system on which Subversion was run. In other words, if a
>> user on a
>> Windows machine checks out a working copy that contains a file
>> with an
>> svn:eol-style property set to native, that file will contain CRLF EOL
>> markers. A Unix user checking out a working copy that contains the
>> same file
>> will see LF EOL markers in his copy of the file.
>
>
> So if both braches have svn:eol-style set to native, a merge should
> work with
> native EOLs. Am I wrong?
It may be that if the changes you're merging happened before you set
svn:eol-style (as they did in your case), then Subversion can't do
the merge right. You may have to do this merge manually (I mean,
resolve the conflicts manually). Any merges of changes made after
svn:eol-style was set correctly should work properly.
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Re: Merging two branches
Posted by Bogdan Cristea <cr...@gmail.com>.
On Friday 24 October 2008 15:44:42 you wrote:
> On Fri, Oct 24, 2008 at 07:52, Bogdan Cristea <cr...@gmail.com> wrote:
> > On Wednesday 22 October 2008 15:20:04 you wrote:
> >> I have a mixed c,c++ and java source files in two different
> >> branches. I have done a checkout from one branch, then I have used svn
> >> merge svn://other/branch, but when the svn client discovers a conflict
> >> between different versions of the same file (for example a java file)
> >> the entire file content is marked as different even if in reality only
> >> several lines differ. This issue is annoying when the file is large and
> >> one needs only to see the lines where the two file versions differ. Is
> >> there a way to solve this issue?
> >> regards
> >
> > I have tried to change the svn:eol-style property to native in both
> > branches, but still when the svn client discovers a conflict between
> > different versions of the same file (for example a java file) the entire
> > file content is marked as different. Are there any solutions to get only
> > the exact lines where the two versions differ when pushing 'e' (edit)?
> > BTW I use svn 1.5.3
>
> Simply setting the property isn't enough. If you have mixed line
> endings, there will still be problems; you need to set the property
> AND correct the line endings the first time.
Suversion book says:
This causes the file to contain the EOL markers that are native to the
operating system on which Subversion was run. In other words, if a user on a
Windows machine checks out a working copy that contains a file with an
svn:eol-style property set to native, that file will contain CRLF EOL
markers. A Unix user checking out a working copy that contains the same file
will see LF EOL markers in his copy of the file.
So if both braches have svn:eol-style set to native, a merge should work with
native EOLs. Am I wrong?
--
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Re: Merging two branches
Posted by Andy Levy <an...@gmail.com>.
On Fri, Oct 24, 2008 at 07:52, Bogdan Cristea <cr...@gmail.com> wrote:
> On Wednesday 22 October 2008 15:20:04 you wrote:
>> I have a mixed c,c++ and java source files in two different branches.
>> I have done a checkout from one branch, then I have used svn merge
>> svn://other/branch, but when the svn client discovers a conflict between
>> different versions of the same file (for example a java file) the entire
>> file content is marked as different even if in reality only several lines
>> differ. This issue is annoying when the file is large and one needs only to
>> see the lines where the two file versions differ. Is there a way to solve
>> this issue?
>> regards
>
> I have tried to change the svn:eol-style property to native in both branches,
> but still when the svn client discovers a conflict between different versions
> of the same file (for example a java file) the entire file content is marked
> as different. Are there any solutions to get only the exact lines where the
> two versions differ when pushing 'e' (edit)?
> BTW I use svn 1.5.3
Simply setting the property isn't enough. If you have mixed line
endings, there will still be problems; you need to set the property
AND correct the line endings the first time.
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Re: Merging two branches
Posted by Bogdan Cristea <cr...@gmail.com>.
On Wednesday 22 October 2008 15:20:04 you wrote:
> I have a mixed c,c++ and java source files in two different branches.
> I have done a checkout from one branch, then I have used svn merge
> svn://other/branch, but when the svn client discovers a conflict between
> different versions of the same file (for example a java file) the entire
> file content is marked as different even if in reality only several lines
> differ. This issue is annoying when the file is large and one needs only to
> see the lines where the two file versions differ. Is there a way to solve
> this issue?
> regards
I have tried to change the svn:eol-style property to native in both branches,
but still when the svn client discovers a conflict between different versions
of the same file (for example a java file) the entire file content is marked
as different. Are there any solutions to get only the exact lines where the
two versions differ when pushing 'e' (edit)?
BTW I use svn 1.5.3
regards
--
Bogdan Cristea
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org