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

remove-zombie-locks.py is broken on SVN 1.9.5

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Major
    • Resolution: Unresolved
    • 1.9.5
    • None
    • libsvn_fs
    • None
    • CentOS 6.x, WANdisco SVN 1.9.5

    Description

      The following commands were run on a CentOS 6.x, WANdisco Subversion 1.9.5, Python 2.7:

      # svn export https://svn.apache.org/repos/asf/subversion/trunk/contrib/hook-scripts
      # svnadmin create repo
      # svn co file:///path/to/repo wc
      # cd wc
      # touch wc/a; svn add wc/a; svn ci -mm wc
      # svn lock wc/a; svn rm wc/a; svn ci -mm --no-unlock wc
      # hook-scripts/remove-zombie-locks.py repo1 all
      Removing all zombie locks from repository at /root/repo
      This may take several minutes...
      /a
      Traceback (most recent call last):
        File "hook-scripts/remove-zombie-locks.py", line 214, in <module>
          main()
        File "hook-scripts/remove-zombie-locks.py", line 208, in main
          remover.run()
        File "hook-scripts/remove-zombie-locks.py", line 138, in run
          self.unlock_nonexistent_files, self.pool)
        File "/opt/rh/python27/root/usr/lib64/python2.7/site-packages/libsvn/fs.py", line 860, in svn_fs_get_locks2
          return _fs.svn_fs_get_locks2(*args)
      svn.core.SubversionException: 160034 - No username is currently associated with filesystem 'd52a5571-d2a3-4db8-a9e5-a081d6b4b455'
      

      Per Daniel Shahaf:
      I can reproduce this using the FS API only (without the contrib/ script):

      % python2
      >>> from svn.core import *
      >>> from svn.fs import *
      >>> from __future__ import print_function
      >>> fs = svn_fs_open("r/db", None)
      >>> svn_fs_get_locks2(fs, "", svn_depth_infinity, print)
      <libsvn.core.svn_lock_t; proxy of <Swig Object of type 'svn_lock_t *' at 0x7f4d83bb9660> > <libsvn.core.apr_pool_t; proxy of <Swig Object of type 'apr_pool_t *' at 0x7f4d83bb96c0> >
      >>> svn_fs_get_locks2(fs, "", svn_depth_infinity, (lambda lock, pool: svn_fs_unlock(fs, lock.path, lock.token, True, pool)))
      Traceback (most recent call last):
        File "<stdin>", line 1, in <module>
        File "/usr/lib/python2.7/dist-packages/libsvn/fs.py", line 876, in svn_fs_get_locks2
          return _fs.svn_fs_get_locks2(*args)
      svn.core.SubversionException: 160034 - No username is currently associated with filesystem 'a1257b00-ab15-4056-8430-3a7080d0ccfe'
      

      Attachments

        Activity

          People

            Unassigned Unassigned
            dbrobinson Douglas Robinson
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated: