.\" Automatically generated by Pod::Man 2.25 (Pod::Simple 3.16) .\" .\" Standard preamble: .\" ======================================================================== .de Sp \" Vertical space (when we can't use .PP) .if t .sp .5v .if n .sp .. .de Vb \" Begin verbatim text .ft CW .nf .ne \\$1 .. .de Ve \" End verbatim text .ft R .fi .. .\" Set up some character translations and predefined strings. \*(-- will .\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left .\" double quote, and \*(R" will give a right double quote. \*(C+ will .\" give a nicer C++. Capital omega is used to do unbreakable dashes and .\" therefore won't be available. \*(C` and \*(C' expand to `' in nroff, .\" nothing in troff, for use with C<>. .tr \(*W- .ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p' .ie n \{\ . ds -- \(*W- . ds PI pi . if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch . if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch . ds L" "" . ds R" "" . ds C` "" . ds C' "" 'br\} .el\{\ . ds -- \|\(em\| . ds PI \(*p . ds L" `` . ds R" '' 'br\} .\" .\" Escape single quotes in literal strings from groff's Unicode transform. .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" .\" If the F register is turned on, we'll generate index entries on stderr for .\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index .\" entries marked with X<> in POD. Of course, you'll have to process the .\" output yourself in some meaningful fashion. .ie \nF \{\ . de IX . tm Index:\\$1\t\\n%\t"\\$2" .. . nr % 0 . rr F .\} .el \{\ . de IX .. .\} .\" .\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2). .\" Fear. Run. Save yourself. No user-serviceable parts. . \" fudge factors for nroff and troff .if n \{\ . ds #H 0 . ds #V .8m . ds #F .3m . ds #[ \f1 . ds #] \fP .\} .if t \{\ . ds #H ((1u-(\\\\n(.fu%2u))*.13m) . ds #V .6m . ds #F 0 . ds #[ \& . ds #] \& .\} . \" simple accents for nroff and troff .if n \{\ . ds ' \& . ds ` \& . ds ^ \& . ds , \& . ds ~ ~ . ds / .\} .if t \{\ . ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u" . ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u' . ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u' . ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u' . ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u' . ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u' .\} . \" troff and (daisy-wheel) nroff accents .ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V' .ds 8 \h'\*(#H'\(*b\h'-\*(#H' .ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#] .ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H' .ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u' .ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#] .ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#] .ds ae a\h'-(\w'a'u*4/10)'e .ds Ae A\h'-(\w'A'u*4/10)'E . \" corrections for vroff .if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u' .if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u' . \" for low resolution devices (crt and lpr) .if \n(.H>23 .if \n(.V>19 \ \{\ . ds : e . ds 8 ss . ds o a . ds d- d\h'-1'\(ga . ds D- D\h'-1'\(hy . ds th \o'bp' . ds Th \o'LP' . ds ae ae . ds Ae AE .\} .rm #[ #] #H #V #F C .\" ======================================================================== .\" .IX Title "SVN::Look 3pm" .TH SVN::Look 3pm "2012-06-19" "perl v5.14.2" "User Contributed Perl Documentation" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l .nh .SH "NAME" SVN::Look \- A caching wrapper around the svnlook command. .SH "VERSION" .IX Header "VERSION" version 0.38 .SH "SYNOPSIS" .IX Header "SYNOPSIS" .Vb 9 \& use SVN::Look; \& my $revlook = SVN::Look\->new(\*(Aq/repo/path\*(Aq, \-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(\*(Aq/path/to/file/in/repository\*(Aq); \& \& my $trxlook = SVN::Look\->new(\*(Aq/repo/path\*(Aq, \-t => 123); .Ve .SH "DESCRIPTION" .IX Header "DESCRIPTION" The 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 buy calling the svnlook command is cached in the object, avoiding repetitious calls. .SH "METHODS" .IX Header "METHODS" .SS "\fBnew\fP \s-1REPO\s0 [, \s-1WHAT\s0, \s-1NUMBER\s0]" .IX Subsection "new REPO [, WHAT, NUMBER]" The SVN::Look constructor needs one or three arguments: .IP "\s-1REPO\s0 is the path to the repository." 4 .IX Item "REPO is the path to the repository." .PD 0 .IP "\s-1WHAT\s0 must be either '\-r' or '\-t', specifying if the third argument is a revision number or a transaction number, respectively. If neither \-r or \-t is specified, the \s-1HEAD\s0 revision is used." 4 .IX Item "WHAT must be either '-r' or '-t', specifying if the third argument is a revision number or a transaction number, respectively. If neither -r or -t is specified, the HEAD revision is used." .IP "\s-1NUMBER\s0 is either a revision or transaction \s-1NUMBER\s0, as specified by \s-1WHAT\s0." 4 .IX Item "NUMBER is either a revision or transaction NUMBER, as specified by WHAT." .PD .SS "\fBrepo\fP" .IX Subsection "repo" Returns the repository path that was passed to the constructor. .SS "\fBtxn\fP" .IX Subsection "txn" Returns the transaction number that was passed to the constructor. If none was passed, returns undef. .SS "\fBrev\fP" .IX Subsection "rev" Returns the revision number that was passed to the constructor. If none was passed, returns undef. .SS "\fBauthor\fP" .IX Subsection "author" Returns the author of the revision/transaction. .SS "\fBcat\fP \s-1PATH\s0" .IX Subsection "cat PATH" Returns the contents of the file at \s-1PATH\s0. In scalar context, return the whole contents in a single string. In list context returns a list of chomped lines. .SS "\fBchanged_hash\fP" .IX Subsection "changed_hash" Returns a reference to a hash containing information about all file changes occurred in the revision. The hash always has the following keys: .IP "added" 4 .IX Item "added" A list of files added in the revision. .IP "deleted" 4 .IX Item "deleted" A list of files deleted in the revision. .IP "updated" 4 .IX Item "updated" A list of files updated in the revision. .IP "prop_modified" 4 .IX Item "prop_modified" A list of files that had properties modified in the revision. .IP "copied" 4 .IX Item "copied" A hash containing information about each file or diretory copied in the revision. The hash keys are the names of elements copied to. The value associated with a key is a two-element array containing the name of the element copied from and the specific revision from which it was copied. .SS "\fBadded\fP" .IX Subsection "added" Returns the list of files added in the revision/transaction. .SS "\fBupdated\fP" .IX Subsection "updated" Returns the list of files updated in the revision/transaction. .SS "\fBdeleted\fP" .IX Subsection "deleted" Returns the list of files deleted in the revision/transaction. .SS "\fBprop_modified\fP" .IX Subsection "prop_modified" Returns the list of files that had properties modified in the revision/transaction. .SS "\fBchanged\fP" .IX Subsection "changed" Returns the list of all files added, updated, deleted, and the ones that had properties modified in the revision/transaction. .SS "\fBcopied_to\fP" .IX Subsection "copied_to" Returns the list of new names of files that were copied in the revision/transaction. .SS "\fBcopied_from\fP" .IX Subsection "copied_from" Returns 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. .SS "\fBdate\fP" .IX Subsection "date" Returns the date of the revision/transaction. .SS "\fBdiff\fP [\s-1OPTS\s0, ...]" .IX Subsection "diff [OPTS, ...]" Returns the GNU-style diffs of changed files and properties. There are three optional options that can be passed as strings: .ie n .IP """\-\-no\-diff\-deleted""" 4 .el .IP "\f(CW\-\-no\-diff\-deleted\fR" 4 .IX Item "--no-diff-deleted" Do not print differences for deleted files .ie n .IP """\-\-no\-diff\-added""" 4 .el .IP "\f(CW\-\-no\-diff\-added\fR" 4 .IX Item "--no-diff-added" Do not print differences for added files. .ie n .IP """\-\-diff\-copy\-from""" 4 .el .IP "\f(CW\-\-diff\-copy\-from\fR" 4 .IX Item "--diff-copy-from" Print differences against the copy source. .PP In scalar context, return the whole diff in a single string. In list context returns a list of chomped lines. .SS "\fBdirs_changed\fP" .IX Subsection "dirs_changed" Returns the list of directories changed in the revision/transaction. .SS "\fBfilesize\fP \s-1PATH\s0" .IX Subsection "filesize PATH" Returns the size (in bytes) of the file located at \s-1PATH\s0 as it is represented in the repository. .SS "\fBinfo\fP" .IX Subsection "info" Returns the author, datestamp, log message size, and log message of the revision/transaction. .SS "\fBlock\fP \s-1PATH\s0" .IX Subsection "lock PATH" If \s-1PATH\s0 has a lock, returns a hash containing information about the lock, with the following keys: .IP "\s-1UUID\s0 Token" 4 .IX Item "UUID Token" A string with the opaque lock token. .IP "Owner" 4 .IX Item "Owner" The name of the user that has the lock. .IP "Created" 4 .IX Item "Created" The time at which the lock was created, in a format like this: '2010\-02\-16 17:23:08 \-0200 (Tue, 16 Feb 2010)'. .IP "Comment" 4 .IX Item "Comment" The lock comment. .PP If \s-1PATH\s0 has no lock, returns undef. .SS "\fBlog_msg\fP" .IX Subsection "log_msg" Returns the log message of the revision/transaction. .SS "\fBpropget\fP \s-1PROPNAME\s0 \s-1PATH\s0" .IX Subsection "propget PROPNAME PATH" Returns the value of \s-1PROPNAME\s0 in \s-1PATH\s0. .SS "\fBproplist\fP \s-1PATH\s0" .IX Subsection "proplist PATH" Returns a reference to a hash containing the properties associated with \s-1PATH\s0. .SS "\fBtree\fP [\s-1PATH_IN_REPOS\s0, \s-1OPTS\s0, ...]" .IX Subsection "tree [PATH_IN_REPOS, OPTS, ...]" Returns the repository tree as a list of paths, starting at \&\s-1PATH_IN_REPOS\s0 (if supplied, at the root of the tree otherwise), optionally showing node revision ids. .ie n .IP """\-\-full\-paths""" 4 .el .IP "\f(CW\-\-full\-paths\fR" 4 .IX Item "--full-paths" show full paths instead of indenting them. .ie n .IP """\-\-show\-ids""" 4 .el .IP "\f(CW\-\-show\-ids\fR" 4 .IX Item "--show-ids" Returns the node revision ids for each path. .ie n .IP """\-\-non\-recursive""" 4 .el .IP "\f(CW\-\-non\-recursive\fR" 4 .IX Item "--non-recursive" Operate on single directory only. .SS "\fBuuid\fP" .IX Subsection "uuid" Returns the repository's \s-1UUID\s0. .SS "\fByoungest\fP" .IX Subsection "youngest" Returns the repository's youngest revision number. .SH "AUTHOR" .IX Header "AUTHOR" Gustavo L. de M. Chaves .SH "COPYRIGHT AND LICENSE" .IX Header "COPYRIGHT AND LICENSE" This software is copyright (c) 2012 by CPqD. .PP This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.