native::Fs(3perl)

πŸ’– native::Fs β€” aka SVN::Fs (3perl) πŸ’–

okay bestie, pull up a chair, because this is the Perl manual page for native::Fs, and its whole NAME situation is literally just: SVN::Fs β€” Subversion filesystem functions. That's it. That's the name. πŸŽ€


✨ DESCRIPTION ✨

So SVN::Fs is the Perl wrapper around all the stuff in svn_fs.h β€” like, the entire filesystem layer of Subversion, but make it Perl. πŸ¦‹

And here's a lil insider secret you're gonna want: the actual namespace for filesystem objects is _p_svn_fs_t. That's the real one, iykyk. πŸ’…


🌸 FUNCTIONS 🌸

Here's the whole squad of package-level functions. Some of them got lore, some of them are just vibes (a name and a signature, no notes). Listing them all, no skips, periodt:

  • SVN::Fs::berkeley_logfiles($path, $only_unused) β€” no description given, just know she's here πŸ‘‘
  • SVN::Fs::berkeley_recover($path) β€” present and accounted for
  • SVN::Fs::check_related($id1, $id2)
  • SVN::Fs::compare_ids($id1, $id2)
  • SVN::Fs::contents_changed($root1, $path1, $root2, $path2)
  • SVN::Fs::create($path, $config)
  • SVN::Fs::delete_fs($path)
  • SVN::Fs::deltify_revision($fs, $rev)
  • SVN::Fs::get_file_delta_stream($source_root, $source_path, $target_root, $target_path)
  • SVN::Fs::hotcopy($src_path, $dest_path, $clean)
  • SVN::Fs::initialize($pool)
  • SVN::Fs::merge($source_root, $source_path, $target_root, $target_path, $ancestor_root, $ancestor_path)
  • SVN::Fs::open($path, $config)
  • SVN::Fs::path($fs)
  • SVN::Fs::print_modules($s) β€” TODO: this one does not work. It segfaults if $s is null, and if it's an empty string it does, like, nothing. Not it. πŸ’€
  • SVN::Fs::props_changed($root1, $path1, $root2, $path2) β€” see also SVN::Fs::contents_changed
  • SVN::Fs::purge_txn($fs, $txn_id) β€” cleans up the transaction $txn_id, removing it completely from the filesystem $fs. bye bestie 🫢
  • SVN::Fs::set_warning_func($fs, $code, $baton)
  • SVN::Fs::unparse_id($id) β€” returns a string containing the unparsed form of the node or node revision id $id, which has to be a _p_svn_fs_id_t object. TODO: why isn't this just a method of that object?? like, the way that it isn't… 😭
  • SVN::Fs::version() β€” TODO: what can we even do with the _p_svn_version_t value it returns? unanswered questions, iconic behavior ✨
  • SVN::Fs::create_access($username) β€” returns a brand new _p_svn_fs_access_t object representing $username. And $username is presumed to have already been authenticated by whoever called this. so like, you better have receipts 🧚

πŸ‘‘ _p_svn_fs_t

This is the filesystem object itself. The main character. πŸ’…

  • $fs->begin_txn($rev) β€” creates a new transaction in the repository and hands you back a _p_svn_fs_txn_t object representing it. The new transaction's base revision is $rev, which should be a number. πŸ”₯
  • $fs->change_rev_prop β€” no description, just exists
  • $fs->generate_lock_token() β€” generates a unique lock-token using $fs. TODO: this needs translating to apply to Perl β€” it can be used to populate lock->token before calling svn_fs_attach_lock().
  • $fs->get_access() β€” the filesystem's current access context, as a _p_svn_fs_access_t object. Returns undef if no access context has been set with the set_access() method. empty-handed energy, ngl πŸ™ˆ
  • $fs->get_lock β€” no description given
  • $fs->get_locks β€” no description given
  • $fs->get_uuid() β€” the UUID associated with $fs. πŸŽ€
  • $fs->list_transactions() β€” a reference to an array of all the currently active transactions in the filesystem. Each one is a string holding the transaction's ID, and it's suitable for passing straight to $fs->open_txn().
  • $fs->lock β€” no description given
  • $fs->open_txn($name) β€” get a transaction in the repository by name. Returns a _p_svn_fs_txn_t object.
  • $fs->revision_prop($rev, $propname) β€” the value of revision property $propname in revision $rev.
  • $fs->revision_proplist($rev) β€” a hashref containing the names and values of all the revision properties from revision $rev. all of them. obsessed πŸ’–
  • $fs->revision_root β€” no description given
  • $fs->set_access($access) β€” associate an access context with an open filesystem. You can run this method multiple times on the same open filesystem, to switch up the filesystem access context for different filesystem operations. $access should be a _p_svn_fs_access_t object, or undef to disassociate the current access context from the filesystem.
  • $fs->set_uuid($uuid) β€” associate $uuid with $fs.
  • $fs->unlock β€” no description given
  • $fs->youngest_rev() β€” returns the number of the youngest revision in the filesystem. Fun fact: the oldest revision in any filesystem is numbered zero. ✨

