|
NAMESVN::Look - Caching wrapper around the svnlook commandVERSIONversion 0.42SYNOPSISuse SVN::Look; my $revlook = SVN::Look->new('/repo/path', -r => 123); my $author = $revlook->author(); my $msg = $revlook->log_msg(); my @added_files = $revlook->added(); my @updated_files = $revlook->updated(); my @deleted_files = $revlook->deleted(); my @changed_files = $revlook->changed(); my $file_contents = $revlook->cat('/path/to/file/in/repository'); my $trxlook = SVN::Look->new('/repo/path', -t => 123); DESCRIPTIONThe svnlook command is the workhorse of Subversion hook scripts, being used to gather all sorts of information about a repository, its revisions, and its transactions. This module provides a simple object oriented interface to a specific svnlook invocation, to make it easier to hook writers to get and use the information they need. Moreover, all the information gathered by calling the svnlook command is cached in the object, avoiding repetitious calls.METHODSnew REPO [, WHAT, NUMBER]The SVN::Look constructor needs one or three arguments:
repoReturns the repository path that was passed to the constructor.txnReturns the transaction number that was passed to the constructor. If none was passed, returns undef.revReturns the revision number that was passed to the constructor. If none was passed, returns undef.authorReturns the author of the revision/transaction.cat PATHReturns the contents of the file at PATH. In scalar context, return the whole contents in a single string. In list context returns a list of chomped lines.changed_hashReturns a reference to a hash containing information about all file changes occurred in the revision. The hash always has the following keys:
addedReturns the list of files added in the revision/transaction.updatedReturns the list of files updated in the revision/transaction.deletedReturns the list of files deleted in the revision/transaction.prop_modifiedReturns the list of files that had properties modified in the revision/transaction.changedReturns the list of all files added, updated, deleted, and the ones that had properties modified in the revision/transaction.copied_toReturns the list of new names of files that were copied in the revision/transaction.copied_fromReturns the list of original names of files that were copied in the revision/transaction. The order of this list is guaranteed to agree with the order generated by the method copied_to.dateReturns the date of the revision/transaction.diff [OPTS, ...]Returns the GNU-style diffs of changed files and properties. There are three optional options that can be passed as strings:
In scalar context, return the whole diff in a single string. In list context returns a list of chomped lines. dirs_changedReturns the list of directories changed in the revision/transaction.filesize PATHReturns the size (in bytes) of the file located at PATH as it is represented in the repository.infoReturns the author, datestamp, log message size, and log message of the revision/transaction.lock PATHIf PATH has a lock, returns a hash containing information about the lock, with the following keys:
If PATH has no lock, returns undef. log_msgReturns the log message of the revision/transaction.propget PROPNAME PATHReturns the value of PROPNAME in PATH.proplist PATHReturns a reference to a hash containing the properties associated with PATH.tree [PATH_IN_REPOS, OPTS, ...]Returns the repository tree as a list of paths, starting at PATH_IN_REPOS (if supplied, at the root of the tree otherwise), optionally showing node revision ids.
uuidReturns the repository's UUID.youngestReturns the repository's youngest revision number.REPOSITORY<https://github.com/gnustavo/SVN-Look>AUTHORGustavo L. de M. Chaves <gnustavo@cpan.org>COPYRIGHT AND LICENSEThis software is copyright (c) 2020 by CPqD.This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.
Visit the GSP FreeBSD Man Page Interface. |