subversion/libsvn_fs_fs/lock.c
/* The main routine for lock enforcement, used throughout libsvn_fs_fs. */
The main routine for lock enforcement, used throughout libsvn_fs_fs.
The main routine for lock enforcement used throughout libsvn_fs_fs .
svn_error_t *
svn_fs_fs__allow_locked_operation(const char *path,
                                  svn_fs_t *fs,
                                  svn_boolean_t recurse,
                                  svn_boolean_t have_write_lock,
                                  apr_pool_t *pool)
{
  path = svn_fs__canonicalize_abspath(path, pool);
  if (recurse)
    {
      const char *digest_path;
      SVN_ERR(digest_path_from_path(&digest_path, fs->path, path, pool));
      SVN_ERR(walk_locks(fs, digest_path, get_locks_callback,
                         fs, have_write_lock, pool));
    }
  else
    {
      svn_lock_t *lock;
      SVN_ERR(get_lock_helper(fs, &lock, path, have_write_lock, pool));
      if (lock)
        SVN_ERR(verify_lock(fs, lock, pool));
    }
  return SVN_NO_ERROR;
}
svn_error_t * svn_fs_fs__allow_locked_operation ( const char * path , svn_fs_t * fs , svn_boolean_t recurse , svn_boolean_t have_write_lock , apr_pool_t * pool ) { path = svn_fs__canonicalize_abspath ( path , pool ) ; if ( recurse ) { const char * digest_path ; SVN_ERR ( digest_path_from_path ( & digest_path , fs -> path , path , pool ) ) ; SVN_ERR ( walk_locks ( fs , digest_path , get_locks_callback , fs , have_write_lock , pool ) ) ; } else { svn_lock_t * lock ; SVN_ERR ( get_lock_helper ( fs , & lock , path , have_write_lock , pool ) ) ; if ( lock ) SVN_ERR ( verify_lock ( fs , lock , pool ) ) ; } return SVN_NO_ERROR ; }
The main routine for lock enforcement, used throughout libsvn_fs_fs.
The main routine for lock enforcement used throughout libsvn_fs_fs .
/* Discover all locks at or below the path. */ /* Discover and verify any lock attached to the path. */