SVN::Fs - Subversion filesystem functions
SVN::Fs wraps the functions in svn_fs.h.
The actual namespace for filesystem objects is
TODO - doesn't work, segfaults if $s is null, doesn't do anything if its an empty string
Cleanup the transaction
removing it completely from the filesystem
Return a string containing the unparsed form of the node or node revision id $id,
which must be a
TODO - why isn't this a method of that object?
TODO - what can we do with the _p_svn_version_t value returned?
Return a new
_p_svn_fs_access_t object representing
$username is presumed to have been authenticated by the caller.
Creates a new transaction in the repository,
and returns a
_p_svn_fs_txn_t object representing it.
The new transaction's base revision will be $rev,
which should be a number.
Generate a unique lock-token using
TODO - translate this to apply to Perl: This can be used in to populate lock->token before calling svn_fs_attach_lock().
The filesystem's current access context,
Returns undef if no access context has been set with the
The UUID associated with
A reference to an array of all currently active transactions in the filesystem.
Each one is a string containing the transaction's ID,
suitable for passing to
Get a transaction in the repository by name.
The value of revision property
$propname in revision
A hashref containing the names and values of all revision properties from revision
Associate an access context with an open filesystem.
This method can be run multiple times on the same open filesystem,
in order to change the filesystem access context for different filesystem operations.
$access should be a
or undef to disassociate the current access context from the filesystem.
Return the number of the youngest revision in the filesystem. The oldest revision in any filesystem is numbered zero.
Kind of node at
A number which matches one of these constants: $SVN::Node::none,
The filesystem to which
True if there is a node at
$path which is a directory.
True if there is a node at
$path which is a file.
True if the root comes from a revision (i.e., the contents has already been committed).
True if the root comes from a transaction.
TODO - _p_svn_fs_history_t
A reference to a hash indicating what changes are made in the root.
The keys are the paths of the files changed,
/ to indicate the top-level directory of the repository.
The values are
_p_svn_fs_path_change_t objects which contain information about what kind of changes are made.
Revision number of the revision the root comes from.
For transaction roots,
In list context, a list of two items: the path to the node whose history this is, and the revision number in which it exists. In scalar context returns only the revision number.
Abort the transaction.
Any changes made in
$txn are discarded,
and the filesystem is left unchanged.
Note: This function first sets the state of
$txn to 'dead',
and then attempts to purge it and any related data from the filesystem.
If some part of the cleanup process fails,
$txn and some portion of its data may remain in the database after this function returns.
$fs->purge_txn() to retry the transaction cleanup.
The transaction's base revision number.
or remove a property from the transaction.
undef then the property
$name is removed,
if it exists.
Otherwise the property
$name is set to the new value.
Full name of the revision,
in the same format as can be passed to
The value of the transaction's
A reference to a hash containing all the transaction's properties, keyed by name.
The root directory of the transaction,
my $access = SVN::Fs::create_access($username); my $access = $fs->get_access; $fs->set_access($access); my $username = $access->get_username; $access->add_lock_token($token);
Push a lock-token into the access context. The context remembers all tokens it receives, and makes them available to fs functions.
The username represented by the access context.
An object representing a directory entry. Values of this type are returned as the values in the hash returned by
$root->dir_entries(). They are like svn_dirent_t objects, but have less information.
Node kind. A number which matches one of these constants: $SVN::Node::none, $SVN::Node::file, $SVN::Node::dir, $SVN::Node::unknown.
The filename of the directory entry.
The type of change made. A number which matches one of the following:
Content at path modified.
Path added in transaction.
Path removed in transaction.
Path removed and re-added in transaction.
Ignore all previous change items for path (internal-use only).
Node revision id of changed path. A
True if the properties were modified.
True if the text (content) was modified.