You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@subversion.apache.org by Mathijs Romans <ma...@romansland.nl> on 2008/04/21 07:23:18 UTC

merge to identical file

Hi!

we have a typical setup where trunk is our stable version and
developing takes place in several branches. While development in a
brach takes place, the trunk may be updated with other changes. Now
suppose we want to merge one of these development branches back into
the trunk, we prefer to test it before we include it in the trunk. So
my idea was to first update the branch with all changes that have
taken place in the trunk. And if it works, to apply all changes in the
branch directly back into the trunk.

Now of course, in principle I'll be applying the changes in the trunk
twice. In the book Version Control with Subversion, it says:

"When patching a file, Subversion typically notices if the file
already has the change, and does nothing."

Now my question is this: in the case the merge is a diff between
versions A and B, applied to version X, if a file is identical in B
and X, is it guaranteed that the merge does nothing to it in all
cases? Or is "typically" still the right quantifier here? Is it then
probably best to make a "testing" branch to test merged components?

I appreciate your comment.

Kind regards,
Mathijs Romans

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org

Re: merge to identical file

Posted by Hari Kodungallur <hk...@gmail.com>.
On Mon, Apr 21, 2008 at 12:23 AM, Mathijs Romans <ma...@romansland.nl>
wrote:

> Hi!
>
> we have a typical setup where trunk is our stable version and
> developing takes place in several branches. While development in a
> brach takes place, the trunk may be updated with other changes. Now
> suppose we want to merge one of these development branches back into
> the trunk, we prefer to test it before we include it in the trunk. So
> my idea was to first update the branch with all changes that have
> taken place in the trunk. And if it works, to apply all changes in the
> branch directly back into the trunk.
>
> Now of course, in principle I'll be applying the changes in the trunk
> twice. In the book Version Control with Subversion, it says:
>
> "When patching a file, Subversion typically notices if the file
> already has the change, and does nothing."
>
> Now my question is this: in the case the merge is a diff between
> versions A and B, applied to version X, if a file is identical in B
> and X, is it guaranteed that the merge does nothing to it in all
> cases? Or is "typically" still the right quantifier here? Is it then
> probably best to make a "testing" branch to test merged components?
>


When you merge from 'branch' to 'trunk' and if the files are identical in
'branch' and 'trunk', then I am pretty sure that subversion will not do
anything when you merge to the working copy of your trunk.
This scenario, obviously, happens when that file did not change in the
branch. And any change to that file, if any, would have been merged to the
branch when you first merged from trunk to branch.

I will add that, there is no harm in trying out. You don't need to create a
new 'testing' branch. When you merge, it affects only your working copy. You
can (should) review the result of the merge in the working copy and decide
if subversion did the right thing. Only after that should you check in the
changes.

regards,
-Hari

RE: merge to identical file

Posted by "Srilakshmanan, Lakshman" <la...@police.vic.gov.au>.
Hi Mathijs,

When merging from branch into trunk ensure you use the branch URL and
trunk URL to determine the merge set.

For example.
svn co http://hostname/project1/trunk   projetc1-trunk
cd projetc1-trunk
svn merge http://hostname/project1/branch/xyz
http://hostname/project1/trunk

Comparing http://hostname/project1/branch/xyz to
http://hostname/project1/trunk will select ONLY the changes made in
branch xyz. 

It will NOT include the changes received from trunk and will exclude
identical files.

Thanks
Lakshman
-----Original Message-----
From: mathijs.romans@gmail.com [mailto:mathijs.romans@gmail.com] On
Behalf Of Mathijs Romans
Sent: Monday, 21 April 2008 5:23 PM
To: users@subversion.tigris.org
Subject: merge to identical file

Hi!

we have a typical setup where trunk is our stable version and developing
takes place in several branches. While development in a brach takes
place, the trunk may be updated with other changes. Now suppose we want
to merge one of these development branches back into the trunk, we
prefer to test it before we include it in the trunk. So my idea was to
first update the branch with all changes that have taken place in the
trunk. And if it works, to apply all changes in the branch directly back
into the trunk.

Now of course, in principle I'll be applying the changes in the trunk
twice. In the book Version Control with Subversion, it says:

"When patching a file, Subversion typically notices if the file already
has the change, and does nothing."

Now my question is this: in the case the merge is a diff between
versions A and B, applied to version X, if a file is identical in B and
X, is it guaranteed that the merge does nothing to it in all cases? Or
is "typically" still the right quantifier here? Is it then probably best
to make a "testing" branch to test merged components?

I appreciate your comment.

Kind regards,
Mathijs Romans

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org

================================================================================================
EMAIL DISCLAIMER

This email and any attachments are confidential. They may also be subject to copyright.

If you are not an intended recipient of this email please immediately contact us by replying
to this email and then delete this email. 

You must not read, use, copy, retain, forward or disclose this email or any attachment.

We do not accept any liability arising from or in connection with unauthorised use or disclosure 
of the information contained in this email or any attachment.

We make reasonable efforts to protect against computer viruses but we do not accept liability
for any liability, loss or damage caused by any computer virus contained in this email.
================================================================================================

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org