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

svn-mergeinfo-normalizer assertion failure with files/folders with embedded space(s)

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 1.9.4
    • Fix Version/s: trunk
    • Component/s: tools
    • Labels:
      None
    • Environment:

      Ubuntu 14.04 64-bit

      Description

      See original archived post.


      To: users@subversion.apache.org
      From: Quan Liang at wandisco.com
      Date: Mon, 7 Nov 2016 14:14:09 +0800

      We hit an issue when running svn-mergeinfo-normalizer with the following
      error:

      svn-mergeinfo-normalizer: subversion/libsvn_subr/dirent_uri.c:2541:
      svn_fspath_dirname: Assertion `svn_fspath_is_canonical(fspath)' failed.

      According to my testing, this happens when all the following are fulfilled:

      1) a file or folder has space in its name

      2) its mergeinfo has a merged revision x from a branch

      3) the parent path has mergeinfo from the same branch but revision x is not
      merged

      Below is the reproduced case with the test repository(attached). The
      ~/test_wc2/trunk is checked out from the /trunk of the test repo.

      The binaries are built on Ubuntu 14.04 64 bit from the nightly tar ball.

      ==================

      root@ubuntu:~/test_wc2/trunk# svn --version
      svn, version 1.10.0 (r1729520)
         compiled Sep 20 2016, 13:15:35 on x86_64-unknown-linux-gnu
      
      Copyright (C) 2015 The Apache Software Foundation.
      This software consists of contributions made by many people;
      see the NOTICE file for more information.
      Subversion is open source software, see http://subversion.apache.org/
      
      The following repository access (RA) modules are available:
      
      * 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.
        - using serf 1.3.7 (compiled with 1.3.7)
        - handles 'http' scheme
        - handles 'https' scheme
      
      The following authentication credential caches are available:
      
      * Plaintext cache in /root/.subversion
      * Gnome Keyring
      * GPG-Agent
      * KWallet (KDE)
      root@ubuntu:~/test_wc2/trunk# ll
      total 24
      drwxr-xr-x 4 root root 4096 Oct 15 23:36 ./
      drwxr-xr-x 5 root root 4096 Oct 15 23:30 ../
      drwxr-xr-x 2 root root 4096 Oct 15 23:34 a/
      drwxr-xr-x 2 root root 4096 Oct 15 23:35 b b/
      -rw-r--r-- 1 root root   58 Oct 15 23:36 c
      -rw-r--r-- 1 root root   29 Oct 15 23:35 d d
      root@ubuntu:~/test_wc2/trunk# svn pg -R svn:mergeinfo
      . - /branches/br01:4,6
      a - /branches/br01/a:5
      b b - /branches/br01/b b:5
      c - /branches/br01/c:4-6
      d d - /branches/br01/d d:5
      root@ubuntu:~/test_wc2/trunk# svn-mergeinfo-normalizer analyze
      Scanning working copy /root/test_wc2/trunk ...
          Found mergeinfo on 5 nodes.
          Found 5 branch entries.
          Found 6 merged revision ranges.
      
      Fetching log for file:///root/test ...
          Received 8 revisions from 1 to 8.
          Received 22 path changes.
          Pool has 13 different paths.
      
      Removing obsolete branches and redundant mergeinfo, combining revision
      ranges ...
      Trying to elide mergeinfo at path /root/test_wc2/trunk/d d
      svn-mergeinfo-normalizer: subversion/libsvn_subr/dirent_uri.c:2541:
      svn_fspath__dirname: Assertion `svn_fspath__is_canonical(fspath)' failed.
      Aborted (core dumped)
      root@ubuntu:~/test_wc2/trunk# svn pd svn:mergeinfo d\ d
      property 'svn:mergeinfo' deleted from 'd d'.
      root@ubuntu:~/test_wc2/trunk# svn-mergeinfo-normalizer analyze
      Scanning working copy /root/test_wc2/trunk ...
          Found mergeinfo on 4 nodes.
          Found 4 branch entries.
          Found 5 merged revision ranges.
      
      Fetching log for file:///root/test ...
          Received 8 revisions from 1 to 8.
          Received 22 path changes.
          Pool has 13 different paths.
      
      Removing obsolete branches and redundant mergeinfo, combining revision
      ranges ...
      Trying to elide mergeinfo at path /root/test_wc2/trunk/c
          CANNOT elide branch /branches/br01/c
              revisions not movable to parent: 5
      
      Trying to elide mergeinfo at path /root/test_wc2/trunk/b b
      svn-mergeinfo-normalizer: subversion/libsvn_subr/dirent_uri.c:2541:
      svn_fspath__dirname: Assertion `svn_fspath__is_canonical(fspath)' failed.
      Aborted (core dumped)
      root@ubuntu:~/test_wc2/trunk# svn pd svn:mergeinfo b\ b/
      property 'svn:mergeinfo' deleted from 'b b'.
      root@ubuntu:~/test_wc2/trunk# svn-mergeinfo-normalizer analyze
      Scanning working copy /root/test_wc2/trunk ...
          Found mergeinfo on 3 nodes.
          Found 3 branch entries.
          Found 4 merged revision ranges.
      
      Fetching log for file:///root/test ...
          Received 8 revisions from 1 to 8.
          Received 22 path changes.
          Pool has 13 different paths.
      
      Removing obsolete branches and redundant mergeinfo, combining revision
      ranges ...
      Trying to elide mergeinfo at path /root/test_wc2/trunk/c
          CANNOT elide branch /branches/br01/c
              revisions not movable to parent: 5
      
      Trying to elide mergeinfo at path /root/test_wc2/trunk/a
          CANNOT elide branch /branches/br01/a
              revisions not movable to parent: 5
      
      Trying to elide mergeinfo at path /root/test_wc2/trunk
          Keeping top-level mergeinfo.
      
      No missing branches were detected.
      
      
      Remaining mergeinfo:
          Found mergeinfo on 3 nodes.
          Found 3 branch entries.
          Found 4 merged revision ranges.
      
      root@ubuntu:~/test_wc2/trunk#
      

        Attachments

        1. test.tar.gz
          17 kB
          Julian Foad

          Activity

            People

            • Assignee:
              julianfoad Julian Foad
              Reporter:
              dbrobinson Douglas Robinson
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: