subversion-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stefan Sperling <s...@elego.de>
Subject Re: Suspected issue with "remove-zombie-locks.py"?
Date Mon, 06 Mar 2017 16:22:14 GMT
On Mon, Mar 06, 2017 at 04:06:44PM +0000, Daniel Shahaf wrote:
> I can reproduce this using the FS API only (without the contrib/ script):

Hmm, looks like the contrib script is using the API wrong.
Check out what 'svnadmin unlock' does:
[[[
  /* Open the repos/FS, and associate an access context containing
     USERNAME. */
  SVN_ERR(open_repos(&repos, opt_state->repository_path, opt_state, pool));
  fs = svn_repos_fs(repos);
  SVN_ERR(svn_fs_create_access(&access, username, pool));
  SVN_ERR(svn_fs_set_access(fs, access));

  SVN_ERR(svn_utf_cstring_to_utf8(&lock_path_utf8, lock_path, pool));
  if (opt_state->bypass_hooks)
    SVN_ERR(svn_fs_unlock(fs, lock_path_utf8, lock_token,
                          FALSE, pool));
  else
    SVN_ERR(svn_repos_fs_unlock(repos, lock_path_utf8, lock_token,
                                FALSE, pool));
]]]

The script should probably be doing something like this, too.

Doug, I believe filing a bug is entirely appropriate here. Thanks!

Mime
View raw message