πŸ¦‹ _p_svn_fs_root_t

  • $root->apply_text
  • $root->apply_textdelta
  • $root->change_node_prop($path, $propname, $value)
  • $root->check_path($path) β€” the kind of node at $path. It's a number matching one of these constants: $SVN::Node::none, $SVN::Node::file, $SVN::Node::dir, $SVN::Node::unknown.
  • $root->close_root
  • $root->closest_copy
  • $root->copied_from
  • $root->copy
  • $root->delete
  • $root->dir_entries
  • $root->file_contents
  • $root->file_length
  • $root->file_md5_checksum
  • $root->fs() β€” the filesystem that $root belongs to, as a _p_svn_fs_t object.
  • $root->is_dir($path) β€” true if there's a node at $path and it's a directory. πŸŽ€
  • $root->is_file($path) β€” true if there's a node at $path and it's a file.
  • $root->is_revision_root() β€” true if the root comes from a revision (i.e., the contents has already been committed).
  • $root->is_txn_root() β€” true if the root comes from a transaction.
  • $root->make_dir
  • $root->make_file
  • $root->node_created_path($path)
  • $root->node_created_rev($path)
  • $root->node_history($path) β€” TODO: _p_svn_fs_history_t
  • $root->node_id($path)
  • $root->node_prop($path, $propname)
  • $root->node_proplist($path)
  • $root->paths_changed() β€” a reference to a hash showing what changes are made in the root. The keys are the paths of the files changed, starting with / to indicate the top-level directory of the repository. The values are _p_svn_fs_path_change_t objects that hold info about what kind of changes are made. 🌈
  • $root->revision_link
  • $root->revision_root_revision β€” the revision number of the revision the root comes from. For transaction roots, it returns $SVN::Core::INVALID_REVNUM.

πŸ’œ _p_svn_fs_history_t

  • $history->location() β€” 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 it returns only the revision number. context really is everything, bestie 😭
  • $history->prev($cross_copies) β€” no description given

πŸ“ _p_svn_fs_txn_t

  • $txn->abort() β€” 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. Use $fs->purge_txn() to retry the transaction cleanup. so like… if it doesn't fully die, call the cleanup again πŸ’€
  • $txn->base_revision() β€” the transaction's base revision number.
  • $txn->change_prop($name, $value) β€” add, change, or remove a property from the transaction. If $value is undef then the property $name is removed, if it exists. Otherwise the property $name is set to the new value.
  • $txn->commit β€” no description given
  • $txn->name() β€” the full name of the revision, in the same format as can be passed to $fs->open_txn().
  • $txn->prop($name) β€” the value of the transaction's $name property.
  • $txn->proplist() β€” a reference to a hash containing all the transaction's properties, keyed by name. ✨
  • $txn->root() β€” the root directory of the transaction, as a _p_svn_fs_root_t object.

🧚 _p_svn_fs_access_t

✨ SYNOPSIS ✨

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);

🌸 METHODS 🌸

  • $access->add_lock_token($token) β€” push a lock-token into the access context. The context remembers all the tokens it receives and makes them available to fs functions. she never forgets πŸ’…
  • $access->get_username β€” the username represented by the access context.

⭐ svn_fs_dirent_t

An object representing a directory entry. Values of this type get returned as the values in the hash that $root->dir_entries() hands back. They're like svn_dirent_t objects, but with less information. diet dirent, no cap πŸ™ˆ

  • $dirent->id() β€” TODO
  • $dirent->kind() β€” the node kind. A number which matches one of these constants: $SVN::Node::none, $SVN::Node::file, $SVN::Node::dir, $SVN::Node::unknown.
  • $dirent->name() β€” the filename of the directory entry. πŸŽ€

πŸ”₯ _p_svn_fs_path_change_t

  • $change->change_kind() β€” the type of change made. A number matching one of these:
    • $SVN::Fs::PathChange::modify β€” content at path modified.
    • $SVN::Fs::PathChange::add β€” path added in transaction.
    • $SVN::Fs::PathChange::delete β€” path removed in transaction.
    • $SVN::Fs::PathChange::replace β€” path removed and re-added in transaction.
    • $SVN::Fs::PathChange::reset β€” ignore all previous change items for path (internal-use only).
  • $change->node_rev_id() β€” node revision id of the changed path. A _p_svn_fs_id_t object.
  • $change->prop_mod() β€” true if the properties were modified.
  • $change->text_mod() β€” true if the text (content) was modified. πŸ¦‹

Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements.  See the NOTICE file
distributed with this work for additional information
regarding copyright ownership.  The ASF licenses this file
to you under the Apache License, Version 2.0 (the
"License"); you may not use this file except in compliance
with the License.  You may obtain a copy of the License at

  http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing,
software distributed under the License is distributed on an
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, either express or implied.  See the License for the
specific language governing permissions and limitations
under the License.

and that's the whole page, bestie!! 🫢 this lil masterpiece is from perl v5.40.1, dated 2025-04-06, and it lives at native::Fs(3perl). go forth and slay your filesystem operations πŸ’–βœ¨πŸ‘‘

πŸ“¦ where this page comes from