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

Re: Confusing status message when merging branch with binaries

From: Adam Jakubek <ajakubek_at_static.int.pl>
Date: 2005-06-08 18:11:57 CEST

On Wednesday 08 of June 2005 11:15, Max Bowsher wrote:
> Adam Jakubek wrote:
> > Hello,
> >
> > I've noticed strange subversion behaviour today. I had a branch in my
> > project and I was going to merge it to trunk (and delete the branch
> > afterwards). Several files (including one binary file) have been modified
> > on the trunk, so I updated it and then merged all changes to my branch
> > with:
> >
> > $ svn merge -r X:Y trunk branches/feature
> > $ svn ci branches/feature
> >
> > Note, that at this point, binary files on trunk and branch were
> > identical. Then I performed a merge between latest revisions of my branch
> > and trunk, updating the latter:
> >
> > $ svn merge --dry-run trunk@head_rev branches/feature@head_rev trunk
> > ...a lot of updates...
> > U trunk/binary_file
> >
> > This message was quite confusing, since I haven't modified binary files
> > on my branch. I decided to proceed with the merge and removed the
> > --dry-run switch. Binary files didn't show in the 'svn st' result
> > afterwards. It seems that they weren't modified at all during the merge.
> > Does this qualify as a bug, or am I missing something? It doesn't cause
> > any
> > data loss, but it can be confusing when merging large branches (since
> > diffing binaries is impossible). I was able to reproduce this on svn
> > 1.1.1,
> > 1.1.4 and 1.2.0.
> > If anyone is interested, I can send a short script which recreates
> > this problem.
>
> Yes, please - this would be really useful.

Here is a script which reproduces this problem. It will create a repository
with a binary file in $HOME/svntest. The last merge generates incorrect
update message. If you compare binary files on trunk and branches, they are
identical.

------start of script------
#!/bin/sh

# repository
REPO_DIR="${HOME}/svntest/repository"
REPO="file://${REPO_DIR}"

# working copy
WC="${HOME}/svntest/wc"

# create repository with a binary file in trunk
mkdir -p "${REPO_DIR}"
svnadmin create "${REPO_DIR}"
svn co "${REPO}" "${WC}"
cd "${WC}"
mkdir trunk branches
dd count=1 if=/dev/urandom of=trunk/file.bin
svn add trunk branches
svn ci -m 'Initial import'

# create branch from the trunk
svn cp trunk branches/feature
svn ci -m 'Created branch'

# modify binary file in the trunk
dd count=1 if=/dev/urandom of=trunk/file.bin
svn ci -m 'Updated binary file'

# merge trunk change to the branch
svn merge -r 1:3 trunk branches/feature
svn ci -m 'Merged trunk changes to branch'

# merge branch to the trunk
echo "This should report no updates on binary file:"
svn merge --dry-run "${REPO}/trunk" "${REPO}/branches/feature" trunk

------end of script------

Regards
Adam

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Received on Wed Jun 8 18:18:18 2005

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.