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

Merge success depends on whether target is directory or file

From: <x_svn-dev_x_at_nospam.pz.podzone.net>
Date: Tue, 8 Sep 2009 14:27:10 +0100

Hi,

I had this confirmed as a (potential) bug by @stsp on #svn, who asked
that I post a bug report. Here it is:

In case there's some problem with the pasting, it's also at:
http://svn.pastebin.com/m163d27f4

Problem:

svn merge finds a conflict when the target is ./ but is happy to merge
when the target is a file. Tested with svn 1.6.3 & 1.6.4 on the
client. Server is running 1.4.2.

Although not shown, when --dry-run is removed it prompts on the
conflict for a directory target, but with file as target the 'merge'
is performed without prompting. That is, the results with and without
--dry-run are consistent.

-------------------------------------------------------------------

~/svn/sandbox$ svn commit -m 'Create trunk branches tags.'
Adding sandbox/branches
Adding sandbox/tags
Adding sandbox/trunk

Committed revision 698.

~/svn/sandbox$ cd trunk/
/cygdrive/d/svn/sandbox/trunk

~/svn/sandbox/trunk$ dd if=/dev/urandom of=file.bin bs=1k count=1
1+0 records in
1+0 records out
1024 bytes (1.0 kB) copied, 0.073 s, 14.0 kB/s

~/svn/sandbox/trunk$ ls -l
total 4
-rw-r--r-- 1 xx None 1024 Sep 8 12:01 file.bin

~/svn/sandbox/trunk$ md5sum file.bin
5b30d5c55499ff9d3805e45bad80359f *file.bin

~/svn/sandbox/trunk$ svn add file.bin
A (bin) file.bin

~/svn/sandbox/trunk$ svn commit -m 'Add file.bin'
Adding (bin) trunk/file.bin
Transmitting file data .
Committed revision 699.

~/svn/sandbox/trunk$ svn pg svn:mime-type file.bin
application/octet-stream

~/svn/sandbox/trunk$ cd ..

~/svn/sandbox$ svn cp trunk/ branches/mybranch
A branches/mybranch

~/svn/sandbox$ cd branches/mybranch
/cygdrive/d/svn/sandbox/branches/mybranch

~/svn/sandbox/branches/mybranch$ svn commit . -m 'Create branches/mybranch'
Adding mybranch
Adding (bin) mybranch/file.bin

Committed revision 700.

~/svn/sandbox/branches/mybranch$ ls -l
total 4
-rw-r--r-- 1 xx None 1024 Sep 8 12:05 file.bin

~/svn/sandbox/branches/mybranch$ md5sum file.bin
5b30d5c55499ff9d3805e45bad80359f *file.bin

~/svn/sandbox/branches/mybranch$ svn status

~/svn/sandbox/branches/mybranch$ svn pg svn:mime-type file.bin
application/octet-stream

~/svn/sandbox/branches/mybranch$ dd if=/dev/urandom of=file.bin bs=1k count=1
1+0 records in
1+0 records out
1024 bytes (1.0 kB) copied, 0.05 s, 20 kB/s

~/svn/sandbox/branches/mybranch$ svn status
M file.bin

~/svn/sandbox/branches/mybranch$ md5sum file.bin
1bda4e2d5a86c654b8a8e26b19fe4426 *file.bin

~/svn/sandbox/branches/mybranch$ svn commit -m 'Changed file.bin'
Sending mybranch/file.bin
Transmitting file data .
Committed revision 701.

~/svn/sandbox/branches/mybranch$ cd ../..

~/svn/sandbox$ svn status

~/svn/sandbox$ cd trunk/
/cygdrive/d/svn/sandbox/trunk

~/svn/sandbox/trunk$ ls -l
total 4
-rw-r--r-- 1 xx None 1024 Sep 8 12:01 file.bin

~/svn/sandbox/trunk$ md5sum file.bin ../branches/mybranch/file.bin
5b30d5c55499ff9d3805e45bad80359f *file.bin
1bda4e2d5a86c654b8a8e26b19fe4426 *../branches/mybranch/file.bin

