Uploaded image for project: 'Subversion'
  1. Subversion
  2. SVN-3503

Merge success depends on whether target is directory or file

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Open
    • Priority: Major
    • Resolution: Unresolved
    • Affects Version/s: 1.6.x
    • Fix Version/s: unscheduled
    • Component/s: cmdline client
    • Labels:
      None
    • Environment:

      Windows XP

      Description

      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$
      
      -------------------------------------------------------------------
      

      Original issue reported by grummund

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                Unassigned
                Reporter:
                subversion-importer Subversion Importer
              • Votes:
                0 Vote for this issue
                Watchers:
                0 Start watching this issue

                Dates

                • Created:
                  Updated: