.\" Automatically generated by Pod::Man 2.28 (Pod::Simple 3.28) .\" .\" 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" '' . ds C` . ds C' '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. .\" .\" Avoid warning from groff about undefined register 'F'. .de IX .. .nr rF 0 .if \n(.g .if rF .nr rF 1 .if (\n(rF:(\n(.g==0)) \{ . if \nF \{ . de IX . tm Index:\\$1\t\\n%\t"\\$2" .. . if !\nF==2 \{ . nr % 0 . nr F 2 . \} . \} .\} .rr rF .\" .\" 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 "Arch::Changeset 3pm" .TH Arch::Changeset 3pm "2006-04-15" "perl v5.20.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" Arch::Changeset \- class representing Arch changeset .SH "SYNOPSIS" .IX Header "SYNOPSIS" \&\fBArch::Changeset\fR objects may be created directly if you got a changeset directory: .PP .Vb 5 \& use Arch::Changeset; \& my $changeset = Arch::Changeset\->new( \& \*(Aqmigo@homemail.com\-\-Perl\-GPL/arch\-perl\-\-devel\-\-0\-\-patch\-6\*(Aq, \& \*(Aq/tmp/,,changeset\-6\*(Aq, \& ); .Ve .PP But often are created indirectly by other objects: .PP .Vb 4 \& use Arch::Session; \& $changeset = Arch::Session\->new\->get_revision_changeset( \& \*(Aqmigo@homemail.com\-\-Perl\-GPL/arch\-perl\-\-devel\-\-0\-\-patch\-6\*(Aq \& ); \& \& use Arch::Library; \& $changeset = Arch::Library\->new\->get_revision_changeset( \& \*(Aqmigo@homemail.com\-\-Perl\-GPL/arch\-perl\-\-devel\-\-0\-\-patch\-6\*(Aq \& ); \& \& print scalar $changeset\->get_patch("perllib/Arch/Changeset.pm"); \& \& my $diff_file = ($changeset\->get_patch("README", 1))[2]; \& print Arch::Util::load_file($diff_file); .Ve .SH "DESCRIPTION" .IX Header "DESCRIPTION" This class represents the changeset concept in Arch and provides some useful methods. .SH "METHODS" .IX Header "METHODS" The following methods are available: .PP \&\fBnew\fR, \&\fBget_patch\fR, \&\fBget_index\fR, \&\fBget_changes\fR, \&\fBget_all_diffs\fR, \&\fBjoin_all_diffs\fR, \&\fBancestor\fR. .IP "\fBnew\fR \fIrevision-spec\fR \fIdir-name\fR" 4 .IX Item "new revision-spec dir-name" Construct the Arch::Changeset object associated with the given fully-qualified \fIrevision-spec\fR and the existing directory \fIdir-name\fR. .IP "\fBget_patch\fR \fIfile-path\fR" 4 .IX Item "get_patch file-path" .PD 0 .IP "\fBget_patch\fR \fIfile-path\fR \fItype\fR" 4 .IX Item "get_patch file-path type" .IP "\fBget_patch\fR \fIfile-path\fR \fItype\fR \fIfull-file-asis\fR" 4 .IX Item "get_patch file-path type full-file-asis" .PD Return the patch (or otherwise content) of the given \fIfile-path\fR in the changeset. .Sp \&\fItype\fR is integer: 0 (unknown, try to autodetect, this is the default), 1 (modified file, or metadata change), 2 (new file), 3 (removed file). .Sp The default behaviour is to create a fake diff against \fI/dev/null\fR for non-binary new and removed files; the \fIfull-file-asis\fR flag, if set to true, changes this behaviour and causes to return the content of such file as-is. Binary new and removed files are always returned as-is regardless of the flag. This flag is also ignored if \fItype\fR is 1. .Sp In the scalar content return the patch in \fIdiff\fR\|(1) format (or the whole file content as described above). In the list content return 4 scalars: the patch, the file name on the disk containing this patch (or the whole file), the change type (that is \*(L"patch\*(R", \*(L"new\*(R" or \*(L"removed\*(R") and the as-is flag. .Sp The returned values that follow the first one (the patch/file content) share the order of the corresponding parameters; the parameters are more hints, while the returned values accurately describe the content. .IP "\fBget_index\fR \fIname\fR" 4 .IX Item "get_index name" Returns the content of the index file \fIname\fR as an \fB\s-1ID\s0\fR => \fBpath\fR hash. .Sp Valid \fIname\fRs are 'orig\-dirs\-index', 'orig\-files\-index', 'mod\-dirs\-index' and \&'mod\-files\-index'. .IP "\fBget_changes\fR" 4 .IX Item "get_changes" Returns a list of changes in the changeset. .IP "\fBget_all_diffs\fR" 4 .IX Item "get_all_diffs" Returns all diffs in the changeset (array or arrayref). This includes changes of types \fI\s-1MODIFY\s0\fR, \fI\s-1ADD\s0\fR and \fI\s-1DELETE\s0\fR. .IP "\fBjoin_all_diffs\fR" 4 .IX Item "join_all_diffs" Returns concatenated output of all diffs in the changeset. .IP "\fBancestor\fR" 4 .IX Item "ancestor" Return the ancestor of the changeset. If \fI=ancestor\fR file is found (that is the case for library changesets) its content is returned, otherwise try to guess the ancestor of the revision using \fBArch::Util::adjacent_revision\fR. .SH "BUGS" .IX Header "BUGS" Awaiting for your reports. .SH "AUTHORS" .IX Header "AUTHORS" Mikhael Goikhman (migo@homemail.com\*(--Perl\-GPL/arch\-perl\*(--devel). .SH "SEE ALSO" .IX Header "SEE ALSO" For more information, see tla, Arch::Session, Arch::Library, Arch::Util.