~/svn/sandbox/trunk$ svn pg svn:mime-type file.bin ../branches/mybranch/file.bin
file.bin - application/octet-stream
../branches/mybranch/file.bin - application/octet-stream

~/svn/sandbox/trunk$ svn merge --dry-run -c 701 ../branches/mybranch/file.bin ./
--- Merging r701 into '../branches/mybranch/file.bin':
C ../branches/mybranch/file.bin
Summary of conflicts:
  Text conflicts: 1

~/svn/sandbox/trunk$ svn merge --dry-run -c 701 ../branches/mybranch/file.bin ./file.bin
--- Merging r701 into 'file.bin':
U file.bin

~/svn/sandbox/trunk$

~/svn/sandbox/trunk$ svn --version
svn, version 1.6.4 (r38063)
   compiled Aug 7 2009, 13:13:11

Copyright (C) 2000-2009 CollabNet.
Subversion is open source software, see http://subversion.tigris.org/
This product includes software developed by CollabNet (http://www.Collab.Net/).

The following repository access (RA) modules are available:

* ra_neon : Module for accessing a repository via WebDAV protocol using Neon.
  - handles 'http' scheme
  - handles 'https' scheme
* ra_svn : Module for accessing a repository using the svn network protocol.
  - with Cyrus SASL authentication
  - handles 'svn' scheme
* ra_local : Module for accessing a repository on local disk.
  - handles 'file' scheme
* ra_serf : Module for accessing a repository via WebDAV protocol using serf.
  - handles 'http' scheme
  - handles 'https' scheme

~/svn/sandbox/trunk$

-------------------------------------------------------------------
On the server machine:

# svnserve --version
svnserve, version 1.4.2 (r22196)
   compiled Nov 10 2006, 16:22:08

Copyright (C) 2000-2006 CollabNet.
Subversion is open source software, see http://subversion.tigris.org/
This product includes software developed by CollabNet (http://www.Collab.Net/).

The following repository back-end (FS) modules are available:

* fs_base : Module for working with a Berkeley DB repository.
* fs_fs : Module for working with a plain file (FSFS) repository.

-------------------------------------------------------------------
Repeat attempt after upgrading svn on the local machine:

~/svn/sandbox/trunk$ svn --version
svn, version 1.6.5 (r38866)
   compiled Aug 26 2009, 13:50:17

Copyright (C) 2000-2009 CollabNet.
Subversion is open source software, see http://subversion.tigris.org/
This product includes software developed by CollabNet (http://www.Collab.Net/).

The following repository access (RA) modules are available:

* ra_neon : Module for accessing a repository via WebDAV protocol using Neon.
  - handles 'http' scheme
  - handles 'https' scheme
* ra_svn : Module for accessing a repository using the svn network protocol.
  - with Cyrus SASL authentication
  - handles 'svn' scheme
* ra_local : Module for accessing a repository on local disk.
  - handles 'file' scheme
* ra_serf : Module for accessing a repository via WebDAV protocol using serf.
  - handles 'http' scheme
  - handles 'https' scheme

~/svn/sandbox/trunk$ svn merge --dry-run -c 701 ../branches/mybranch/file.bin ./
--- Merging r701 into '../branches/mybranch/file.bin':
C ../branches/mybranch/file.bin
Summary of conflicts:
  Text conflicts: 1

~/svn/sandbox/trunk$ svn merge --dry-run -c 701 ../branches/mybranch/file.bin ./file.bin
--- Merging r701 into 'file.bin':
U file.bin

~/svn/sandbox/trunk$ svn pg svn:mime-type file.bin ../branches/mybranch/file.bin
file.bin - application/octet-stream
../branches/mybranch/file.bin - application/octet-stream

~/svn/sandbox/trunk$

-------------------------------------------------------------------

------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=462&dsMessageId=2392447
Received on 2009-09-08 15:31:28 CEST

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

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