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 forSVN::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$sis null, and if it's an empty string it does, like, nothing. Not it. πSVN::Fs::props_changed($root1, $path1, $root2, $path2)β see alsoSVN::Fs::contents_changedSVN::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_tobject. 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_tvalue it returns? unanswered questions, iconic behavior β¨SVN::Fs::create_access($username)β returns a brand new_p_svn_fs_access_tobject representing$username. And$usernameis 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_tobject 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 populatelock->tokenbefore callingsvn_fs_attach_lock().$fs->get_access()β the filesystem's current access context, as a_p_svn_fs_access_tobject. Returnsundefif no access context has been set with theset_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_tobject.$fs->revision_prop($rev, $propname)β the value of revision property$propnamein 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.$accessshould be a_p_svn_fs_access_tobject, orundefto disassociate the current access context from the filesystem.$fs->set_uuid($uuid)β associate$uuidwith$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$rootbelongs to, as a_p_svn_fs_tobject.$root->is_dir($path)β true if there's a node at$pathand it's a directory. π$root->is_file($path)β true if there's a node at$pathand 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_tobjects 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$txnare discarded, and the filesystem is left unchanged.
Note: this function first sets the state of$txnto'dead', and then attempts to purge it and any related data from the filesystem. If some part of the cleanup process fails,$txnand 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$valueisundefthen the property$nameis removed, if it exists. Otherwise the property$nameis 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$nameproperty.$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_tobject.
π§ _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_tobject.$change->prop_mod()β true if the properties were modified.$change->text_mod()β true if the text (content) was modified. π¦
π COPYRIGHT π
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
- debian trixie: libsvn-perl 1.14.5-3 Β· Apache-2.0
- ubuntu questing: libsvn-perl 1.14.5-3
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms