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

Re: catching up to the trunk.

From: Ed Price <ed.price_at_gmail.com>
Date: 2006-10-20 05:14:51 CEST

[...]
> >>> Now you switch to trunk and merge in changes from the branch.
> >>> Theoretically, it should only end up merging whatever changes were
> >>> made to the branch, and since the changes that were merged from
> >>> trunk are already there, it should not modify those files.
> >>> Either I'm doing something wrong or this doesn't work correctly with
> >>> binary files, but I had a bunch of images which were updated in
> >>> trunk, merged to the branch, committed to the branch, merged back
> >>> into trunk, and they all caused conflicts. [...]
[...]
> Anybody? Is this expected behavior or a bug?

I'm not sure... Interesting question...

http://subversion.tigris.org/faq.html#binary-files says:

-- cut here --

How does Subversion handle binary files?

[...]

All other files are treated as binary, meaning that Subversion will:

    * Not attempt to automatically merge received changes with
local changes during svn update or svn merge

[...]

-- cut here --

Clearly if the merge target had local changes, svn would be right
to signal a conflict for a "binary" file. But in this case, there
are no local changes!

It certainly does seem annoying and inconvenient. It wreaks
havoc with the standard merge-trunk-to-branch then merge-
branch-to-trunk workflow.

Here is a simple cmdline reproduction (simplified,
but hopefully still valid):

$ svnadmin create repos
$ svn co file://`pwd`/repos wc
Checked out revision 0.
$ cd wc
$ echo "1" > foo
$ echo "2" > bar
$ svn add foo bar
A foo
A bar
$ svn ps svn:mime-type x/y foo bar
property 'svn:mime-type' set on 'foo'
property 'svn:mime-type' set on 'bar'
$ svn ci -m ""
Adding (bin) bar
Adding (bin) foo
Transmitting file data ..
Committed revision 1.
$ svn up
At revision 1.
$ echo "2" > foo
$ svn ci -m ""
Sending foo
Transmitting file data .
Committed revision 2.
$ svn up
At revision 2.
$ svn merge foo@1 foo@2 bar
C bar
$

The last conflict is the problem. If one removes
the propset (so the files are considered text),
the merge does not produce a conflict.

-Ed

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Received on Fri Oct 20 05:15:25 2006

This is an archived mail posted to the Subversion Users mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.