From be9f26c325f4fd4e71ad4d48cb4d38a0c1c3a962 Mon Sep 17 00:00:00 2001 From: Mike Staszel Date: Tue, 25 May 2010 18:21:24 -0500 Subject: [PATCH] Added subversion to remove java, keyring, and wallet options --- extra/subversion/ChangeLog | 66 + extra/subversion/PKGBUILD | 90 + extra/subversion/pkgnone/SVN::Base.0 | 192 ++ extra/subversion/pkgnone/SVN::Client.0 | 1309 +++++++++ extra/subversion/pkgnone/SVN::Core.0 | 560 ++++ extra/subversion/pkgnone/SVN::Delta.0 | 224 ++ extra/subversion/pkgnone/SVN::Fs.0 | 567 ++++ extra/subversion/pkgnone/SVN::Ra.0 | 670 +++++ extra/subversion/pkgnone/SVN::Repos.0 | 398 +++ extra/subversion/pkgnone/SVN::Wc.0 | 473 ++++ extra/subversion/subversion.rpath.fix.patch | 10 + ...ersion.suppress.deprecation.warnings.patch | 22 + extra/subversion/svn | 11 + extra/subversion/svnmerge.py | 2370 +++++++++++++++++ extra/subversion/svnserve | 42 + extra/subversion/svnserve.conf | 7 + 16 files changed, 7011 insertions(+) create mode 100644 extra/subversion/ChangeLog create mode 100644 extra/subversion/PKGBUILD create mode 100644 extra/subversion/pkgnone/SVN::Base.0 create mode 100644 extra/subversion/pkgnone/SVN::Client.0 create mode 100644 extra/subversion/pkgnone/SVN::Core.0 create mode 100644 extra/subversion/pkgnone/SVN::Delta.0 create mode 100644 extra/subversion/pkgnone/SVN::Fs.0 create mode 100644 extra/subversion/pkgnone/SVN::Ra.0 create mode 100644 extra/subversion/pkgnone/SVN::Repos.0 create mode 100644 extra/subversion/pkgnone/SVN::Wc.0 create mode 100644 extra/subversion/subversion.rpath.fix.patch create mode 100644 extra/subversion/subversion.suppress.deprecation.warnings.patch create mode 100644 extra/subversion/svn create mode 100644 extra/subversion/svnmerge.py create mode 100755 extra/subversion/svnserve create mode 100644 extra/subversion/svnserve.conf diff --git a/extra/subversion/ChangeLog b/extra/subversion/ChangeLog new file mode 100644 index 000000000..b223bd84d --- /dev/null +++ b/extra/subversion/ChangeLog @@ -0,0 +1,66 @@ +2009-12-27 Ionut Biru + + * subversion 1.6.6-3: adding svn bash completion script + +2009-08-07 Douglas Soares de Andrade + + * Updated to: 1.6.4 + +2009-08-02 Eric Belanger + + * subversion 1.6.3-2: Rebuilt against ruby 1.9 + +2009-06-07 Douglas Soares de Andrade + + * Now hopefully fixed git issues + +2009-05-16 Douglas Soares de Andrade + + * Fixing wrong link against ruby 1.9 + +2009-05-11 Douglas Soares de Andrade + + * Updated for i686: 1.6.2 + +2009-04-17 Douglas Soares de Andrade + + * Back to use svnmerge.py from trunk + +2009-04-11 Douglas Soares de Andrade + + * Removing libtool files + +2009-04-10 Douglas Soares de Andrade + + * Updated for i686: 1.6.1 + * Added gerardo patch to fix insecure rpaths + +2009-03-24 Douglas Soares de Andrade + + * Added sqlite3 as a dep + +2009-03-21 Douglas Soares de Andrade + + * Updated for i686: 1.6.0 + +2009-02-26 Douglas Soares de Andrade + + * Updated for i686: 1.5.6 + +2008-10-10 Douglas Soares de Andrade + + * Updated for i686: 1.5.3 + +2008-09-04 Douglas Soares de Andrade + + * 1.5.2: Finally updated for i686 as it does not break the + devtools. + +2008-08-13 Douglas Soares de Andrade + + * Updated for i686: 1.5.1 + +2008-07-23 Douglas Soares de Andrade + + * Updated for i686: 1.5.0 + diff --git a/extra/subversion/PKGBUILD b/extra/subversion/PKGBUILD new file mode 100644 index 000000000..f58cfa8d3 --- /dev/null +++ b/extra/subversion/PKGBUILD @@ -0,0 +1,90 @@ +# $Id: PKGBUILD 77223 2010-04-11 14:13:33Z pierre $ +# Maintainer: Paul Mattal +# Contributor: Jason Chu + +pkgname=subversion +pkgver=1.6.9 +pkgrel=5 +pkgdesc="Replacement for CVS, another versioning system (svn)" +arch=('i686' 'x86_64') +license=('apache' 'bsd') +depends=('neon' 'apr-util') +makedepends=('heimdal' 'apache' 'python' 'perl' 'swig' 'ruby' + 'autoconf' 'sqlite3' 'db' 'e2fsprogs') +source=(http://subversion.tigris.org/downloads/$pkgname-$pkgver.tar.bz2 + svnserve svn svnserve.conf svnmerge.py + subversion.rpath.fix.patch + subversion.suppress.deprecation.warnings.patch) + +backup=('etc/xinetd.d/svn' 'etc/conf.d/svnserve') +url="http://subversion.tigris.org/" +provides=('svn') +options=('!makeflags' '!libtool') +optdepends=('bash-completion: for svn bash completion') + +build() { + cd ${srcdir}/${pkgname}-${pkgver} || return 1 + + # apply patches + patch -p0 < $srcdir/subversion.rpath.fix.patch || return 1 + patch -p1 -i $srcdir/subversion.suppress.deprecation.warnings.patch \ + || return 1 + + # configure + autoreconf || return 1 + ./configure --prefix=/usr --with-apr=/usr --with-apr-util=/usr \ + --with-zlib=/usr --with-neon=/usr --with-apxs \ + --with-sqlite=/usr || return 1 + + # build + (make external-all && make LT_LDFLAGS="-L$Fdestdir/usr/lib" local-all ) \ + || return 1 + + # install + export LD_LIBRARY_PATH=${pkgdir}/usr/lib:$LD_LIBRARY_PATH + make DESTDIR=${pkgdir} install || return 1 + + make DESTDIR=${pkgdir} swig-py || return 1 + make install-swig-py DESTDIR=${pkgdir} || return 1 + + mkdir -p ${pkgdir}/usr/lib/python2.6 || return 1 + mv ${pkgdir}/usr/lib/svn-python/ ${pkgdir}/usr/lib/python2.6/site-packages \ + || return 1 + + mkdir -p ${pkgdir}/usr/share/subversion || return 1 + install -d -m 755 tools/hook-scripts ${pkgdir}/usr/share/subversion/ \ + || return 1 + rm -f ${pkgdir}/usr/share/subversion/hook-scripts/*.in || return 1 + + make DESTDIR=${pkgdir} swig-pl || return 1 + make install-swig-pl DESTDIR=${pkgdir} INSTALLDIRS=vendor || return 1 + rm -f ${pkgdir}/usr/lib/perl5/vendor_perl/auto/SVN/_Core/.packlist \ + || return 1 + rm -rf ${pkgdir}/usr/lib/perl5/core_perl || return 1 + + make DESTDIR=${pkgdir} swig-rb || return 1 + make install-swig-rb DESTDIR=${pkgdir} || return 1 + + mkdir -p ${pkgdir}/etc/rc.d || return 1 + mkdir -p ${pkgdir}/etc/xinetd.d || return 1 + mkdir -p ${pkgdir}/etc/conf.d || return 1 + + install -m 755 ${srcdir}/svnserve ${pkgdir}/etc/rc.d || return 1 + install -m 644 ${srcdir}/svn ${pkgdir}/etc/xinetd.d || return 1 + install -m 644 ${srcdir}/svnserve.conf ${pkgdir}/etc/conf.d/svnserve \ + || return 1 + install -m 755 ${srcdir}/svnmerge.py ${pkgdir}/usr/bin/svnmerge || return 1 + install -D -m 644 ${srcdir}/subversion-$pkgver/COPYING \ + ${pkgdir}/usr/share/licenses/$pkgname/LICENSE || return 1 + + # bash completion + install -Dm 644 ${srcdir}/${pkgname}-${pkgver}/tools/client-side/bash_completion \ + ${pkgdir}/etc/bash_completion.d/subversion || return 1 +} +md5sums=('9c30a47b1d48664e7afef68bb4834c53' + 'a2b029e8385007ffb99b437b30521c90' + 'a0db6dd43af33952739b6ec089852630' + 'c459e299192552f61578f3438abf0664' + '21bf3aa5b797ce98eba8307f30e9c070' + '6b4340ba9d8845cd8497e013ae01be3f' + '1166f3b7413d7e7450299b3525680bbe') diff --git a/extra/subversion/pkgnone/SVN::Base.0 b/extra/subversion/pkgnone/SVN::Base.0 new file mode 100644 index 000000000..4f8ff4a33 --- /dev/null +++ b/extra/subversion/pkgnone/SVN::Base.0 @@ -0,0 +1,192 @@ +.\" Automatically generated by Pod::Man 2.22 (Pod::Simple 3.07) +.\" +.\" 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 "native::Base 3" +.TH native::Base 3 "2004-12-04" "perl v5.10.1" "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::Base \- Base class for importing symbols for svn modules +.SH "SYNOPSIS" +.IX Header "SYNOPSIS" +.Vb 3 +\& # Load the svn_ra_* functions into the SVN::Ra namespace. +\& package SVN::Ra; +\& use SVN::Base qw(Ra svn_ra_); +\& +\& # Load svn_config_t structure accessors in the magic namcespace +\& # provided by swig, so we could use it returned by other functions +\& package _p_svn_config_t; +\& use SVN::Base qw(Core svn_config_); +.Ve +.SH "DESCRIPTION" +.IX Header "DESCRIPTION" +SVN::Base is a module importing the subversion perl bindings raw +symbols created by swig, into proper namespace and make them easier to +use. +.PP +It will also find the accessors for members of a C struct, create an +simpler accessor function like \f(CW\*(C`$data\->field()\*(C'\fR and +\&\f(CW\*(C`$data\->field($new_value)\*(C'\fR. +.PP +Once you understand the convention of subversion functions in perl +bindings, you could look at the subversion api and write them in perl. +The \s-1API\s0 is available in the source header files or online at +http://svn.collab.net/svn\-doxygen/. +.SH "INTERNALS" +.IX Header "INTERNALS" +The perl bindings of swig wraps raw functions into different perl +modules, for example, SVN::_Core, SVN::_Repos. Upon import, SVN::Base +bootstrap the requested module if it's not yet loaded, and iterate +over the symbols provided in that module, it them puts the function +with prefix trimmed in the namespace of the caller for this import. +.PP +The 3rd through the last parameter is a list of symbol endings that +you wish for SVN::Base not to import into your namespace. This is useful +for cases where you may want to import certaion symbols differently than +normally. +.SH "CAVEATS" +.IX Header "CAVEATS" +SVN::Base consider a function as structure member accessor if it is +postfixed ``_get'' or ``_set''. Real functions with this postfixes +will need extra handling. +.SH "AUTHORS" +.IX Header "AUTHORS" +Chia-liang Kao +.SH "COPYRIGHT" +.IX Header "COPYRIGHT" +Copyright (c) 2003 CollabNet. All rights reserved. +.PP +This software is licensed as described in the file \s-1COPYING\s0, which you +should have received as part of this distribution. The terms are also +available at http://subversion.tigris.org/license\-1.html. If newer +versions of this license are posted there, you may use a newer version +instead, at your option. +.PP +This software consists of voluntary contributions made by many +individuals. For exact contribution history, see the revision history +and logs, available at http://subversion.tigris.org/. diff --git a/extra/subversion/pkgnone/SVN::Client.0 b/extra/subversion/pkgnone/SVN::Client.0 new file mode 100644 index 000000000..657133fff --- /dev/null +++ b/extra/subversion/pkgnone/SVN::Client.0 @@ -0,0 +1,1309 @@ +.\" Automatically generated by Pod::Man 2.22 (Pod::Simple 3.07) +.\" +.\" 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 "native::Client 3" +.TH native::Client 3 "2009-02-06" "perl v5.10.1" "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::Client \- Subversion client functions +.SH "SYNOPSIS" +.IX Header "SYNOPSIS" +.Vb 6 +\& use SVN::Client; +\& my $ctx = new SVN::Client( +\& auth => [SVN::Client::get_simple_provider(), +\& SVN::Client::get_simple_prompt_provider(\e&simple_prompt,2), +\& SVN::Client::get_username_provider()] +\& ); +\& +\& $ctx\->cat (\e*STDOUT, \*(Aqhttp://svn.collab.net/repos/svn/trunk/README\*(Aq, +\& \*(AqHEAD\*(Aq); +\& +\& sub simple_prompt { +\& my $cred = shift; +\& my $realm = shift; +\& my $default_username = shift; +\& my $may_save = shift; +\& my $pool = shift; +\& +\& print "Enter authentication info for realm: $realm\en"; +\& print "Username: "; +\& my $username = <>; +\& chomp($username); +\& $cred\->username($username); +\& print "Password: "; +\& my $password = <>; +\& chomp($password); +\& $cred\->password($password); +\& } +.Ve +.SH "DESCRIPTION" +.IX Header "DESCRIPTION" +SVN::Client wraps the highest level of functions provided by +subversion to accomplish specific tasks in an object oriented \s-1API\s0. +Methods are similar to the functions provided by the C \s-1API\s0 and +as such the documentation for it may be helpful in understanding +this interface. +.PP +There are a few notable differences from the C \s-1API\s0. Most C function +calls take a svn_client_ctx_t pointer as the next to last parameter. +The Perl method calls take a SVN::Client object as the first parameter. +This allows method call invocation of the methods to be possible. For +example, the following are equivalent: +.PP +.Vb 2 +\& SVN::Client::add($ctx,$path, $recursive, $pool); +\& $ctx\->add($path, $recursive, $pool); +.Ve +.PP +Many of the C \s-1API\s0 calls also take a apr_pool_t pointer as their last +argument. The Perl bindings generally deal with this for you and +you do not need to pass a pool parameter. However, you may still +pass a pool parameter as the last parameter to override the automatic +handling of this for you. +.PP +Users of this interface should not directly manipulate the underlying hash +values but should use the respective attribute methods. Many of these +attribute methods do other things, especially when setting an attribute, +besides simply manipulating the value in the hash. +.SH "PARAMETER NOTES" +.IX Header "PARAMETER NOTES" +The client methods described below take a variety of parameters. Many of +them are similar. Methods accepting parameters named below will follow +the rules below or will be noted otherwise in the method description. +.ie n .IP "$ctx" 4 +.el .IP "\f(CW$ctx\fR" 4 +.IX Item "$ctx" +An SVN::Client object that you get from the constructor. +.ie n .IP "$url" 4 +.el .IP "\f(CW$url\fR" 4 +.IX Item "$url" +This is a \s-1URL\s0 to a subversion repository. +.ie n .IP "$path" 4 +.el .IP "\f(CW$path\fR" 4 +.IX Item "$path" +This is a path to a file or directory on the local file system. +.ie n .IP "$paths" 4 +.el .IP "\f(CW$paths\fR" 4 +.IX Item "$paths" +This argument can either be a single path to a file or directory on the local +file system, or it can be a reference to an array of files or directories on +the local file system. +.ie n .IP "$target" 4 +.el .IP "\f(CW$target\fR" 4 +.IX Item "$target" +This is a path to a file or directory in a working copy or a \s-1URL\s0 to a file or +directory in a subversion repository. +.ie n .IP "$targets" 4 +.el .IP "\f(CW$targets\fR" 4 +.IX Item "$targets" +This argument can either be a single \f(CW$target\fR (as defined above) or a reference +to an array of them. +.ie n .IP "$revision" 4 +.el .IP "\f(CW$revision\fR" 4 +.IX Item "$revision" +This specifies a revision in the subversion repository. You can specify a +revision in several ways. The easiest and most obvious is to directly +provide the revision number. You may also use the strings (aka revision +keywords) '\s-1HEAD\s0', '\s-1BASE\s0', '\s-1COMMITTED\s0', and '\s-1PREV\s0' which have the same +meanings as in the command line client. When referencing a working copy +you can use the string '\s-1WORKING\s0" to reference the \s-1BASE\s0 plus any local +modifications. undef may be used to specify an unspecified revision. +Finally you may pass a date by specifying the date inside curly braces +\&'{}'. The date formats accepted are the same as the command line client +accepts. +.ie n .IP "$recursive $nonrecursive." 4 +.el .IP "\f(CW$recursive\fR \f(CW$nonrecursive\fR." 4 +.IX Item "$recursive $nonrecursive." +A boolean parameter that specifies if the action should follow directories. It +should only be 1 or 0. \f(CW$recursive\fR means, 1 means to descend into directories, +0 means not to. \f(CW$nonrecursive\fR has the inverse meaning. +.ie n .IP "$pool" 4 +.el .IP "\f(CW$pool\fR" 4 +.IX Item "$pool" +Pool is always an option parameter. If you wish to pass a pool parameter it +should be a SVN::Pool or an apr_pool_t object. +.SH "METHODS" +.IX Header "METHODS" +The following methods are available: +.ie n .IP "$ctx = SVN::Client\->new( %options );" 4 +.el .IP "\f(CW$ctx\fR = SVN::Client\->new( \f(CW%options\fR );" 4 +.IX Item "$ctx = SVN::Client->new( %options );" +This class method constructs a new \f(CW\*(C`SVN::Client\*(C'\fR object and returns +a reference to it. +.Sp +Key/value pair arguments may be provided to set up the initial state +of the user agent. The following methods correspond to attribute +methods described below: +.Sp +.Vb 5 +\& KEY DEFAULT +\& \-\-\-\-\-\-\-\-\-\- \-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\- +\& auth auth_baton initiated with providers that +\& read cached authentication options from +\& the subversion config only. +\& +\& cancel undef +\& +\& config Hash containing the config from the +\& default subversion config file location. +\& +\& log_msg undef +\& +\& notify undef +\& +\& pool A new pool is created for the context. +.Ve +.ie n .IP "$ctx\->add($path, $recursive, $pool);" 4 +.el .IP "\f(CW$ctx\fR\->add($path, \f(CW$recursive\fR, \f(CW$pool\fR);" 4 +.IX Item "$ctx->add($path, $recursive, $pool);" +Schedule a working copy \f(CW$path\fR for addition to the repository. +.Sp +\&\f(CW$path\fR's parent must be under revision control already, but \f(CW$path\fR is not. +If \f(CW$recursive\fR is set, then assuming \f(CW$path\fR is a directory, all of its +contents will be scheduled for addition as well. +.Sp +Calls the notify callback for each added item. +.Sp +Important: this is a \fBscheduling\fR operation. No changes will happen +to the repository until a commit occurs. This scheduling can be +removed with \f(CW$ctx\fR\->\fIrevert()\fR. +.Sp +No return. +.ie n .IP "$ctx\->blame($target, $start, $end, \e&receiver, $pool);" 4 +.el .IP "\f(CW$ctx\fR\->blame($target, \f(CW$start\fR, \f(CW$end\fR, \e&receiver, \f(CW$pool\fR);" 4 +.IX Item "$ctx->blame($target, $start, $end, &receiver, $pool);" +Invoke \e&receiver subroutine on each line-blame item associated with revision +\&\f(CW$end\fR of \f(CW$target\fR, using \f(CW$start\fR as the default source of all blame. +.Sp +An Error will be raised if either \f(CW$start\fR or \f(CW$end\fR is undef. +.Sp +No return. +.Sp +The blame receiver subroutine receives the following arguments: +\&\f(CW$line_no\fR, \f(CW$revision\fR, \f(CW$author\fR, \f(CW$date\fR, \f(CW$line\fR, \f(CW$pool\fR +.Sp +\&\f(CW$line_no\fR is the line number of the file (starting with 0). +The line was last changed in revision number \f(CW$revision\fR +by \f(CW$author\fR on \f(CW$date\fR and the contents were \f(CW$line\fR. +.Sp +The blame receiver subroutine can return an svn_error_t object +to return an error. All other returns will be ignored. +You can create an svn_error_t object with \fISVN::Error::create()\fR. +.ie n .IP "$ctx\->cat(\e*FILEHANDLE, $target, $revision, $pool);" 4 +.el .IP "\f(CW$ctx\fR\->cat(\e*FILEHANDLE, \f(CW$target\fR, \f(CW$revision\fR, \f(CW$pool\fR);" 4 +.IX Item "$ctx->cat(*FILEHANDLE, $target, $revision, $pool);" +Outputs the content of the file identified by \f(CW$target\fR and \f(CW$revision\fR to the +\&\s-1FILEHANDLE\s0. \s-1FILEHANDLE\s0 is a reference to a filehandle. +.Sp +If \f(CW$target\fR is not a local path and if \f(CW$revision\fR is '\s-1PREV\s0' (or some +other kind that requires a local path), then an error will be raised, +because the desired revision can not be determined. +.ie n .IP "$ctx\->checkout($url, $path, $revision, $recursive, $pool);" 4 +.el .IP "\f(CW$ctx\fR\->checkout($url, \f(CW$path\fR, \f(CW$revision\fR, \f(CW$recursive\fR, \f(CW$pool\fR);" 4 +.IX Item "$ctx->checkout($url, $path, $revision, $recursive, $pool);" +Checkout a working copy of \f(CW$url\fR at \f(CW$revision\fR using \f(CW$path\fR as the root directory +of the newly checked out working copy. +.Sp +\&\f(CW$revision\fR must be a number, '\s-1HEAD\s0', or a date. If \f(CW$revision\fR does not +meet these requirements the \f(CW$SVN::Error::CLIENT_BAD_REVISION\fR is raised. +.Sp +Returns the value of the revision actually checked out of the repository. +.ie n .IP "$ctx\->cleanup($dir, $pool);" 4 +.el .IP "\f(CW$ctx\fR\->cleanup($dir, \f(CW$pool\fR);" 4 +.IX Item "$ctx->cleanup($dir, $pool);" +Recursively cleanup a working copy directory, \f(CW$dir\fR, finishing any incomplete +operations, removing lockfiles, etc. +.ie n .IP "$ctx\->commit($targets, $nonrecursive, $pool);" 4 +.el .IP "\f(CW$ctx\fR\->commit($targets, \f(CW$nonrecursive\fR, \f(CW$pool\fR);" 4 +.IX Item "$ctx->commit($targets, $nonrecursive, $pool);" +Commit files or directories referenced by target. Will use the log_msg +callback to obtain the log message for the commit. +.Sp +If \f(CW$targets\fR contains no paths (zero elements), then does nothing and +immediately returns without error. +.Sp +Calls the notify callback as the commit progresses with any of the following +actions: \f(CW$SVN::Wc::Notify::Action::commit_modified\fR, +\&\f(CW$SVN::Wc::Notify::Action::commit_added\fR, +\&\f(CW$SVN::Wc::Notify::Action::commit_deleted\fR, +\&\f(CW$SVN::Wc::Notify::Action::commit_replaced\fR, +\&\f(CW$SVN::Wc::Notify::Action::commit_postfix_txdelta\fR. +.Sp +Use \f(CW$nonrecursive\fR to indicate that subdirectories of directory targets +should be ignored. +.Sp +Returns a svn_client_commit_info_t object. If the revision member of the +commit information object is \f(CW$SVN::Core::INVALID_REVNUM\fR and no error was +raised, then the commit was a no-op; nothing needed to be committed. +.ie n .IP "$ctx\->copy($src_target, $src_revision, $dst_target, $pool);" 4 +.el .IP "\f(CW$ctx\fR\->copy($src_target, \f(CW$src_revision\fR, \f(CW$dst_target\fR, \f(CW$pool\fR);" 4 +.IX Item "$ctx->copy($src_target, $src_revision, $dst_target, $pool);" +Copies \f(CW$src_target\fR to \f(CW$dst_target\fR. +.Sp +\&\f(CW$src_target\fR must be a file or directory under version control, or the \s-1URL\s0 +of a versioned item in the repository. If \f(CW$src_target\fR is a \s-1URL\s0, +\&\f(CW$src_revision\fR is used to choose the revision from which to copy the +\&\f(CW$src_target\fR. \f(CW$dst_path\fR must be a file or directory under version control, +or a repository \s-1URL\s0, existing or not. +.Sp +If \f(CW$dst_target\fR is a \s-1URL\s0, immediately attempt to commit the copy action +to the repository. The log_msg callback will be called to query for a commit +log message. If the commit succeeds, return a svn_client_commit_info_t +object. +.Sp +If \f(CW$dst_target\fR is not a \s-1URL\s0, then this is just a variant of \f(CW$ctx\fR\->\fIadd()\fR, +where the \f(CW$dst_path\fR items are scheduled for addition as copies. No changes +will happen to the repository until a commit occurs. This scheduling can be +removed with \f(CW$ctx\fR\->\fIrevert()\fR. undef will be returned in this case. +.Sp +Calls the notify callback for each item added at the new location, passing +the new, relative path of the added item. +.ie n .IP "$ctx\->delete($targets, $force, $pool);" 4 +.el .IP "\f(CW$ctx\fR\->delete($targets, \f(CW$force\fR, \f(CW$pool\fR);" 4 +.IX Item "$ctx->delete($targets, $force, $pool);" +Delete items from a repository or working copy. +.Sp +If the paths in \f(CW$targets\fR are URLs, immediately attempt to commit a deletion +of the URLs from the repository. The log_msg callback will be called to +query for a commit log message. If the commit succeeds, return a +svn_client_commit_info_t object. Every path must belong to the same +repository. +.Sp +Else, schedule the working copy paths in \f(CW$targets\fR for removal from the +repository. Each path's parent must be under revision control. This is +just a \fBscheduling\fR operation. No changes will happen to the repository +until a commit occurs. This scheduling can be removed with \f(CW$ctx\fR\->\fIrevert()\fR. +If a path is a file it is immediately removed from the working copy. If +the path is a directory it will remain in the working copy but all the files, +and all unversioned items it contains will be removed. If \f(CW$force\fR is not set +then this operation will fail if any path contains locally modified and/or +unversioned items. If \f(CW$force\fR is set such items will be deleted. +.Sp +The notify callback is called for each item deleted with the path of +the deleted item. +.Sp +Has no return. +.ie n .IP "$ctx\->diff($diff_options, $target1, $revision1, $target2, $revision2, $recursive, $ignore_ancestry, $no_diff_deleted, $outfile, $errfile, $pool);" 4 +.el .IP "\f(CW$ctx\fR\->diff($diff_options, \f(CW$target1\fR, \f(CW$revision1\fR, \f(CW$target2\fR, \f(CW$revision2\fR, \f(CW$recursive\fR, \f(CW$ignore_ancestry\fR, \f(CW$no_diff_deleted\fR, \f(CW$outfile\fR, \f(CW$errfile\fR, \f(CW$pool\fR);" 4 +.IX Item "$ctx->diff($diff_options, $target1, $revision1, $target2, $revision2, $recursive, $ignore_ancestry, $no_diff_deleted, $outfile, $errfile, $pool);" +Produces diff output which describes the delta between \f(CW$target1\fR at +\&\f(CW$revision1\fR and \f(CW$target2\fR at \f(CW$revision2\fR. They both must represent the same +node type (i.e. they most both be directories or files). The revisions +must not be undef. +.Sp +Prints the output of the diff to the filename or filehandle passed as +\&\f(CW$outfile\fR, and any errors to the filename or filehandle passed as \f(CW$errfile\fR. +.Sp +Use \f(CW$ignore_ancestry\fR to control whether or not items being diffed will be +checked for relatedness first. Unrelated items are typically transmitted to +the editor as a deletion of one thing and the addition of another, but if this +flag is true, unrelated items will be diffed as if they were related. +.Sp +If \f(CW$no_diff_deleted\fR is true, then no diff output will be generated on deleted +files. +.Sp +\&\f(CW$diff_options\fR is a reference to an array of additional arguments to pass to +diff process invoked to compare files. You'll usually just want to use [] to +pass an empty array to return a unified context diff (like `diff \-u`). +.Sp +Has no return. +.ie n .IP "$ctx\->diff_summarize($target1, $revision1, $target2, $revision2, $recursive, $ignore_ancestry, \e&summarize_func, $pool);" 4 +.el .IP "\f(CW$ctx\fR\->diff_summarize($target1, \f(CW$revision1\fR, \f(CW$target2\fR, \f(CW$revision2\fR, \f(CW$recursive\fR, \f(CW$ignore_ancestry\fR, \e&summarize_func, \f(CW$pool\fR);" 4 +.IX Item "$ctx->diff_summarize($target1, $revision1, $target2, $revision2, $recursive, $ignore_ancestry, &summarize_func, $pool);" +Produce a diff summary which lists the changed items between \f(CW$target1\fR +at \f(CW$revision1\fR and \f(CW$target2\fR at \f(CW$revision2\fR without creating text deltas. +\&\f(CW$target1\fR and \f(CW$target2\fR can be either working-copy paths or URLs. +.Sp +The function may report false positives if \f(CW$ignore_ancestry\fR is false, +since a file might have been modified between two revisions, but still +have the same contents. +.Sp +Calls \e&summarize_func with with a svn_client_diff_summarize_t structure +describing the difference. +.Sp +See \fIdiff()\fR for a description of the other parameters. +.Sp +Has no return. +.ie n .IP "$ctx\->export($from, $to, $revision, $force, $pool);" 4 +.el .IP "\f(CW$ctx\fR\->export($from, \f(CW$to\fR, \f(CW$revision\fR, \f(CW$force\fR, \f(CW$pool\fR);" 4 +.IX Item "$ctx->export($from, $to, $revision, $force, $pool);" +Export the contents of either a subversion repository or a subversion +working copy into a 'clean' directory (meaning a directory with no +administrative directories). +.Sp +\&\f(CW$from\fR is either the path to the working copy on disk, or a \s-1URL\s0 +to the repository you wish to export. +.Sp +\&\f(CW$to\fR is the path to the directory where you wish to create the exported +tree. +.Sp +\&\f(CW$revision\fR is the revision that should be exported, which is only used +when exporting from a repository. It may be undef otherwise. +.Sp +The notify callback will be called for the items exported. +.Sp +Returns the value of the revision actually exported or +\&\f(CW$SVN::Core::INVALID_REVNUM\fR for local exports. +.ie n .IP "$ctx\->import($path, $url, $nonrecursive, $pool);" 4 +.el .IP "\f(CW$ctx\fR\->import($path, \f(CW$url\fR, \f(CW$nonrecursive\fR, \f(CW$pool\fR);" 4 +.IX Item "$ctx->import($path, $url, $nonrecursive, $pool);" +Import file or directory \f(CW$path\fR into repository directory \f(CW$url\fR at head. +.Sp +If some components of \f(CW$url\fR do not exist then create parent directories +as necessary. +.Sp +If \f(CW$path\fR is a directory, the contents of that directory are imported +directly into the directory identified by \f(CW$url\fR. Note that the directory +\&\f(CW$path\fR itself is not imported; that is, the basename of \f(CW$path\fR is not part +of the import. +.Sp +If \f(CW$path\fR is a file, then the dirname of \f(CW$url\fR is the directory receiving the +import. The basename of \f(CW$url\fR is the filename in the repository. In this case +if \f(CW$url\fR already exists, raise an error. +.Sp +The notify callback (if defined) will be called as the import progresses, with +any of the following actions: \f(CW$SVN::Wc::Notify::Action::commit_added\fR, +\&\f(CW$SVN::Wc::Notify::Action::commit_postfix_txdelta\fR. +.Sp +Use \f(CW$nonrecursive\fR to indicate that imported directories should not recurse +into any subdirectories they may have. +.Sp +Uses the log_msg callback to determine the log message for the commit when +one is needed. +.Sp +Returns a svn_client_commit_info_t object. +.ie n .IP "$ctx\->log($targets, $start, $end, $discover_changed_paths, $strict_node_history, \e&log_receiver, $pool);" 4 +.el .IP "\f(CW$ctx\fR\->log($targets, \f(CW$start\fR, \f(CW$end\fR, \f(CW$discover_changed_paths\fR, \f(CW$strict_node_history\fR, \e&log_receiver, \f(CW$pool\fR);" 4 +.IX Item "$ctx->log($targets, $start, $end, $discover_changed_paths, $strict_node_history, &log_receiver, $pool);" +Invoke the log_receiver subroutine on each log_message from \f(CW$start\fR to \f(CW$end\fR in +turn, inclusive (but will never invoke receiver on a given log message more +than once). +.Sp +\&\f(CW$targets\fR is a reference to an array containing all the paths or URLs for +which the log messages are desired. The log_receiver is only invoked on +messages whose revisions involved a change to some path in \f(CW$targets\fR. +.Sp +If \f(CW$discover_changed_paths\fR is set, then the changed_paths argument to the +log_receiver routine will be passed on each invocation. +.Sp +If \f(CW$strict_node_history\fR is set, copy history (if any exists) will not be +traversed while harvesting revision logs for each target. +.Sp +If \f(CW$start\fR or \f(CW$end\fR is undef the arp_err code will be set to: +\&\f(CW$SVN::Error::CLIENT_BAD_REVISION\fR. +.Sp +Special case for repositories at revision 0: +.Sp +If \f(CW$start\fR is '\s-1HEAD\s0' and \f(CW$end\fR is 1, then handle an empty (no revisions) +repository specially: instead of erroring because requested revision 1 +when the highest revision is 0, just invoke \f(CW$log_receiver\fR on revision 0, +passing undef to changed paths and empty strings for the author and date. +This is because that particular combination of \f(CW$start\fR and \f(CW$end\fR usually indicates +the common case of log invocation; the user wants to see all log messages from +youngest to oldest, where the oldest commit is revision 1. That works fine, +except there are no commits in the repository, hence this special case. +.Sp +Calls the notify subroutine with a \f(CW$SVN::Wc::Notify::Action::skip\fR signal on any +unversioned targets. +.Sp +The log_receiver takes the following arguments: +\&\f(CW$changed_paths\fR, \f(CW$revision\fR, \f(CW$author\fR, \f(CW$date\fR, \f(CW$message\fR, \f(CW$pool\fR +.Sp +It is called once for each log \f(CW$message\fR from the \f(CW$revision\fR +on \f(CW$date\fR by \f(CW$author\fR. \f(CW$author\fR, \f(CW$date\fR or \f(CW$message\fR may be undef. +.Sp +If \f(CW$changed_paths\fR is defined it references a hash with the keys +every path committed in \f(CW$revision\fR; the values are svn_log_changed_path_t +objects. +.ie n .IP "$ctx\->ls($target, $revision, $recursive, $pool);" 4 +.el .IP "\f(CW$ctx\fR\->ls($target, \f(CW$revision\fR, \f(CW$recursive\fR, \f(CW$pool\fR);" 4 +.IX Item "$ctx->ls($target, $revision, $recursive, $pool);" +Returns a hash of svn_dirent_t objects for \f(CW$target\fR at \f(CW$revision\fR. +.Sp +If \f(CW$target\fR is a directory, returns entries for all of the directories' +contents. If \f(CW$recursive\fR is true, it will recurse subdirectories in \f(CW$target\fR. +.Sp +If \f(CW$target\fR is a file only return an entry for the file. +.Sp +If \f(CW$target\fR is non-existent, raises the \f(CW$SVN::Error::FS_NOT_FOUND\fR +error. +.ie n .IP "$ctx\->merge($src1, $rev1, $src2, $rev2, $target_wcpath, $recursive, $ignore_ancestry, $force, $dry_run, $pool);" 4 +.el .IP "\f(CW$ctx\fR\->merge($src1, \f(CW$rev1\fR, \f(CW$src2\fR, \f(CW$rev2\fR, \f(CW$target_wcpath\fR, \f(CW$recursive\fR, \f(CW$ignore_ancestry\fR, \f(CW$force\fR, \f(CW$dry_run\fR, \f(CW$pool\fR);" 4 +.IX Item "$ctx->merge($src1, $rev1, $src2, $rev2, $target_wcpath, $recursive, $ignore_ancestry, $force, $dry_run, $pool);" +Merge changes from \f(CW$src1\fR/$rev1 to \f(CW$src2\fR/$rev2 into the working-copy path +\&\f(CW$target_wcpath\fR. +.Sp +\&\f(CW$src1\fR and \f(CW$src2\fR are either URLs that refer to entries in the repository, or +paths to entries in the working copy. +.Sp +By 'merging', we mean: apply file differences and schedule additions & +deletions when appropriate. +.Sp +\&\f(CW$src1\fR and \f(CW$src2\fR must both represent the same node kind; that is, if \f(CW$src1\fR +is a directory, \f(CW$src2\fR must also be, and if \f(CW$src1\fR is a file, \f(CW$src2\fR must also be. +.Sp +If either \f(CW$rev1\fR or \f(CW$rev2\fR is undef raises the \f(CW$SVN::Error::CLIENT_BAD_REVISION\fR +error. +.Sp +If \f(CW$recursive\fR is true (and the URLs are directories), apply changes recursively; +otherwise, only apply changes in the current directory. +.Sp +Use \f(CW$ignore_ancestry\fR to control whether or not items being diffed will be +checked for relatedness first. Unrelated items are typically transmitted +to the editor as a deletion of one thing and the addition of another, but +if this flag is true, unrelated items will be diffed as if they were related. +.Sp +If \f(CW$force\fR is not set and the merge involves deleting locally modified or +unversioned items the operation will raise an error. If \f(CW$force\fR is set such +items will be deleted. +.Sp +Calls the notify callback once for each merged target, passing the targets +local path. +.Sp +If \f(CW$dry_run\fR is true the merge is carried out, and the full notification +feedback is provided, but the working copy is not modified. +.Sp +Has no return. +.ie n .IP "$ctx\->mkdir($targets, $pool);" 4 +.el .IP "\f(CW$ctx\fR\->mkdir($targets, \f(CW$pool\fR);" 4 +.IX Item "$ctx->mkdir($targets, $pool);" +Create a directory, either in a repository or a working copy. +.Sp +If \f(CW$targets\fR contains URLs, immediately attempts to commit the creation of the +directories in \f(CW$targets\fR in the repository. Returns a svn_client_commit_info_t +object. +.Sp +Else, create the directories on disk, and attempt to schedule them for addition. +In this case returns undef. +.Sp +Calls the notify callback when the directory has been created (successfully) +in the working copy, with the path of the new directory. Note this is only +called for items added to the working copy. +.ie n .IP "$ctx\->move($src_path, $src_revision, $dst_path, $force, $pool);" 4 +.el .IP "\f(CW$ctx\fR\->move($src_path, \f(CW$src_revision\fR, \f(CW$dst_path\fR, \f(CW$force\fR, \f(CW$pool\fR);" 4 +.IX Item "$ctx->move($src_path, $src_revision, $dst_path, $force, $pool);" +Move \f(CW$src_path\fR to \f(CW$dst_path\fR. +.Sp +\&\f(CW$src_path\fR must be a file or directory under version control, or the \s-1URL\s0 +of a versioned item in the repository. +.Sp +If \f(CW$src_path\fR is a repository \s-1URL:\s0 +.Sp +* \f(CW$dst_path\fR must also be a repository \s-1URL\s0 (existent or not). +.Sp +* \f(CW$src_revision\fR is used to choose the revision from which to copy the +\&\f(CW$src_path\fR. +.Sp +* The log_msg callback will be called for the commit log message. +.Sp +* The move operation will be immediately committed. If the commit succeeds, +returns a svn_client_commit_info_t object. +.Sp +If \f(CW$src_path\fR is a working copy path +.Sp +* \f(CW$dst_path\fR must also be a working copy path (existent or not). +.Sp +* \f(CW$src_revision\fR is ignored and may be undef. The log_msg callback will +not be called. +.Sp +* This is a scheduling operation. No changes will happen to the repository +until a commit occurs. This scheduling can be removed with \f(CW$ctx\fR\->\fIrevert()\fR. +If \f(CW$src_path\fR is a file it is removed from the working copy immediately. +If \f(CW$src_path\fR is a directory it will remain in the working copy but all +files, and unversioned items, it contains will be removed. +.Sp +* If \f(CW$src_path\fR contains locally modified and/or unversioned items and \f(CW$force\fR is +not set, the copy will raise an error. If \f(CW$force\fR is set such items will be +removed. +.Sp +The notify callback will be called twice for each item moved, once to +indicate the deletion of the moved node, and once to indicate the addition +of the new location of the node. +.ie n .IP "$ctx\->propget($propname, $target, $revision, $recursive, $pool);" 4 +.el .IP "\f(CW$ctx\fR\->propget($propname, \f(CW$target\fR, \f(CW$revision\fR, \f(CW$recursive\fR, \f(CW$pool\fR);" 4 +.IX Item "$ctx->propget($propname, $target, $revision, $recursive, $pool);" +Returns a reference to a hash containing paths or URLs, prefixed by \f(CW$target\fR (a +working copy or \s-1URL\s0), of items for which the property \f(CW$propname\fR is set, and +whose values represent the property value for \f(CW$propname\fR at that path. +.ie n .IP "$ctx\->proplist($target, $revision, $recursive, $pool);" 4 +.el .IP "\f(CW$ctx\fR\->proplist($target, \f(CW$revision\fR, \f(CW$recursive\fR, \f(CW$pool\fR);" 4 +.IX Item "$ctx->proplist($target, $revision, $recursive, $pool);" +Returns a reference to an array of svn_client_proplist_item_t objects. +.Sp +For each item the node_name member of the proplist_item object contains +the name relative to the same base as \f(CW$target\fR. +.Sp +If \f(CW$revision\fR is undef, then get properties from the working copy, if +\&\f(CW$target\fR is a working copy, or from the repository head if \f(CW$target\fR is a \s-1URL\s0. +Else get the properties as of \f(CW$revision\fR. +.Sp +If \f(CW$recursive\fR is false, or \f(CW$target\fR is a file, the returned array will only +contain a single element. Otherwise, it will contain one entry for each +versioned entry below (and including) \f(CW$target\fR. +.Sp +If \f(CW$target\fR is not found, raises the \f(CW$SVN::Error::ENTRY_NOT_FOUND\fR error. +.ie n .IP "$ctx\->propset($propname, $propval, $target, $recursive, $pool);" 4 +.el .IP "\f(CW$ctx\fR\->propset($propname, \f(CW$propval\fR, \f(CW$target\fR, \f(CW$recursive\fR, \f(CW$pool\fR);" 4 +.IX Item "$ctx->propset($propname, $propval, $target, $recursive, $pool);" +Set \f(CW$propname\fR to \f(CW$propval\fR on \f(CW$target\fR (a working copy or \s-1URL\s0 path). +.Sp +If \f(CW$recursive\fR is true, then \f(CW$propname\fR will be set recursively on \f(CW$target\fR +and all children. If \f(CW$recursive\fR is false, and \f(CW$target\fR is a directory, +\&\f(CW$propname\fR will be set on \fBonly\fR \f(CW$target\fR. +.Sp +A \f(CW$propval\fR of undef will delete the property. +.Sp +If \f(CW$propname\fR is an svn-controlled property (i.e. prefixed with svn:), +then the caller is responsible for ensuring that \f(CW$propval\fR is UTF8\-encoded +and uses \s-1LF\s0 line-endings. +.ie n .IP "$ctx\->relocate($dir, $from, $to, $recursive, $pool);" 4 +.el .IP "\f(CW$ctx\fR\->relocate($dir, \f(CW$from\fR, \f(CW$to\fR, \f(CW$recursive\fR, \f(CW$pool\fR);" 4 +.IX Item "$ctx->relocate($dir, $from, $to, $recursive, $pool);" +Modify a working copy directory \f(CW$dir\fR, changing any repository URLs that +begin with \f(CW$from\fR to begin with \f(CW$to\fR instead, recursing into subdirectories if +\&\f(CW$recursive\fR is true. +.Sp +Has no return. +.ie n .IP "$ctx\->resolved($path, $recursive, $pool);" 4 +.el .IP "\f(CW$ctx\fR\->resolved($path, \f(CW$recursive\fR, \f(CW$pool\fR);" 4 +.IX Item "$ctx->resolved($path, $recursive, $pool);" +Removed the 'conflicted' state on a working copy path. +.Sp +This will not semantically resolve conflicts; it just allows \f(CW$path\fR to be +committed in the future. The implementation details are opaque. If +\&\f(CW$recursive\fR is set, recurse below \f(CW$path\fR, looking for conflicts to +resolve. +.Sp +If \f(CW$path\fR is not in a state of conflict to begin with, do nothing. +.Sp +If \f(CW$path\fR's conflict state is removed, call the notify callback with the +\&\f(CW$path\fR. +.ie n .IP "$ctx\->revert($paths, $recursive, $pool);" 4 +.el .IP "\f(CW$ctx\fR\->revert($paths, \f(CW$recursive\fR, \f(CW$pool\fR);" 4 +.IX Item "$ctx->revert($paths, $recursive, $pool);" +Restore the pristine version of a working copy \f(CW$paths\fR, effectively undoing +any local mods. +.Sp +For each path in \f(CW$paths\fR, if it is a directory and \f(CW$recursive\fR +is true, this will be a recursive operation. +.ie n .IP "$ctx\->revprop_get($propname, $url, $revision, $pool);" 4 +.el .IP "\f(CW$ctx\fR\->revprop_get($propname, \f(CW$url\fR, \f(CW$revision\fR, \f(CW$pool\fR);" 4 +.IX Item "$ctx->revprop_get($propname, $url, $revision, $pool);" +Returns two values, the first of which is the value of \f(CW$propname\fR on revision +\&\f(CW$revision\fR in the repository represented by \f(CW$url\fR. The second value is the +actual revision queried. +.Sp +Note that unlike its cousin \f(CW$ctx\fR\->\fIpropget()\fR, this routine doesn't affect +working copy at all; it's a pure network operation that queries an +\&\fBunversioned\fR property attached to a revision. This can be used to query +log messages, dates, authors, and the like. +.ie n .IP "$ctx\->revprop_list($url, $revision, $pool);" 4 +.el .IP "\f(CW$ctx\fR\->revprop_list($url, \f(CW$revision\fR, \f(CW$pool\fR);" 4 +.IX Item "$ctx->revprop_list($url, $revision, $pool);" +Returns two values, the first of which is a reference to a hash containing +the properties attached to \f(CW$revision\fR in the repository represented by \f(CW$url\fR. +The second value is the actual revision queried. +.Sp +Note that unlike its cousin \f(CW$ctx\fR\->\fIproplist()\fR, this routine doesn't read a +working copy at all; it's a pure network operation that reads \fBunversioned\fR +properties attached to a revision. +.ie n .IP "$ctx\->revprop_set($propname, $propval, $url, $revision, $force, $pool);" 4 +.el .IP "\f(CW$ctx\fR\->revprop_set($propname, \f(CW$propval\fR, \f(CW$url\fR, \f(CW$revision\fR, \f(CW$force\fR, \f(CW$pool\fR);" 4 +.IX Item "$ctx->revprop_set($propname, $propval, $url, $revision, $force, $pool);" +Set \f(CW$propname\fR to \f(CW$propval\fR on revision \f(CW$revision\fR in the repository represented +by \f(CW$url\fR. +.Sp +Returns the actual revision affected. A \f(CW$propval\fR of undef will delete the +property. +.Sp +If \f(CW$force\fR is true, allow newlines in the author property. +.Sp +If \f(CW$propname\fR is an svn-controlled property (i.e. prefixed with svn:), then +the caller is responsible for ensuring that the value is UTF8\-encoded and +uses \s-1LF\s0 line-endings. +.Sp +Note that unlike its cousin \f(CW$ctx\fR\->\fIpropset()\fR, this routine doesn't affect +the working copy at all; it's a pure network operation that changes an +\&\fBunversioned\fR property attached to a revision. This can be used to tweak +log messages, dates, authors, and the like. Be careful: it's a lossy +operation, meaning that any existing value is replaced with the new value, +with no way to retrieve the prior value. +.Sp +Also note that unless the administrator creates a pre-revprop-change hook +in the repository, this feature will fail. +.ie n .IP "$ctx\->status($path, $revision, \e&status_func, $recursive, $get_all, $update, $no_ignore, $pool);" 4 +.el .IP "\f(CW$ctx\fR\->status($path, \f(CW$revision\fR, \e&status_func, \f(CW$recursive\fR, \f(CW$get_all\fR, \f(CW$update\fR, \f(CW$no_ignore\fR, \f(CW$pool\fR);" 4 +.IX Item "$ctx->status($path, $revision, &status_func, $recursive, $get_all, $update, $no_ignore, $pool);" +Given \f(CW$path\fR to a working copy directory (or single file), call \fIstatus_func()\fR +with a set of svn_wc_status_t objects which describe the status of \f(CW$path\fR and +its children. +.Sp +If \f(CW$recursive\fR is true, recurse fully, else do only immediate children. +.Sp +If \f(CW$get_all\fR is set, retrieve all entries; otherwise, retrieve only 'interesting' +entries (local mods and/or out-of-date). +.Sp +If \f(CW$update\fR is set, contact the repository and augment the status objects with +information about out-of-dateness (with respect to \f(CW$revision\fR). Also, will +return the value of the actual revision against with the working copy was +compared. (The return will be undef if \f(CW$update\fR is not set). +.Sp +The function recurses into externals definitions ('svn:externals') after +handling the main target, if any exist. The function calls the notify callback +with \f(CW$SVN::Wc::Notify::Action::status_external\fR action before handling each +externals definition, and with \f(CW$SVN::Wc::Notify::Action::status_completed\fR +after each. +.Sp +The status_func subroutine takes the following parameters: +\&\f(CW$path\fR, \f(CW$status\fR +.Sp +\&\f(CW$path\fR is the pathname of the file or directory which status is being +reported. \f(CW$status\fR is a svn_wc_status_t object. +.Sp +The return of the status_func subroutine is ignored. +.ie n .IP "$ctx\->info($path_or_url, $peg_revision, $revision, \e&receiver, $recurse);" 4 +.el .IP "\f(CW$ctx\fR\->info($path_or_url, \f(CW$peg_revision\fR, \f(CW$revision\fR, \e&receiver, \f(CW$recurse\fR);" 4 +.IX Item "$ctx->info($path_or_url, $peg_revision, $revision, &receiver, $recurse);" +Invokes \e&receiver passing it information about \f(CW$path_or_url\fR for \f(CW$revision\fR. +The information returned is system-generated metadata, not the sort of +\&\*(L"property\*(R" metadata created by users. For methods available on the object +passed to \e&receiver, \fBsee svn_info_t\fR. +.Sp +If both revision arguments are either svn_opt_revision_unspecified or \s-1NULL\s0, +then information will be pulled solely from the working copy; no network +connections will be made. +.Sp +Otherwise, information will be pulled from a repository. The actual node +revision selected is determined by the \f(CW$path_or_url\fR as it exists in +\&\f(CW$peg_revision\fR. If \f(CW$peg_revision\fR is undef, then it defaults to \s-1HEAD\s0 for URLs +or \s-1WORKING\s0 for \s-1WC\s0 targets. +.Sp +If \f(CW$path_or_url\fR is not a local path, then if \f(CW$revision\fR is \s-1PREV\s0 (or some other +kind that requires a local path), an error will be returned, because the +desired revision cannot be determined. +.Sp +Uses the authentication baton cached in ctx to authenticate against the +repository. +.Sp +If \f(CW$recurse\fR is true (and \f(CW$path_or_url\fR is a directory) this will be a recursive +operation, invoking \f(CW$receiver\fR on each child. +.Sp +.Vb 5 +\& my $receiver = sub { +\& my( $path, $info, $pool ) = @_; +\& print "Current revision of $path is ", $info\->rev, "\en"; +\& }; +\& $ctx\->info( \*(Aqfoo/bar.c\*(Aq, undef, \*(AqWORKING\*(Aq, $receiver, 0 ); +.Ve +.ie n .IP "$ctx\->switch($path, $url, $revision, $recursive, $pool);" 4 +.el .IP "\f(CW$ctx\fR\->switch($path, \f(CW$url\fR, \f(CW$revision\fR, \f(CW$recursive\fR, \f(CW$pool\fR);" 4 +.IX Item "$ctx->switch($path, $url, $revision, $recursive, $pool);" +Switch working tree \f(CW$path\fR to \f(CW$url\fR at \f(CW$revision\fR. +.Sp +\&\f(CW$revision\fR must be a number, '\s-1HEAD\s0', or a date, otherwise it raises the +\&\f(CW$SVN::Error::CLIENT_BAD_REVISION\fR error. +.Sp +Calls the notify callback on paths affected by the switch. Also invokes +the callback for files that may be restored from the text-base because they +were removed from the working copy. +.Sp +Summary of purpose: This is normally used to switch a working directory +over to another line of development, such as a branch or a tag. Switching +an existing working directory is more efficient than checking out \f(CW$url\fR from +scratch. +.Sp +Returns the value of the revision to which the working copy was actually +switched. +.ie n .IP "$ctx\->update($path, $revision, $recursive, $pool)" 4 +.el .IP "\f(CW$ctx\fR\->update($path, \f(CW$revision\fR, \f(CW$recursive\fR, \f(CW$pool\fR)" 4 +.IX Item "$ctx->update($path, $revision, $recursive, $pool)" +Update a working copy \f(CW$path\fR to \f(CW$revision\fR. +.Sp +\&\f(CW$revision\fR must be a revision number, '\s-1HEAD\s0', or a date or this method will +raise the \f(CW$SVN::Error::CLIENT_BAD_REVISION\fR error. +.Sp +Calls the notify callback for each item handled by the update, and +also for files restored from the text-base. +.Sp +Returns the revision to which the working copy was actually updated. +.ie n .IP "$ctx\->url_from_path($target, $pool); or SVN::Client::url_from_path($target, $pool);" 4 +.el .IP "\f(CW$ctx\fR\->url_from_path($target, \f(CW$pool\fR); or SVN::Client::url_from_path($target, \f(CW$pool\fR);" 4 +.IX Item "$ctx->url_from_path($target, $pool); or SVN::Client::url_from_path($target, $pool);" +Returns the \s-1URL\s0 for \f(CW$target\fR. +.Sp +If \f(CW$target\fR is already a \s-1URL\s0 it returns \f(CW$target\fR. +.Sp +If \f(CW$target\fR is a versioned item, it returns \f(CW$target\fR's entry \s-1URL\s0. +.Sp +If \f(CW$target\fR is unversioned (has no entry), returns undef. +.ie n .IP "$ctx\->uuid_from_path($path, $adm_access, $pool);" 4 +.el .IP "\f(CW$ctx\fR\->uuid_from_path($path, \f(CW$adm_access\fR, \f(CW$pool\fR);" 4 +.IX Item "$ctx->uuid_from_path($path, $adm_access, $pool);" +Return the repository uuid for working-copy \f(CW$path\fR, allocated in \f(CW$pool\fR. +.Sp +Use \f(CW$adm_access\fR to retrieve the uuid from \f(CW$path\fR's entry; if not present in the +entry, then call \f(CW$ctx\fR\->\fIuuid_from_url()\fR to retrieve, using the entry's \s-1URL\s0. +.Sp +Note: The only reason this function falls back on \f(CW$ctx\fR\->uuid_from_url is for +compatibility purposes. Old working copies may not have uuids in the entries +files. +.Sp +Note: This method probably doesn't work right now without a lot of pain, +because SVN::Wc is incomplete and it requires an adm_access object from it. +.ie n .IP "$ctx\->uuid_from_url($url, $pool);" 4 +.el .IP "\f(CW$ctx\fR\->uuid_from_url($url, \f(CW$pool\fR);" 4 +.IX Item "$ctx->uuid_from_url($url, $pool);" +Return repository uuid for url. +.SH "ATTRIBUTE METHODS" +.IX Header "ATTRIBUTE METHODS" +The following attribute methods are provided that allow you to set various +configuration or retrieve it. They all take value(s) to set the attribute and +return the new value of the attribute or no parameters which returns the +current value. +.ie n .IP "$ctx\->auth(\fISVN::Client::get_username_provider()\fR);" 4 +.el .IP "\f(CW$ctx\fR\->auth(\fISVN::Client::get_username_provider()\fR);" 4 +.IX Item "$ctx->auth(SVN::Client::get_username_provider());" +Provides access to the auth_baton in the svn_client_ctx_t attached to the +SVN::Client object. +.Sp +This method will accept an array or array ref of values returned from the +authentication provider functions see \*(L"\s-1AUTHENTICATION\s0 \s-1PROVIDERS\s0\*(R", which +it will convert to an auth_baton for you. This is the preferred method of +setting the auth_baton. +.Sp +It will also accept a scalar that references a _p_svn_auth_baton_t such as +those returned from SVN::Core::auth_open and SVN::Core::auth_open_helper. +.ie n .IP "$ctx\->notify(\e¬ify);" 4 +.el .IP "\f(CW$ctx\fR\->notify(\e¬ify);" 4 +.IX Item "$ctx->notify(¬ify);" +Sets the notify callback for the client context to a code reference that +you pass. It always returns the current codereference set. +.Sp +The subroutine pointed to by this reference will be called when a change +is made to the working copy. The return value of this function is ignored. +It's only purpose is to notify you of the change. +.Sp +The subroutine will receive 6 parameters. The first parameter will be the path +of the changed file (absolute or relative to the cwd). The second is an +integer specifying the type of action taken. See SVN::Wc for a list of the +possible actions values and what they mean. The 3rd is an integer specifying +the kind of node the path is, which can be: \f(CW$SVN::Node::none\fR, \f(CW$SVN::Node::file\fR, +\&\f(CW$SVN::Node::dir\fR, \f(CW$SVN::Node::unknown\fR. The fourth parameter is the mime-type of +the file or undef if the mime-type is unknown (it will always be undef for +directories). The 5th parameter is the state of the file, again see SVN::Wc +for a list of the possible states. The 6th and final parameter is the numeric +revision number of the changed file. The revision number will be \-1 except +when the action is \f(CW$SVN::Wc::Notify::Action::update_completed\fR. +.ie n .IP "$ctx\->log_msg(\e&log_msg)" 4 +.el .IP "\f(CW$ctx\fR\->log_msg(\e&log_msg)" 4 +.IX Item "$ctx->log_msg(&log_msg)" +Sets the log_msg callback for the client context to a code reference that you +pass. It always returns the current codereference set. +.Sp +The subroutine pointed to by this coderef will be called to get the log +message for any operation that will commit a revision to the repo. +.Sp +It receives 4 parameters. The first parameter is a reference to a scalar +value in which the callback should place the log_msg. If you wish to cancel +the commit you can set this scalar to undef. The 2nd value is a path to a +temporary file which might be holding that log message, or undef if no such +field exists (though, if log_msg is undef, this value is undefined). The +log message \fB\s-1MUST\s0\fR be a \s-1UTF8\s0 string with \s-1LF\s0 line separators. The 3rd parameter +is a reference to an array of svn_client_commit_item3_t objects, which may +be fully or only partially filled-in, depending on the type of commit +operation. The 4th and last parameter will be a pool. +.Sp +If the function wishes to return an error it should return a svn_error_t +object made with SVN::Error::create. Any other return value will be +interpreted as \s-1SVN_NO_ERROR\s0. +.ie n .IP "$ctx\->cancel(\e&cancel)" 4 +.el .IP "\f(CW$ctx\fR\->cancel(\e&cancel)" 4 +.IX Item "$ctx->cancel(&cancel)" +Sets the log_msg callback for the client context to a code reference that you +pass. It always returns the current codereference set. +.Sp +The subroutine pointed to by this value will be called to see if the operation +should be canceled. If the operation should be canceled, the function may +return one of the following values: +.Sp +An svn_error_t object made with SVN::Error::create. +.Sp +Any true value, in which case the bindings will generate an svn_error_t object +for you with the error code of \s-1SVN_ERR_CANCELLED\s0 and the string set to \*(L"By +cancel callback\*(R". +.Sp +A string, in which case the bindings will generate an svn_error_t object for you +with the error code of \s-1SVN_ERR_CANCELLED\s0 and the string set to the string you +returned. +.Sp +Any other value will be interpreted as wanting to continue the operation. +Generally, it's best to return 0 to continue the operation. +.ie n .IP "$ctx\->pool(new SVN::Pool);" 4 +.el .IP "\f(CW$ctx\fR\->pool(new SVN::Pool);" 4 +.IX Item "$ctx->pool(new SVN::Pool);" +Method that sets or gets the default pool that is passed to method calls +requiring a pool, but which were not explicitly passed one. +.Sp +See SVN::Core for more information about how pools are managed +in this interface. +.ie n .IP "$ctx\->config(SVN::Core::config_get_config(undef));" 4 +.el .IP "\f(CW$ctx\fR\->config(SVN::Core::config_get_config(undef));" 4 +.IX Item "$ctx->config(SVN::Core::config_get_config(undef));" +Method that allows access to the config member of the svn_client_ctx_t. +Accepts a Perl hash to set, which is what functions like +\&\fISVN::Core:config_get_config()\fR will return. +.Sp +It will return a _p_arp_hash_t scalar. This is a temporary +situation. The return value is not particular useful. In +the future, this value will be tied to the actual hash used +by the C \s-1API\s0. +.SH "AUTHENTICATION PROVIDERS" +.IX Header "AUTHENTICATION PROVIDERS" +The following functions get authentication providers for you. +They come in two forms. Standard or File versions, which look +for authentication information in the subversion configuration +directory that was previously cached, or Prompt versions which +call a subroutine to allow you to prompt the user for the +information. +.PP +The functions that return the svn_auth_provider_object_t for prompt style +providers take a reference to a Perl subroutine to use for the callback. The +first parameter each of these subroutines receive is a credential object. The +subroutines return the response by setting members of that object. Members may +be set like so: \f(CW$cred\fR\->username(\*(L"breser\*(R"); These functions and credential +objects always have a may_save member which specifies if the authentication +data will be cached. +.PP +The providers are as follows: +.PP +.Vb 3 +\& NAME WHAT IT HANDLES +\& \-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\- \-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\- +\& simple username and password pairs +\& +\& username username only +\& +\& ssl_server_trust server certificates and failures +\& authenticating them +\& +\& ssl_client_cert client side certificate files +\& +\& ssl_client_cert_pw password for a client side certificate file. +.Ve +.IP "SVN::Client::get_simple_provider" 4 +.IX Item "SVN::Client::get_simple_provider" +Returns a simple provider that returns information from previously cached +sessions. Takes no parameters or one pool parameter. +.IP "SVN::Client::get_simple_prompt_provider" 4 +.IX Item "SVN::Client::get_simple_prompt_provider" +Returns a simple provider that prompts the user via a callback. Takes two or +three parameters, the first is the callback subroutine, the 2nd is the number +of retries to allow, the 3rd is optionally a pool. The subroutine gets called +with the following parameters: a svn_auth_cred_simple_t object, a realm string, +a default username, may_save, and a pool. The svn_auth_cred_simple has the +following members: username, password, and may_save. +.IP "SVN::Client::get_username_provider" 4 +.IX Item "SVN::Client::get_username_provider" +Returns a username provider that returns information from a previously cached +sessions. Takes no parameters or one pool parameter. +.IP "SVN::Client::get_username_prompt_provider" 4 +.IX Item "SVN::Client::get_username_prompt_provider" +Returns a username provider that prompts the user via a callback. Takes two or +three parameters, the first is the callback subroutine, the 2nd is the number +of retries to allow, the 3rd is optionally a pool. The subroutine gets called +with the following parameters: a svn_auth_cred_username_t object, a realm +string, a default username, may_save, and a pool. The svn_auth_cred_username +has the following members: username and may_save. +.IP "SVN::Client::get_ssl_server_trust_file_provider" 4 +.IX Item "SVN::Client::get_ssl_server_trust_file_provider" +Returns a server trust provider that returns information from previously +cached sessions. Takes no parameters or optionally a pool parameter. +.IP "SVN::Client::get_ssl_server_trust_prompt_provider" 4 +.IX Item "SVN::Client::get_ssl_server_trust_prompt_provider" +Returns a server trust provider that prompts the user via a callback. Takes +one or two parameters the callback subroutine and optionally a pool parameter. +The subroutine gets called with the following parameters. A +svn_auth_cred_ssl_server_trust_t object, a realm string, an integer specifying +how the certificate failed authentication, a svn_auth_ssl_server_cert_info_t +object, may_save, and a pool. The svn_auth_cred_ssl_server_trust_t object has +the following members: may_save and accepted_failures. The +svn_auth_ssl_server_cert_info_t object has the following members (and behaves +just like cred objects though you can't modify it): hostname, fingerprint, +valid_from, valid_until, issuer_dname, ascii_cert. +.Sp +The masks used for determining the failures are in SVN::Auth::SSL and are named: +.Sp +\&\f(CW$SVN::Auth::SSL::NOTYETVALID\fR +\&\f(CW$SVN::Auth::SSL::EXPIRED\fR +\&\f(CW$SVN::Auth::SSL::CNMISMATCH\fR +\&\f(CW$SVN::Auth::SSL::UNKNOWNCA\fR +\&\f(CW$SVN::Auth::SSL::OTHER\fR +.Sp +You reply by setting the accepted_failures of the cred object with an integer +of the values for what you want to accept bitwise \s-1AND\s0'd together. +.IP "SVN::Client::get_ssl_client_cert_file_provider" 4 +.IX Item "SVN::Client::get_ssl_client_cert_file_provider" +Returns a client certificate provider that returns information from previously +cached sessions. Takes no parameters or optionally a pool parameter. +.IP "SVN::Client::get_ssl_client_cert_prompt_provider" 4 +.IX Item "SVN::Client::get_ssl_client_cert_prompt_provider" +Returns a client certificate provider that prompts the user via a callback. +Takes two or three parameters: the first is the callback subroutine, the 2nd is +the number of retries to allow, the 3rd is optionally a pool parameter. The +subroutine gets called with the following parameters. A +svn_auth_cred_ssl_client_cert object, a realm string, may_save, and a pool. +The svn_auth_cred_ssl_client_cert the following members: cert_file and +may_save. +.IP "SVN::Client::get_ssl_client_cert_pw_file_provider" 4 +.IX Item "SVN::Client::get_ssl_client_cert_pw_file_provider" +Returns a client certificate password provider that returns information from +previously cached sessions. Takes no parameters or optionally a pool +parameter. +.IP "SVN::Client::get_ssl_client_cert_pw_prompt_provider" 4 +.IX Item "SVN::Client::get_ssl_client_cert_pw_prompt_provider" +Returns a client certificate password provider that prompts the user via a +callback. Takes two or three parameters, the first is the callback subroutine, +the 2nd is the number of retries to allow, the 3rd is optionally a pool +parameter. The subroutine gets called with the following parameters. A +svn_auth_cred_ssl_client_cert_pw object, a realm string, may_save, and a pool. +The svn_auth_cred_ssl_client_cert_pw has the following members: password and +may_save. +.SH "OBJECTS" +.IX Header "OBJECTS" +These are some of the object types that are returned from the methods +and functions. Others are documented in SVN::Core and SVN::Wc. +If an object is not documented, it is more than likely opaque and +not something you can do anything with, except pass to other functions +that require such objects. +.SS "svn_info_t" +.IX Subsection "svn_info_t" +.ie n .IP "$info\->\s-1\fIURL\s0()\fR" 8 +.el .IP "\f(CW$info\fR\->\s-1\fIURL\s0()\fR" 8 +.IX Item "$info->URL()" +Where the item lives in the repository. +.ie n .IP "$info\->\fIrev()\fR" 8 +.el .IP "\f(CW$info\fR\->\fIrev()\fR" 8 +.IX Item "$info->rev()" +The revision of the object. If path_or_url is a working-copy +path, then this is its current working revnum. If path_or_url +is a \s-1URL\s0, then this is the repos revision that path_or_url lives in. +.ie n .IP "$info\->\fIkind()\fR" 8 +.el .IP "\f(CW$info\fR\->\fIkind()\fR" 8 +.IX Item "$info->kind()" +The node's kind. +.ie n .IP "$info\->\fIrepos_root_URL()\fR" 8 +.el .IP "\f(CW$info\fR\->\fIrepos_root_URL()\fR" 8 +.IX Item "$info->repos_root_URL()" +The root \s-1URL\s0 of the repository. +.ie n .IP "$info\->\fIrepos_UUID()\fR" 8 +.el .IP "\f(CW$info\fR\->\fIrepos_UUID()\fR" 8 +.IX Item "$info->repos_UUID()" +The repository's \s-1UUID\s0. +.ie n .IP "$info\->\fIlast_changed_rev()\fR" 8 +.el .IP "\f(CW$info\fR\->\fIlast_changed_rev()\fR" 8 +.IX Item "$info->last_changed_rev()" +The last revision in which this object changed. +.ie n .IP "$info\->\fIlast_changed_date()\fR" 8 +.el .IP "\f(CW$info\fR\->\fIlast_changed_date()\fR" 8 +.IX Item "$info->last_changed_date()" +The date of the last_changed_rev. +.ie n .IP "$info\->\fIlast_changed_author()\fR" 8 +.el .IP "\f(CW$info\fR\->\fIlast_changed_author()\fR" 8 +.IX Item "$info->last_changed_author()" +The author of the last_changed_rev. +.ie n .IP "$info\->\fIlock()\fR" 8 +.el .IP "\f(CW$info\fR\->\fIlock()\fR" 8 +.IX Item "$info->lock()" +An exclusive lock, if present. Could be either local or remote. +.PP +See SVN::Wc::svn_wc_entry_t for the rest of these. svn_client.h indicates +that these were copied from that struct and mean the same things. They are +also only useful when working with a \s-1WC\s0. +.ie n .IP "$info\->\fIhas_wc_info()\fR" 8 +.el .IP "\f(CW$info\fR\->\fIhas_wc_info()\fR" 8 +.IX Item "$info->has_wc_info()" +.PD 0 +.ie n .IP "$info\->\fIschedule()\fR" 8 +.el .IP "\f(CW$info\fR\->\fIschedule()\fR" 8 +.IX Item "$info->schedule()" +.ie n .IP "$info\->\fIcopyfrom_url()\fR" 8 +.el .IP "\f(CW$info\fR\->\fIcopyfrom_url()\fR" 8 +.IX Item "$info->copyfrom_url()" +.ie n .IP "$info\->\fIcopyfrom_rev()\fR" 8 +.el .IP "\f(CW$info\fR\->\fIcopyfrom_rev()\fR" 8 +.IX Item "$info->copyfrom_rev()" +.ie n .IP "$info\->\fItext_time()\fR" 8 +.el .IP "\f(CW$info\fR\->\fItext_time()\fR" 8 +.IX Item "$info->text_time()" +.ie n .IP "$info\->\fIprop_time()\fR" 8 +.el .IP "\f(CW$info\fR\->\fIprop_time()\fR" 8 +.IX Item "$info->prop_time()" +.ie n .IP "$info\->\fIchecksum()\fR" 8 +.el .IP "\f(CW$info\fR\->\fIchecksum()\fR" 8 +.IX Item "$info->checksum()" +.ie n .IP "$info\->\fIconflict_old()\fR" 8 +.el .IP "\f(CW$info\fR\->\fIconflict_old()\fR" 8 +.IX Item "$info->conflict_old()" +.ie n .IP "$info\->\fIconflict_new()\fR" 8 +.el .IP "\f(CW$info\fR\->\fIconflict_new()\fR" 8 +.IX Item "$info->conflict_new()" +.ie n .IP "$info\->\fIconflict_wrk()\fR" 8 +.el .IP "\f(CW$info\fR\->\fIconflict_wrk()\fR" 8 +.IX Item "$info->conflict_wrk()" +.ie n .IP "$info\->\fIprejfile()\fR" 8 +.el .IP "\f(CW$info\fR\->\fIprejfile()\fR" 8 +.IX Item "$info->prejfile()" +.PD +.SS "svn_client_commit_item3_t" +.IX Subsection "svn_client_commit_item3_t" +.ie n .IP "$citem\->\fIpath()\fR" 8 +.el .IP "\f(CW$citem\fR\->\fIpath()\fR" 8 +.IX Item "$citem->path()" +Absolute working-copy path of item. +.ie n .IP "$citem\->\fIkind()\fR" 8 +.el .IP "\f(CW$citem\fR\->\fIkind()\fR" 8 +.IX Item "$citem->kind()" +An integer representing the type of node it is (file/dir). +Can be one of the following constants: +\&\f(CW$SVN::Node::none\fR +\&\f(CW$SVN::Node::file\fR +\&\f(CW$SVN::Node::dir\fR +\&\f(CW$SVN::Node::unknown\fR +.ie n .IP "$citem\->\fIurl()\fR" 8 +.el .IP "\f(CW$citem\fR\->\fIurl()\fR" 8 +.IX Item "$citem->url()" +Commit \s-1URL\s0 for this item. +.ie n .IP "$citem\->\fIrevision()\fR" 8 +.el .IP "\f(CW$citem\fR\->\fIrevision()\fR" 8 +.IX Item "$citem->revision()" +Revision (copyfrom_rev if state_flags has \s-1IS_COPY\s0 set). +.ie n .IP "$citem\->\fIcopyform_url()\fR;" 8 +.el .IP "\f(CW$citem\fR\->\fIcopyform_url()\fR;" 8 +.IX Item "$citem->copyform_url();" +CopyFrom \s-1URL\s0 +.ie n .IP "$citem\->\fIstate_flags()\fR;" 8 +.el .IP "\f(CW$citem\fR\->\fIstate_flags()\fR;" 8 +.IX Item "$citem->state_flags();" +One of several state flags: +\&\f(CW$SVN::Client::COMMIT_ITEM_ADD\fR +\&\f(CW$SVN::Client::COMMIT_ITEM_DELETE\fR +\&\f(CW$SVN::Client::COMMIT_ITEM_TEXT_MODS\fR +\&\f(CW$SVN::Client::COMMIT_ITEM_PROP_MODS\fR +\&\f(CW$SVN::Client::COMMIT_ITEM_IS_COPY\fR +.ie n .IP "$citem>\fIincoming_prop_changes()\fR" 8 +.el .IP "\f(CW$citem\fR>\fIincoming_prop_changes()\fR" 8 +.IX Item "$citem>incoming_prop_changes()" +A reference to an array of svn_prop_t objects representing changes to +\&\s-1WC\s0 properties. +.ie n .IP "$citem>\fIoutgoing_prop_changes()\fR" 8 +.el .IP "\f(CW$citem\fR>\fIoutgoing_prop_changes()\fR" 8 +.IX Item "$citem>outgoing_prop_changes()" +A reference to an array of svn_prop_t objects representing extra +changes to properties in the repository (which are not necessarily +reflected by the \s-1WC\s0). +.SS "svn_client_commit_info_t" +.IX Subsection "svn_client_commit_info_t" +.ie n .IP "$cinfo\->\fIrevision()\fR" 4 +.el .IP "\f(CW$cinfo\fR\->\fIrevision()\fR" 4 +.IX Item "$cinfo->revision()" +Just committed revision. +.ie n .IP "$cinfo\->\fIdate()\fR" 4 +.el .IP "\f(CW$cinfo\fR\->\fIdate()\fR" 4 +.IX Item "$cinfo->date()" +Server-Side date of the commit as a string. +.ie n .IP "$cinfo\->\fIauthor()\fR" 4 +.el .IP "\f(CW$cinfo\fR\->\fIauthor()\fR" 4 +.IX Item "$cinfo->author()" +Author of the commit. +.SS "svn_client_proplist_item_t" +.IX Subsection "svn_client_proplist_item_t" +.ie n .IP "$proplist\->\fInode_name()\fR" 8 +.el .IP "\f(CW$proplist\fR\->\fInode_name()\fR" 8 +.IX Item "$proplist->node_name()" +The name of the node on which these properties are set. +.ie n .IP "$proplist\->\fIprop_hash()\fR" 8 +.el .IP "\f(CW$proplist\fR\->\fIprop_hash()\fR" 8 +.IX Item "$proplist->prop_hash()" +A reference to a hash of property names and values. +.SS "svn_client_diff_summarize_kind_t \- SVN::Summarize" +.IX Subsection "svn_client_diff_summarize_kind_t - SVN::Summarize" +An enum of the following constants: +.PP +\&\f(CW$SVN::Client::Summarize::normal\fR, \f(CW$SVN::Client::Summarize::added\fR, +\&\f(CW$SVN::Client::Summarize::modified\fR, \f(CW$SVN::Client::Summarize::deleted\fR. +.SS "svn_client_diff_summarize_t" +.IX Subsection "svn_client_diff_summarize_t" +.ie n .IP "$diff_summarize\->\fIpath()\fR" 8 +.el .IP "\f(CW$diff_summarize\fR\->\fIpath()\fR" 8 +.IX Item "$diff_summarize->path()" +Path relative to the target. If the target is a file, path is the +empty string. +.ie n .IP "$diff_summarize\->\fIsummarize_kind()\fR" 8 +.el .IP "\f(CW$diff_summarize\fR\->\fIsummarize_kind()\fR" 8 +.IX Item "$diff_summarize->summarize_kind()" +Change kind. +.ie n .IP "$diff_summarize\->\fIprop_changed()\fR" 8 +.el .IP "\f(CW$diff_summarize\fR\->\fIprop_changed()\fR" 8 +.IX Item "$diff_summarize->prop_changed()" +Properties changed? +.ie n .IP "$diff_summarize\->\fInode_kind()\fR" 8 +.el .IP "\f(CW$diff_summarize\fR\->\fInode_kind()\fR" 8 +.IX Item "$diff_summarize->node_kind()" +File or dir? +.SH "TODO" +.IX Header "TODO" +* Better support for the config. +.PP +* Unit tests for cleanup, diff, export, merge, move, relocate, resolved +and switch. This may reveal problems for using these methods as I haven't +tested them yet that require deeper fixes. +.SH "AUTHORS" +.IX Header "AUTHORS" +Chia-liang Kao +.PP +Ben Reser +.SH "COPYRIGHT" +.IX Header "COPYRIGHT" +Copyright (c) 2003 CollabNet. All rights reserved. +.PP +This software is licensed as described in the file \s-1COPYING\s0, which you +should have received as part of this distribution. The terms are also +available at http://subversion.tigris.org/license\-1.html. If newer +versions of this license are posted there, you may use a newer version +instead, at your option. +.PP +This software consists of voluntary contributions made by many +individuals. For exact contribution history, see the revision history +and logs, available at http://subversion.tigris.org/. +.SH "POD ERRORS" +.IX Header "POD ERRORS" +Hey! \fBThe above document had some coding errors, which are explained below:\fR +.IP "Around line 1451:" 4 +.IX Item "Around line 1451:" +=back without =over diff --git a/extra/subversion/pkgnone/SVN::Core.0 b/extra/subversion/pkgnone/SVN::Core.0 new file mode 100644 index 000000000..fda5fe821 --- /dev/null +++ b/extra/subversion/pkgnone/SVN::Core.0 @@ -0,0 +1,560 @@ +.\" Automatically generated by Pod::Man 2.22 (Pod::Simple 3.07) +.\" +.\" 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 "native::Core 3" +.TH native::Core 3 "2008-08-13" "perl v5.10.1" "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::Core \- Core module of the subversion perl bindings +.SH "SYNOPSIS" +.IX Header "SYNOPSIS" +.Vb 1 +\& use SVN::Core; # does apr_initialize and cleanup for you +\& +\& # create a root pool and set it as default pool for later use +\& my $pool = SVN::Pool\->new_default; +\& +\& sub something { +\& # create a subpool of the current default pool +\& my $pool = SVN::Pool\->new_default_sub; +\& # some svn operations... +\& +\& # $pool gets destroyed and the previous default pool +\& # is restored when $pool\*(Aqs lexical scope ends +\& } +\& +\& # svn_stream_t as native perl io handle +\& my $stream = $txn\->root\->apply_text(\*(Aqtrunk/filea\*(Aq, undef); +\& print $stream $text; +\& close $stream; +\& +\& # native perl io handle as svn_stream_t +\& SVN::Repos::dump_fs($repos, \e*STDOUT, \e*STDERR, +\& 0, $repos\->fs\->youngest_rev, 0); +.Ve +.SH "DESCRIPTION" +.IX Header "DESCRIPTION" +SVN::Core implements higher level functions of fundamental subversion +functions. +.SH "FUNCTIONS" +.IX Header "FUNCTIONS" +.IP "SVN::Core::auth_open([auth provider array]);" 4 +.IX Item "SVN::Core::auth_open([auth provider array]);" +Takes a reference to an array of authentication providers +and returns an auth_baton. If you use prompt providers +you can not use this function, but need to use the +auth_open_helper. +.IP "SVN::Core::auth_open_helper([auth provider array]);" 4 +.IX Item "SVN::Core::auth_open_helper([auth provider array]);" +Prompt providers return two values instead of one. The +2nd parameter is a reference to whatever was passed into +them as the callback. auth_open_helper splits up these +arguments, passing the provider objects into auth_open +which gives it an auth_baton and putting the other +ones in an array. The first return value of this +function is the auth_baton, the second is a reference +to an array containing the references to the callbacks. +.Sp +These callback arrays should be stored in the object +the auth_baton is attached to. +.SH "OTHER OBJECTS" +.IX Header "OTHER OBJECTS" +.SS "svn_stream_t \- SVN::Stream" +.IX Subsection "svn_stream_t - SVN::Stream" +You can use native perl io handles (including io globs) as +svn_stream_t in subversion functions. Returned svn_stream_t are also +translated into perl io handles, so you could access them with regular +print, read, etc. +.PP +Note that some functions take a stream to read from or write to, but do not +close the stream while still holding the reference to the io handle. +In this case the handle won't be destroyed properly. +You should always set up the correct default pool before calling +such functions. +.SS "svn_pool_t \- SVN::Pool" +.IX Subsection "svn_pool_t - SVN::Pool" +The perl bindings significantly simplify the usage of pools, while +still being manually adjustable. +.PP +For functions requiring a pool as the last argument (which are, almost all +of the subversion functions), the pool argument is optional. The default pool +is used if it is omitted. When \f(CW\*(C`SVN::Core\*(C'\fR is loaded, it creates a +new default pool, which is also available from \f(CW\*(C`SVN::Core\->gpool\*(C'\fR. +.PP +For callback functions providing a pool to your subroutine, you could +also use \f(CW$pool\fR\->default to make it the default pool in the scope. +.PP +\fIMethods\fR +.IX Subsection "Methods" +.IP "new ([$parent])" 4 +.IX Item "new ([$parent])" +Create a new pool. The pool is a root pool if \f(CW$parent\fR is not supplied. +.IP "new_default ([$parent])" 4 +.IX Item "new_default ([$parent])" +Create a new pool. The pool is a root pool if \f(CW$parent\fR is not supplied. +Set the new pool as default pool. +.IP "new_default_sub" 4 +.IX Item "new_default_sub" +Create a new subpool of the current default pool, and set the +resulting pool as new default pool. +.IP "clear" 4 +.IX Item "clear" +Clear the pool. +.IP "\s-1DESTROY\s0" 4 +.IX Item "DESTROY" +Destroy the pool. If the pool was the default pool, restore the +previous default pool. This is normally called +automatically when the SVN::Pool object is no longer used and +destroyed by the perl garbage collector. +.SS "svn_error_t \- SVN::Error" +.IX Subsection "svn_error_t - SVN::Error" +By default the perl bindings handle exceptions for you. The default handler +automatically croaks with an appropriate error message. This is likely +sufficient for simple scripts, but more complex usage may demand handling of +errors. +.PP +You can override the default exception handler by changing the +\&\f(CW$SVN::Error::handler\fR variable. This variable holds a reference to a perl sub +that should be called whenever an error is returned by a svn function. This +sub will be passed a svn_error_t object. Its return value is ignored. +.PP +If you set the \f(CW$SVN::Error::handler\fR to undef then each call will return an +svn_error_t object as its first return in the case of an error, followed by the +normal return values. If there is no error then a svn_error_t will not be +returned and only the normal return values will be returned. When using this +mode you should be careful only to call functions in array context. For +example: my ($ci) = \f(CW$ctx\fR\->mkdir('http://svn/foo'); In this case \f(CW$ci\fR will +be an svn_error_t object if an error occurs and a svn_client_commit_info object +otherwise. If you leave the parenthesis off around \f(CW$ci\fR (scalar context) it +will be the commit_info object, which in the case of an error will be undef. +.PP +If you plan on using explicit exception handling, understanding the exception +handling system the C \s-1API\s0 uses is helpful. You can find information on it in +the \s-1HACKING\s0 file and the \s-1API\s0 documentation. Looking at the implementation of +SVN::Error::croak_on_error and SVN::Error::expanded_message may be helpful as +well. +.ie n .IP "$svn_error_t\->\fIapr_err()\fR" 4 +.el .IP "\f(CW$svn_error_t\fR\->\fIapr_err()\fR" 4 +.IX Item "$svn_error_t->apr_err()" +\&\s-1APR\s0 error value, possibly \s-1SVN_\s0 custom error. +.ie n .IP "$svn_error_t\->\fImessage()\fR" 4 +.el .IP "\f(CW$svn_error_t\fR\->\fImessage()\fR" 4 +.IX Item "$svn_error_t->message()" +Details from producer of error. +.ie n .IP "$svn_error_t\->\fIchild()\fR" 4 +.el .IP "\f(CW$svn_error_t\fR\->\fIchild()\fR" 4 +.IX Item "$svn_error_t->child()" +svn_error_t object of the error that's wrapped. +.ie n .IP "$svn_error_t\->\fIpool()\fR" 4 +.el .IP "\f(CW$svn_error_t\fR\->\fIpool()\fR" 4 +.IX Item "$svn_error_t->pool()" +The pool holding this error and any child errors it wraps. +.ie n .IP "$svn_error_t\->\fIfile()\fR" 4 +.el .IP "\f(CW$svn_error_t\fR\->\fIfile()\fR" 4 +.IX Item "$svn_error_t->file()" +Source file where the error originated. +.ie n .IP "$svn_error_t\->\fIline()\fR" 4 +.el .IP "\f(CW$svn_error_t\fR\->\fIline()\fR" 4 +.IX Item "$svn_error_t->line()" +Source line where the error originated. +.IP "SVN::Error::strerror($apr_status_t)" 4 +.IX Item "SVN::Error::strerror($apr_status_t)" +Returns the english description of the status code. +.ie n .IP "$svn_error_t\->\fIstrerror()\fR" 4 +.el .IP "\f(CW$svn_error_t\fR\->\fIstrerror()\fR" 4 +.IX Item "$svn_error_t->strerror()" +Returns the english description of the apr_err status code set on the +\&\f(CW$svn_error_t\fR. This is short for: +SVN::Error::strerror($svn_error_t\->\fIapr_err()\fR); +.ie n .IP "SVN::Error::create($apr_err, $child, $message);" 4 +.el .IP "SVN::Error::create($apr_err, \f(CW$child\fR, \f(CW$message\fR);" 4 +.IX Item "SVN::Error::create($apr_err, $child, $message);" +Returns a new svn_error_t object with the error status specified in \f(CW$apr_err\fR, +the child as \f(CW$child\fR, and error message of \f(CW$message\fR. +.ie n .IP "SVN::Error::quick_wrap($child, $new_msg); or $child\->quick_wrap($new_msg);" 4 +.el .IP "SVN::Error::quick_wrap($child, \f(CW$new_msg\fR); or \f(CW$child\fR\->quick_wrap($new_msg);" 4 +.IX Item "SVN::Error::quick_wrap($child, $new_msg); or $child->quick_wrap($new_msg);" +A quick n' easy way to create a wrappered exception with your own message +before throwing it up the stack. +.Sp +\&\f(CW$child\fR is the svn_error_t object you want to wrap and \f(CW$new_msg\fR is the new error +string you want to set. +.ie n .IP "SVN::Error::compose($chain, $new_error); or $chain\->compose($new_error);" 4 +.el .IP "SVN::Error::compose($chain, \f(CW$new_error\fR); or \f(CW$chain\fR\->compose($new_error);" 4 +.IX Item "SVN::Error::compose($chain, $new_error); or $chain->compose($new_error);" +Add new_err to the end of \f(CW$chain\fR's chain of errors. +.Sp +The \f(CW$new_err\fR chain will be copied into \f(CW$chain\fR's pool and destroyed, so \f(CW$new_err\fR +itself becomes invalid after this function. +.ie n .IP "SVN::Error::clear($svn_error_t); or $svn_error_t\->\fIclear()\fR;" 4 +.el .IP "SVN::Error::clear($svn_error_t); or \f(CW$svn_error_t\fR\->\fIclear()\fR;" 4 +.IX Item "SVN::Error::clear($svn_error_t); or $svn_error_t->clear();" +Free the memory used by \f(CW$svn_error_t\fR, as well as all ancestors and descendants +of \f(CW$svn_error_t\fR. +.Sp +You must call this on every svn_error_t object you get or you will leak memory. +.ie n .IP "SVN::Error::expanded_message($svn_error_t) or $svn_error_t\->\fIexpanded_message()\fR" 4 +.el .IP "SVN::Error::expanded_message($svn_error_t) or \f(CW$svn_error_t\fR\->\fIexpanded_message()\fR" 4 +.IX Item "SVN::Error::expanded_message($svn_error_t) or $svn_error_t->expanded_message()" +Returns the error message by tracing through the svn_error_t object and its +children and concatenating the error messages. This is how the internal +exception handlers get their error messages. +.IP "SVN::Error::is_error($value)" 4 +.IX Item "SVN::Error::is_error($value)" +Returns true if value is of type svn_error. Returns false if value is +anything else or undefined. This is useful for seeing if a call has returned +an error. +.IP "SVN::Error::croak_on_error" 4 +.IX Item "SVN::Error::croak_on_error" +Default error handler. It takes an svn_error_t and extracts the error messages +from it and croaks with those messages. +.Sp +It can be used in two ways. The first is detailed above as setting it as the +automatic exception handler via setting \f(CW$SVN::Error::handler\fR. +.Sp +The second is if you have \f(CW$SVN::Error::handler\fR set to undef as a wrapper for +calls you want to croak on when there is an error, but you don't want to write +an explicit error handler. For example: +.Sp +my \f(CW$result_rev\fR=SVN::Error::croak_on_error($ctx\->checkout($url,$path,'\s-1HEAD\s0',1)); +.Sp +If there is no error then croak_on_error will return the arguments passed to it +unchanged. +.IP "SVN::Error::confess_on_error" 4 +.IX Item "SVN::Error::confess_on_error" +The same as croak_on_error except it will give a more detailed stack backtrace, +including internal calls within the implementation of the perl bindings. +This is useful when you are doing development work on the bindings themselves. +.IP "SVN::Error::ignore_error" 4 +.IX Item "SVN::Error::ignore_error" +This is useful for wrapping around calls which you wish to ignore any potential +error. It checks to see if the first parameter is an error and if it is it +clears it. It then returns all the other parameters. +.SS "svn_log_changed_path_t" +.IX Subsection "svn_log_changed_path_t" +.ie n .IP "$lcp\->\fIaction()\fR" 4 +.el .IP "\f(CW$lcp\fR\->\fIaction()\fR" 4 +.IX Item "$lcp->action()" +\&'A'dd, 'D'elete, 'R'eplace, 'M'odify +.ie n .IP "$lcp\->\fIcopyfrom_path()\fR" 4 +.el .IP "\f(CW$lcp\fR\->\fIcopyfrom_path()\fR" 4 +.IX Item "$lcp->copyfrom_path()" +Source path of copy, or \f(CW\*(C`undef\*(C'\fR if there isn't any previous revision +history. +.ie n .IP "$lcp\->\fIcopyfrom_rev()\fR" 4 +.el .IP "\f(CW$lcp\fR\->\fIcopyfrom_rev()\fR" 4 +.IX Item "$lcp->copyfrom_rev()" +Source revision of copy, or \f(CW$SVN::Core::INVALID_REVNUM\fR if there is +no previous history. +.SS "svn_node_kind_t \- SVN::Node" +.IX Subsection "svn_node_kind_t - SVN::Node" +An enum of the following constants: +.PP +\&\f(CW$SVN::Node::none\fR, \f(CW$SVN::Node::file\fR, +\&\f(CW$SVN::Node::dir\fR, \f(CW$SVN::Node::unknown\fR. +.SS "svn_opt_revision_t" +.IX Subsection "svn_opt_revision_t" +.SS "svn_config_t" +.IX Subsection "svn_config_t" +Opaque object describing a set of configuration options. +.SS "svn_dirent_t" +.IX Subsection "svn_dirent_t" +.ie n .IP "$dirent\->\fIkind()\fR" 4 +.el .IP "\f(CW$dirent\fR\->\fIkind()\fR" 4 +.IX Item "$dirent->kind()" +Node kind. A number which matches one of these constants: +\&\f(CW$SVN::Node::none\fR, \f(CW$SVN::Node::file\fR, +\&\f(CW$SVN::Node::dir\fR, \f(CW$SVN::Node::unknown\fR. +.ie n .IP "$dirent\->\fIsize()\fR" 4 +.el .IP "\f(CW$dirent\fR\->\fIsize()\fR" 4 +.IX Item "$dirent->size()" +Length of file text, or 0 for directories. +.ie n .IP "$dirent\->\fIhas_props()\fR" 4 +.el .IP "\f(CW$dirent\fR\->\fIhas_props()\fR" 4 +.IX Item "$dirent->has_props()" +Does the node have properties? +.ie n .IP "$dirent\->\fIcreated_rev()\fR" 4 +.el .IP "\f(CW$dirent\fR\->\fIcreated_rev()\fR" 4 +.IX Item "$dirent->created_rev()" +Last revision in which this node changed. +.ie n .IP "$dirent\->\fItime()\fR" 4 +.el .IP "\f(CW$dirent\fR\->\fItime()\fR" 4 +.IX Item "$dirent->time()" +Time of created_rev (mod-time). +.ie n .IP "$dirent\->\fIlast_author()\fR" 4 +.el .IP "\f(CW$dirent\fR\->\fIlast_author()\fR" 4 +.IX Item "$dirent->last_author()" +Author of created rev. +.SS "svn_auth_cred_simple_t" +.IX Subsection "svn_auth_cred_simple_t" +.ie n .IP "$simple\->\fIusername()\fR" 4 +.el .IP "\f(CW$simple\fR\->\fIusername()\fR" 4 +.IX Item "$simple->username()" +Username. +.ie n .IP "$simple\->\fIpassword()\fR" 4 +.el .IP "\f(CW$simple\fR\->\fIpassword()\fR" 4 +.IX Item "$simple->password()" +Password. +.ie n .IP "$simple\->\fImay_save()\fR" 4 +.el .IP "\f(CW$simple\fR\->\fImay_save()\fR" 4 +.IX Item "$simple->may_save()" +Indicates if the credentials may be saved (to disk). +.SS "svn_auth_cred_username_t" +.IX Subsection "svn_auth_cred_username_t" +.ie n .IP "$username\->\fIusername()\fR" 4 +.el .IP "\f(CW$username\fR\->\fIusername()\fR" 4 +.IX Item "$username->username()" +Username. +.ie n .IP "$username\->\fImay_save()\fR" 4 +.el .IP "\f(CW$username\fR\->\fImay_save()\fR" 4 +.IX Item "$username->may_save()" +Indicates if the credentials may be saved (to disk). +.SS "svn_auth_cred_ssl_server_trust_t" +.IX Subsection "svn_auth_cred_ssl_server_trust_t" +.ie n .IP "$strust\->\fImay_save()\fR" 4 +.el .IP "\f(CW$strust\fR\->\fImay_save()\fR" 4 +.IX Item "$strust->may_save()" +Indicates if the credentials may be saved (to disk). +.ie n .IP "$strust\->\fIaccepted_failures()\fR" 4 +.el .IP "\f(CW$strust\fR\->\fIaccepted_failures()\fR" 4 +.IX Item "$strust->accepted_failures()" +Bit mask of the accepted failures. +.SS "svn_auth_ssl_server_cert_info_t" +.IX Subsection "svn_auth_ssl_server_cert_info_t" +.ie n .IP "$scert\->\fIhostname()\fR" 4 +.el .IP "\f(CW$scert\fR\->\fIhostname()\fR" 4 +.IX Item "$scert->hostname()" +Primary \s-1CN\s0. +.ie n .IP "$scert\->\fIfingerprint()\fR" 4 +.el .IP "\f(CW$scert\fR\->\fIfingerprint()\fR" 4 +.IX Item "$scert->fingerprint()" +\&\s-1ASCII\s0 fingerprint. +.ie n .IP "$scert\->\fIvalid_from()\fR" 4 +.el .IP "\f(CW$scert\fR\->\fIvalid_from()\fR" 4 +.IX Item "$scert->valid_from()" +\&\s-1ASCII\s0 date from which the certificate is valid. +.ie n .IP "$scert\->\fIvalid_until()\fR" 4 +.el .IP "\f(CW$scert\fR\->\fIvalid_until()\fR" 4 +.IX Item "$scert->valid_until()" +\&\s-1ASCII\s0 date until which the certificate is valid. +.ie n .IP "$scert\->\fIissuer_dname()\fR" 4 +.el .IP "\f(CW$scert\fR\->\fIissuer_dname()\fR" 4 +.IX Item "$scert->issuer_dname()" +\&\s-1DN\s0 of the certificate issuer. +.ie n .IP "$scert\->\fIascii_cert()\fR" 4 +.el .IP "\f(CW$scert\fR\->\fIascii_cert()\fR" 4 +.IX Item "$scert->ascii_cert()" +Base\-64 encoded \s-1DER\s0 certificate representation. +.SS "svn_auth_cred_ssl_client_cert_t" +.IX Subsection "svn_auth_cred_ssl_client_cert_t" +.ie n .IP "$ccert\->\fIcert_file()\fR" 4 +.el .IP "\f(CW$ccert\fR\->\fIcert_file()\fR" 4 +.IX Item "$ccert->cert_file()" +Full paths to the certificate file. +.ie n .IP "$ccert\->\fImay_save()\fR" 4 +.el .IP "\f(CW$ccert\fR\->\fImay_save()\fR" 4 +.IX Item "$ccert->may_save()" +Indicates if the credentials may be saved (to disk). +.SS "svn_auth_cred_ssl_client_cert_pw_t" +.IX Subsection "svn_auth_cred_ssl_client_cert_pw_t" +.ie n .IP "$ccertpw\->\fIpassword()\fR" 4 +.el .IP "\f(CW$ccertpw\fR\->\fIpassword()\fR" 4 +.IX Item "$ccertpw->password()" +Certificate password. +.ie n .IP "$ccertpw\->\fImay_save()\fR" 4 +.el .IP "\f(CW$ccertpw\fR\->\fImay_save()\fR" 4 +.IX Item "$ccertpw->may_save()" +Indicates if the credentials may be saved (to disk). +.SH "CONSTANTS" +.IX Header "CONSTANTS" +.SS "SVN::Auth::SSL" +.IX Subsection "SVN::Auth::SSL" +.ie n .IP "$SVN::Auth::SSL::NOTYETVALID" 4 +.el .IP "\f(CW$SVN::Auth::SSL::NOTYETVALID\fR" 4 +.IX Item "$SVN::Auth::SSL::NOTYETVALID" +Certificate is not yet valid. +.ie n .IP "$SVN::Auth::SSL::EXPIRED" 4 +.el .IP "\f(CW$SVN::Auth::SSL::EXPIRED\fR" 4 +.IX Item "$SVN::Auth::SSL::EXPIRED" +Certificate has expired. +.ie n .IP "$SVN::Auth::SSL::CNMISMATCH" 4 +.el .IP "\f(CW$SVN::Auth::SSL::CNMISMATCH\fR" 4 +.IX Item "$SVN::Auth::SSL::CNMISMATCH" +Certificate's \s-1CN\s0 (hostname) does not match the remote hostname. +.ie n .IP "$SVN::Auth::SSL::UNKNOWNCA" 4 +.el .IP "\f(CW$SVN::Auth::SSL::UNKNOWNCA\fR" 4 +.IX Item "$SVN::Auth::SSL::UNKNOWNCA" +Certificate authority is unknown (i.e. not trusted). +.ie n .IP "$SVN::Auth::SSL::OTHER" 4 +.el .IP "\f(CW$SVN::Auth::SSL::OTHER\fR" 4 +.IX Item "$SVN::Auth::SSL::OTHER" +Other failure. This can happen if neon has introduced a new failure bit that we +do not handle yet. +.SS "_p_svn_lock_t" +.IX Subsection "_p_svn_lock_t" +Objects of this class contain information about locks placed on files +in a repository. It has the following accessor methods: +.IP "path" 4 +.IX Item "path" +The full path to the file which is locked, starting with a forward slash (\f(CW\*(C`/\*(C'\fR). +.IP "token" 4 +.IX Item "token" +A string containing the lock token, which is a unique \s-1URI\s0. +.IP "owner" 4 +.IX Item "owner" +The username of whoever owns the lock. +.IP "comment" 4 +.IX Item "comment" +A comment associated with the lock, or undef if there isn't one. +.IP "is_dav_comment" 4 +.IX Item "is_dav_comment" +True if the comment was made by a generic \s-1DAV\s0 client. +.IP "creation_date" 4 +.IX Item "creation_date" +Time at which the lock was created, as the number of microseconds since +00:00:00 January\ 1, 1970 \s-1UTC\s0. Divide it by 1_000_000 to get a Unix +time_t value. +.IP "expiration_date" 4 +.IX Item "expiration_date" +When the lock will expire. Has the value '0' if the lock will never expire. +.SH "AUTHORS" +.IX Header "AUTHORS" +Chia-liang Kao +.SH "COPYRIGHT" +.IX Header "COPYRIGHT" +Copyright (c) 2003 CollabNet. All rights reserved. +.PP +This software is licensed as described in the file \s-1COPYING\s0, which you +should have received as part of this distribution. The terms are also +available at http://subversion.tigris.org/license\-1.html. If newer +versions of this license are posted there, you may use a newer version +instead, at your option. +.PP +This software consists of voluntary contributions made by many +individuals. For exact contribution history, see the revision history +and logs, available at http://subversion.tigris.org/. diff --git a/extra/subversion/pkgnone/SVN::Delta.0 b/extra/subversion/pkgnone/SVN::Delta.0 new file mode 100644 index 000000000..da6a05d97 --- /dev/null +++ b/extra/subversion/pkgnone/SVN::Delta.0 @@ -0,0 +1,224 @@ +.\" Automatically generated by Pod::Man 2.22 (Pod::Simple 3.07) +.\" +.\" 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 "native::Delta 3" +.TH native::Delta 3 "2005-10-24" "perl v5.10.1" "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::Delta \- Subversion delta functions +.SH "SYNOPSIS" +.IX Header "SYNOPSIS" +.Vb 3 +\& require SVN::Core; +\& require SVN::Repos; +\& require SVN::Delta; +\& +\& # driving an editor +\& my $editor = SVN::Delta::Editor\-> +\& new(SVN::Repos::get_commit_editor($repos, "file://$repospath", +\& \*(Aq/\*(Aq, \*(Aqroot\*(Aq, \*(AqFOO\*(Aq, \e&committed)); +\& +\& my $rootbaton = $editor\->open_root(0); +\& +\& my $fbaton = $editor\->add_file (\*(Aqfilea\*(Aq, $rootbaton, +\& undef, \-1); +\& +\& my $ret = $editor\->apply_textdelta ($fbaton, undef); +\& SVN::TxDelta::send_string("FILEA CONTENT", @$ret); +\& +\& # implement an editor in perl +\& SVN::Repos::dir_delta($root1, $path, undef, +\& $root2, $path, +\& SVN::Delta::Editor\->new(_debug=>1), +\& 1, 1, 0, 1 +.Ve +.SH "DESCRIPTION" +.IX Header "DESCRIPTION" +SVN::Delta wraps delta related function in subversion. The most +important one is SVN::Delta::Editor, the interface for describing tree +deltas. by default SVN::Delta::Editor relays method calls to its +internal member \f(CW\*(C`_editor\*(C'\fR, which could either be an editor in C (such +as the one you get from get_commit_editor), or another +SVN::Delta::Editor object. +.SH "SVN::Delta::Editor" +.IX Header "SVN::Delta::Editor" +.SS "Driving Editors" +.IX Subsection "Driving Editors" +If you want to drive a native editor (such as commit_editor obtained +by SVN::Repos::get_commit_editor), create a SVN::Delta::Editor object +with the native editor/baton pair. The object will then be ready to +use and its method calls will be relayed to the native editor. +.SS "Implementing Editors" +.IX Subsection "Implementing Editors" +If you want to implement an editor, subclass SVN::Delta::Editor and +implement the editors callbacks. see the \s-1METHODS\s0 section below. +.SS "\s-1CONSTRUCTOR\s0 \- new (...)" +.IX Subsection "CONSTRUCTOR - new (...)" +.ie n .IP "new ($editor, $editor_baton)" 4 +.el .IP "new ($editor, \f(CW$editor_baton\fR)" 4 +.IX Item "new ($editor, $editor_baton)" +Link to the native editor +.PP +You can also pass a hash array to new: +.IP "_debug" 4 +.IX Item "_debug" +Turn on debug. +.IP "_editor" 4 +.IX Item "_editor" +An arrayref of the editor/baton pair or another SVN::Delta::Editor +object to link with. +.SS "\s-1METHODS\s0" +.IX Subsection "METHODS" +Please consult the svn_delta.h section in the Subversion \s-1API\s0. Member +functions of svn_delta_editor_t could be called as methods of +SVN::Delta::Editor objects, with the edit_baton omitted. The pool is +also optional. +.PP +If you are subclassing, the methods take exactly the same arguments as +the member functions (note that void ** are returned data though as +throughout the perl bindings), with the edit_baton omitted. +.SH "BUGS" +.IX Header "BUGS" +Functions returning editor/baton pair should really be typemapped to a +SVN::Delta::Editor object. +.SH "AUTHORS" +.IX Header "AUTHORS" +Chia-liang Kao +.SH "COPYRIGHT" +.IX Header "COPYRIGHT" +Copyright (c) 2003 CollabNet. All rights reserved. +.PP +This software is licensed as described in the file \s-1COPYING\s0, which you +should have received as part of this distribution. The terms are also +available at http://subversion.tigris.org/license\-1.html. If newer +versions of this license are posted there, you may use a newer version +instead, at your option. +.PP +This software consists of voluntary contributions made by many +individuals. For exact contribution history, see the revision history +and logs, available at http://subversion.tigris.org/. diff --git a/extra/subversion/pkgnone/SVN::Fs.0 b/extra/subversion/pkgnone/SVN::Fs.0 new file mode 100644 index 000000000..804106c2f --- /dev/null +++ b/extra/subversion/pkgnone/SVN::Fs.0 @@ -0,0 +1,567 @@ +.\" Automatically generated by Pod::Man 2.22 (Pod::Simple 3.07) +.\" +.\" 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 "native::Fs 3" +.TH native::Fs 3 "2006-09-13" "perl v5.10.1" "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::Fs \- Subversion filesystem functions +.SH "DESCRIPTION" +.IX Header "DESCRIPTION" +SVN::Fs wraps the functions in svn_fs.h. The actual namespace +for filesystem objects is \f(CW\*(C`_p_svn_fs_t\*(C'\fR. +.SH "FUNCTIONS" +.IX Header "FUNCTIONS" +.ie n .IP "SVN::Fs::berkeley_logfiles($path, $only_unused)" 4 +.el .IP "SVN::Fs::berkeley_logfiles($path, \f(CW$only_unused\fR)" 4 +.IX Item "SVN::Fs::berkeley_logfiles($path, $only_unused)" +.PD 0 +.IP "SVN::Fs::berkeley_recover($path)" 4 +.IX Item "SVN::Fs::berkeley_recover($path)" +.ie n .IP "SVN::Fs::check_related($id1, $id2)" 4 +.el .IP "SVN::Fs::check_related($id1, \f(CW$id2\fR)" 4 +.IX Item "SVN::Fs::check_related($id1, $id2)" +.ie n .IP "SVN::Fs::compare_ids($id1, $id2)" 4 +.el .IP "SVN::Fs::compare_ids($id1, \f(CW$id2\fR)" 4 +.IX Item "SVN::Fs::compare_ids($id1, $id2)" +.ie n .IP "SVN::Fs::contents_changed($root1, $path1, $root2, $path2)" 4 +.el .IP "SVN::Fs::contents_changed($root1, \f(CW$path1\fR, \f(CW$root2\fR, \f(CW$path2\fR)" 4 +.IX Item "SVN::Fs::contents_changed($root1, $path1, $root2, $path2)" +.ie n .IP "SVN::Fs::create($path, $config)" 4 +.el .IP "SVN::Fs::create($path, \f(CW$config\fR)" 4 +.IX Item "SVN::Fs::create($path, $config)" +.IP "SVN::Fs::delete_fs($path)" 4 +.IX Item "SVN::Fs::delete_fs($path)" +.ie n .IP "SVN::Fs::deltify_revision($fs, $rev)" 4 +.el .IP "SVN::Fs::deltify_revision($fs, \f(CW$rev\fR)" 4 +.IX Item "SVN::Fs::deltify_revision($fs, $rev)" +.ie n .IP "SVN::Fs::get_file_delta_stream($source_root, $source_path, $target_root, $target_path)" 4 +.el .IP "SVN::Fs::get_file_delta_stream($source_root, \f(CW$source_path\fR, \f(CW$target_root\fR, \f(CW$target_path\fR)" 4 +.IX Item "SVN::Fs::get_file_delta_stream($source_root, $source_path, $target_root, $target_path)" +.ie n .IP "SVN::Fs::hotcopy($src_path, $dest_path, $clean)" 4 +.el .IP "SVN::Fs::hotcopy($src_path, \f(CW$dest_path\fR, \f(CW$clean\fR)" 4 +.IX Item "SVN::Fs::hotcopy($src_path, $dest_path, $clean)" +.IP "SVN::Fs::initialize($pool)" 4 +.IX Item "SVN::Fs::initialize($pool)" +.ie n .IP "SVN::Fs::merge($source_root, $source_path, $target_root, $target_path, $ancestor_root, $ancestor_path)" 4 +.el .IP "SVN::Fs::merge($source_root, \f(CW$source_path\fR, \f(CW$target_root\fR, \f(CW$target_path\fR, \f(CW$ancestor_root\fR, \f(CW$ancestor_path\fR)" 4 +.IX Item "SVN::Fs::merge($source_root, $source_path, $target_root, $target_path, $ancestor_root, $ancestor_path)" +.ie n .IP "SVN::Fs::open($path, $config)" 4 +.el .IP "SVN::Fs::open($path, \f(CW$config\fR)" 4 +.IX Item "SVN::Fs::open($path, $config)" +.IP "SVN::Fs::path($fs)" 4 +.IX Item "SVN::Fs::path($fs)" +.IP "SVN::Fs::print_modules($s)" 4 +.IX Item "SVN::Fs::print_modules($s)" +.PD +\&\s-1TODO\s0 \- doesn't work, segfaults if \f(CW$s\fR is null, doesn't do anything if +its an empty string +.ie n .IP "SVN::Fs::props_changed($root1, $path1, $root2, $path2)" 4 +.el .IP "SVN::Fs::props_changed($root1, \f(CW$path1\fR, \f(CW$root2\fR, \f(CW$path2\fR)" 4 +.IX Item "SVN::Fs::props_changed($root1, $path1, $root2, $path2)" +See also \f(CW\*(C`SVN::Fs::contents_changed\*(C'\fR +.ie n .IP "SVN::Fs::purge_txn($fs, $txn_id)" 4 +.el .IP "SVN::Fs::purge_txn($fs, \f(CW$txn_id\fR)" 4 +.IX Item "SVN::Fs::purge_txn($fs, $txn_id)" +Cleanup the transaction \f(CW$txn_id\fR, removing it completely from +the filesystem \f(CW$fs\fR. +.ie n .IP "SVN::Fs::set_warning_func($fs, $code, $baton)" 4 +.el .IP "SVN::Fs::set_warning_func($fs, \f(CW$code\fR, \f(CW$baton\fR)" 4 +.IX Item "SVN::Fs::set_warning_func($fs, $code, $baton)" +.PD 0 +.IP "SVN::Fs::unparse_id($id)" 4 +.IX Item "SVN::Fs::unparse_id($id)" +.PD +Return a string containing the unparsed form of the node or node +revision id \f(CW$id\fR, which must be a \f(CW\*(C`_p_svn_fs_id_t\*(C'\fR object. +.Sp +\&\s-1TODO\s0 \- why isn't this a method of that object? +.IP "\fISVN::Fs::version()\fR" 4 +.IX Item "SVN::Fs::version()" +\&\s-1TODO\s0 \- what can we do with the _p_svn_version_t value returned? +.IP "SVN::Fs::create_access($username)" 4 +.IX Item "SVN::Fs::create_access($username)" +Return a new \f(CW\*(C`_p_svn_fs_access_t\*(C'\fR object representing \f(CW$username\fR. +\&\f(CW$username\fR is presumed to have been authenticated by the caller. +.SH "_p_svn_fs_t" +.IX Header "_p_svn_fs_t" +.ie n .IP "$fs\->begin_txn($rev)" 4 +.el .IP "\f(CW$fs\fR\->begin_txn($rev)" 4 +.IX Item "$fs->begin_txn($rev)" +Creates a new transaction in the repository, and returns a +\&\f(CW\*(C`_p_svn_fs_txn_t\*(C'\fR object representing it. The new transaction's +base revision will be \f(CW$rev\fR, which should be a number. +.ie n .IP "$fs\->change_rev_prop" 4 +.el .IP "\f(CW$fs\fR\->change_rev_prop" 4 +.IX Item "$fs->change_rev_prop" +.PD 0 +.ie n .IP "$fs\->\fIgenerate_lock_token()\fR" 4 +.el .IP "\f(CW$fs\fR\->\fIgenerate_lock_token()\fR" 4 +.IX Item "$fs->generate_lock_token()" +.PD +Generate a unique lock-token using \f(CW$fs\fR. +.Sp +\&\s-1TODO\s0 \- translate this to apply to Perl: +This can be used in to populate lock\->token before calling +\&\fIsvn_fs_attach_lock()\fR. +.ie n .IP "$fs\->\fIget_access()\fR" 4 +.el .IP "\f(CW$fs\fR\->\fIget_access()\fR" 4 +.IX Item "$fs->get_access()" +The filesystem's current access context, as a \f(CW\*(C`_p_svn_fs_access_t\*(C'\fR +object. Returns undef if no access context has been set with +the \f(CW\*(C`set_access()\*(C'\fR method. +.ie n .IP "$fs\->get_lock" 4 +.el .IP "\f(CW$fs\fR\->get_lock" 4 +.IX Item "$fs->get_lock" +.PD 0 +.ie n .IP "$fs\->get_locks" 4 +.el .IP "\f(CW$fs\fR\->get_locks" 4 +.IX Item "$fs->get_locks" +.ie n .IP "$fs\->\fIget_uuid()\fR" 4 +.el .IP "\f(CW$fs\fR\->\fIget_uuid()\fR" 4 +.IX Item "$fs->get_uuid()" +.PD +The \s-1UUID\s0 associated with \f(CW$fs\fR. +.ie n .IP "$fs\->\fIlist_transactions()\fR" 4 +.el .IP "\f(CW$fs\fR\->\fIlist_transactions()\fR" 4 +.IX Item "$fs->list_transactions()" +A reference to an array of all currently active transactions in the +filesystem. Each one is a string containing the transaction's \s-1ID\s0, +suitable for passing to \f(CW\*(C`$fs\->open_txn()\*(C'\fR. +.ie n .IP "$fs\->lock" 4 +.el .IP "\f(CW$fs\fR\->lock" 4 +.IX Item "$fs->lock" +.PD 0 +.ie n .IP "$fs\->open_txn($name)" 4 +.el .IP "\f(CW$fs\fR\->open_txn($name)" 4 +.IX Item "$fs->open_txn($name)" +.PD +Get a transaction in the repository by name. Returns a +\&\f(CW\*(C`_p_svn_fs_txn_t\*(C'\fR object. +.ie n .IP "$fs\->revision_prop($rev, $propname)" 4 +.el .IP "\f(CW$fs\fR\->revision_prop($rev, \f(CW$propname\fR)" 4 +.IX Item "$fs->revision_prop($rev, $propname)" +The value of revision property \f(CW$propname\fR in revision \f(CW$rev\fR. +.ie n .IP "$fs\->revision_proplist($rev)" 4 +.el .IP "\f(CW$fs\fR\->revision_proplist($rev)" 4 +.IX Item "$fs->revision_proplist($rev)" +A hashref containing the names and values of all revision properties +from revision \f(CW$rev\fR. +.ie n .IP "$fs\->revision_root" 4 +.el .IP "\f(CW$fs\fR\->revision_root" 4 +.IX Item "$fs->revision_root" +.PD 0 +.ie n .IP "$fs\->set_access($access)" 4 +.el .IP "\f(CW$fs\fR\->set_access($access)" 4 +.IX Item "$fs->set_access($access)" +.PD +Associate an access context with an open filesystem. +.Sp +This method can be run multiple times on the same open +filesystem, in order to change the filesystem access context for +different filesystem operations. \f(CW$access\fR should be +a \f(CW\*(C`_p_svn_fs_access_t\*(C'\fR object, or undef to disassociate the +current access context from the filesystem. +.ie n .IP "$fs\->set_uuid($uuid)" 4 +.el .IP "\f(CW$fs\fR\->set_uuid($uuid)" 4 +.IX Item "$fs->set_uuid($uuid)" +Associate \f(CW$uuid\fR with \f(CW$fs\fR. +.ie n .IP "$fs\->unlock" 4 +.el .IP "\f(CW$fs\fR\->unlock" 4 +.IX Item "$fs->unlock" +.PD 0 +.ie n .IP "$fs\->\fIyoungest_rev()\fR" 4 +.el .IP "\f(CW$fs\fR\->\fIyoungest_rev()\fR" 4 +.IX Item "$fs->youngest_rev()" +.PD +Return the number of the youngest revision in the filesystem. +The oldest revision in any filesystem is numbered zero. +.SH "_p_svn_fs_root_t" +.IX Header "_p_svn_fs_root_t" +.ie n .IP "$root\->apply_text" 4 +.el .IP "\f(CW$root\fR\->apply_text" 4 +.IX Item "$root->apply_text" +.PD 0 +.ie n .IP "$root\->apply_textdelta" 4 +.el .IP "\f(CW$root\fR\->apply_textdelta" 4 +.IX Item "$root->apply_textdelta" +.ie n .IP "$root\->change_node_prop($path, $propname, $value)" 4 +.el .IP "\f(CW$root\fR\->change_node_prop($path, \f(CW$propname\fR, \f(CW$value\fR)" 4 +.IX Item "$root->change_node_prop($path, $propname, $value)" +.ie n .IP "$root\->check_path($path)" 4 +.el .IP "\f(CW$root\fR\->check_path($path)" 4 +.IX Item "$root->check_path($path)" +.PD +Kind of node at \f(CW$path\fR. A number which matches one of these constants: +\&\f(CW$SVN::Node::none\fR, \f(CW$SVN::Node::file\fR, +\&\f(CW$SVN::Node::dir\fR, \f(CW$SVN::Node::unknown\fR. +.ie n .IP "$root\->close_root" 4 +.el .IP "\f(CW$root\fR\->close_root" 4 +.IX Item "$root->close_root" +.PD 0 +.ie n .IP "$root\->closest_copy" 4 +.el .IP "\f(CW$root\fR\->closest_copy" 4 +.IX Item "$root->closest_copy" +.ie n .IP "$root\->copied_from" 4 +.el .IP "\f(CW$root\fR\->copied_from" 4 +.IX Item "$root->copied_from" +.ie n .IP "$root\->copy" 4 +.el .IP "\f(CW$root\fR\->copy" 4 +.IX Item "$root->copy" +.ie n .IP "$root\->delete" 4 +.el .IP "\f(CW$root\fR\->delete" 4 +.IX Item "$root->delete" +.ie n .IP "$root\->dir_entries" 4 +.el .IP "\f(CW$root\fR\->dir_entries" 4 +.IX Item "$root->dir_entries" +.ie n .IP "$root\->file_contents" 4 +.el .IP "\f(CW$root\fR\->file_contents" 4 +.IX Item "$root->file_contents" +.ie n .IP "$root\->file_length" 4 +.el .IP "\f(CW$root\fR\->file_length" 4 +.IX Item "$root->file_length" +.ie n .IP "$root\->file_md5_checksum" 4 +.el .IP "\f(CW$root\fR\->file_md5_checksum" 4 +.IX Item "$root->file_md5_checksum" +.ie n .IP "$root\->\fIfs()\fR" 4 +.el .IP "\f(CW$root\fR\->\fIfs()\fR" 4 +.IX Item "$root->fs()" +.PD +The filesystem to which \f(CW$root\fR belongs, as a \f(CW\*(C`_p_svn_fs_t\*(C'\fR object. +.ie n .IP "$root\->is_dir($path)" 4 +.el .IP "\f(CW$root\fR\->is_dir($path)" 4 +.IX Item "$root->is_dir($path)" +True if there is a node at \f(CW$path\fR which is a directory. +.ie n .IP "$root\->is_file($path)" 4 +.el .IP "\f(CW$root\fR\->is_file($path)" 4 +.IX Item "$root->is_file($path)" +True if there is a node at \f(CW$path\fR which is a file. +.ie n .IP "$root\->\fIis_revision_root()\fR" 4 +.el .IP "\f(CW$root\fR\->\fIis_revision_root()\fR" 4 +.IX Item "$root->is_revision_root()" +True if the root comes from a revision (i.e., the contents has already been +committed). +.ie n .IP "$root\->\fIis_txn_root()\fR" 4 +.el .IP "\f(CW$root\fR\->\fIis_txn_root()\fR" 4 +.IX Item "$root->is_txn_root()" +True if the root comes from a transaction. +.ie n .IP "$root\->make_dir" 4 +.el .IP "\f(CW$root\fR\->make_dir" 4 +.IX Item "$root->make_dir" +.PD 0 +.ie n .IP "$root\->make_file" 4 +.el .IP "\f(CW$root\fR\->make_file" 4 +.IX Item "$root->make_file" +.ie n .IP "$root\->node_created_path($path)" 4 +.el .IP "\f(CW$root\fR\->node_created_path($path)" 4 +.IX Item "$root->node_created_path($path)" +.ie n .IP "$root\->node_created_rev($path)" 4 +.el .IP "\f(CW$root\fR\->node_created_rev($path)" 4 +.IX Item "$root->node_created_rev($path)" +.ie n .IP "$root\->node_history($path)" 4 +.el .IP "\f(CW$root\fR\->node_history($path)" 4 +.IX Item "$root->node_history($path)" +.PD +\&\s-1TODO\s0 \- _p_svn_fs_history_t +.ie n .IP "$root\->node_id($path)" 4 +.el .IP "\f(CW$root\fR\->node_id($path)" 4 +.IX Item "$root->node_id($path)" +.PD 0 +.ie n .IP "$root\->node_prop($path, $propname)" 4 +.el .IP "\f(CW$root\fR\->node_prop($path, \f(CW$propname\fR)" 4 +.IX Item "$root->node_prop($path, $propname)" +.ie n .IP "$root\->node_proplist($path)" 4 +.el .IP "\f(CW$root\fR\->node_proplist($path)" 4 +.IX Item "$root->node_proplist($path)" +.ie n .IP "$root\->\fIpaths_changed()\fR" 4 +.el .IP "\f(CW$root\fR\->\fIpaths_changed()\fR" 4 +.IX Item "$root->paths_changed()" +.PD +A reference to a hash indicating what changes are made in the root. +The keys are the paths of the files changed, starting with \f(CW\*(C`/\*(C'\fR to +indicate the top-level directory of the repository. The values +are \f(CW\*(C`_p_svn_fs_path_change_t\*(C'\fR objects which contain information about +what kind of changes are made. +.ie n .IP "$root\->revision_link" 4 +.el .IP "\f(CW$root\fR\->revision_link" 4 +.IX Item "$root->revision_link" +.PD 0 +.ie n .IP "$root\->revision_root_revision" 4 +.el .IP "\f(CW$root\fR\->revision_root_revision" 4 +.IX Item "$root->revision_root_revision" +.PD +Revision number of the revision the root comes from. +For transaction roots, returns \f(CW$SVN::Core::INVALID_REVNUM\fR. +.SH "_p_svn_fs_history_t" +.IX Header "_p_svn_fs_history_t" +.ie n .IP "$history\->\fIlocation()\fR" 4 +.el .IP "\f(CW$history\fR\->\fIlocation()\fR" 4 +.IX Item "$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 +returns only the revision number. +.ie n .IP "$history\->prev($cross_copies)" 4 +.el .IP "\f(CW$history\fR\->prev($cross_copies)" 4 +.IX Item "$history->prev($cross_copies)" +.SH "_p_svn_fs_txn_t" +.IX Header "_p_svn_fs_txn_t" +.PD 0 +.ie n .IP "$txn\->\fIabort()\fR" 4 +.el .IP "\f(CW$txn\fR\->\fIabort()\fR" 4 +.IX Item "$txn->abort()" +.PD +Abort the transaction. Any changes made in \f(CW$txn\fR are discarded, and +the filesystem is left unchanged. +.Sp +Note: This function first sets the state of \f(CW$txn\fR to 'dead', and +then attempts to purge it and any related data from the filesystem. +If some part of the cleanup process fails, \f(CW$txn\fR and some portion +of its data may remain in the database after this function returns. +Use \f(CW\*(C`$fs\->purge_txn()\*(C'\fR to retry the transaction cleanup. +.ie n .IP "$txn\->\fIbase_revision()\fR" 4 +.el .IP "\f(CW$txn\fR\->\fIbase_revision()\fR" 4 +.IX Item "$txn->base_revision()" +The transaction's base revision number. +.ie n .IP "$txn\->change_prop($name, $value)" 4 +.el .IP "\f(CW$txn\fR\->change_prop($name, \f(CW$value\fR)" 4 +.IX Item "$txn->change_prop($name, $value)" +Add, change, or remove a property from the transaction. +If \f(CW$value\fR is \f(CW\*(C`undef\*(C'\fR then the property \f(CW$name\fR is removed, +if it exists. Otherwise the property \f(CW$name\fR is set to the +new value. +.ie n .IP "$txn\->commit" 4 +.el .IP "\f(CW$txn\fR\->commit" 4 +.IX Item "$txn->commit" +.PD 0 +.ie n .IP "$txn\->\fIname()\fR" 4 +.el .IP "\f(CW$txn\fR\->\fIname()\fR" 4 +.IX Item "$txn->name()" +.PD +Full name of the revision, in the same format as can be passed +to \f(CW\*(C`$fs\->open_txn()\*(C'\fR. +.ie n .IP "$txn\->prop($name)" 4 +.el .IP "\f(CW$txn\fR\->prop($name)" 4 +.IX Item "$txn->prop($name)" +The value of the transaction's \f(CW$name\fR property. +.ie n .IP "$txn\->\fIproplist()\fR" 4 +.el .IP "\f(CW$txn\fR\->\fIproplist()\fR" 4 +.IX Item "$txn->proplist()" +A reference to a hash containing all the transaction's properties, +keyed by name. +.ie n .IP "$txn\->\fIroot()\fR" 4 +.el .IP "\f(CW$txn\fR\->\fIroot()\fR" 4 +.IX Item "$txn->root()" +The root directory of the transaction, as a \f(CW\*(C`_p_svn_fs_root_t\*(C'\fR object. +.SH "_p_svn_fs_access_t" +.IX Header "_p_svn_fs_access_t" +.SS "\s-1SYNOPSIS\s0" +.IX Subsection "SYNOPSIS" +.Vb 1 +\& 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); +.Ve +.SS "\s-1METHODS\s0" +.IX Subsection "METHODS" +.ie n .IP "$access\->add_lock_token($token)" 4 +.el .IP "\f(CW$access\fR\->add_lock_token($token)" 4 +.IX Item "$access->add_lock_token($token)" +Push a lock-token into the access context. The +context remembers all tokens it receives, and makes them available +to fs functions. +.ie n .IP "$access\->get_username" 4 +.el .IP "\f(CW$access\fR\->get_username" 4 +.IX Item "$access->get_username" +The username represented by the access context. +.SH "svn_fs_dirent_t" +.IX Header "svn_fs_dirent_t" +An object representing a directory entry. Values of this type are returned +as the values in the hash returned by \f(CW\*(C`$root\->dir_entries()\*(C'\fR. They +are like svn_dirent_t objects, but have less +information. +.ie n .IP "$dirent\->\fIid()\fR" 4 +.el .IP "\f(CW$dirent\fR\->\fIid()\fR" 4 +.IX Item "$dirent->id()" +\&\s-1TODO\s0 +.ie n .IP "$dirent\->\fIkind()\fR" 4 +.el .IP "\f(CW$dirent\fR\->\fIkind()\fR" 4 +.IX Item "$dirent->kind()" +Node kind. A number which matches one of these constants: +\&\f(CW$SVN::Node::none\fR, \f(CW$SVN::Node::file\fR, +\&\f(CW$SVN::Node::dir\fR, \f(CW$SVN::Node::unknown\fR. +.ie n .IP "$dirent\->\fIname()\fR" 4 +.el .IP "\f(CW$dirent\fR\->\fIname()\fR" 4 +.IX Item "$dirent->name()" +The filename of the directory entry. +.SH "_p_svn_fs_path_change_t" +.IX Header "_p_svn_fs_path_change_t" +.ie n .IP "$change\->\fIchange_kind()\fR" 4 +.el .IP "\f(CW$change\fR\->\fIchange_kind()\fR" 4 +.IX Item "$change->change_kind()" +The type of change made. A number which matches one of the following: +.RS 4 +.ie n .IP "$SVN::Fs::PathChange::modify" 4 +.el .IP "\f(CW$SVN::Fs::PathChange::modify\fR" 4 +.IX Item "$SVN::Fs::PathChange::modify" +Content at path modified. +.ie n .IP "$SVN::Fs::PathChange::add" 4 +.el .IP "\f(CW$SVN::Fs::PathChange::add\fR" 4 +.IX Item "$SVN::Fs::PathChange::add" +Path added in transaction. +.ie n .IP "$SVN::Fs::PathChange::delete" 4 +.el .IP "\f(CW$SVN::Fs::PathChange::delete\fR" 4 +.IX Item "$SVN::Fs::PathChange::delete" +Path removed in transaction. +.ie n .IP "$SVN::Fs::PathChange::replace" 4 +.el .IP "\f(CW$SVN::Fs::PathChange::replace\fR" 4 +.IX Item "$SVN::Fs::PathChange::replace" +Path removed and re-added in transaction. +.ie n .IP "$SVN::Fs::PathChange::reset" 4 +.el .IP "\f(CW$SVN::Fs::PathChange::reset\fR" 4 +.IX Item "$SVN::Fs::PathChange::reset" +Ignore all previous change items for path (internal-use only). +.RE +.RS 4 +.RE +.ie n .IP "$change\->\fInode_rev_id()\fR" 4 +.el .IP "\f(CW$change\fR\->\fInode_rev_id()\fR" 4 +.IX Item "$change->node_rev_id()" +Node revision id of changed path. A \f(CW\*(C`_p_svn_fs_id_t\*(C'\fR object. +.ie n .IP "$change\->\fIprop_mod()\fR" 4 +.el .IP "\f(CW$change\fR\->\fIprop_mod()\fR" 4 +.IX Item "$change->prop_mod()" +True if the properties were modified. +.ie n .IP "$change\->\fItext_mod()\fR" 4 +.el .IP "\f(CW$change\fR\->\fItext_mod()\fR" 4 +.IX Item "$change->text_mod()" +True if the text (content) was modified. diff --git a/extra/subversion/pkgnone/SVN::Ra.0 b/extra/subversion/pkgnone/SVN::Ra.0 new file mode 100644 index 000000000..50db9ec3d --- /dev/null +++ b/extra/subversion/pkgnone/SVN::Ra.0 @@ -0,0 +1,670 @@ +.\" Automatically generated by Pod::Man 2.22 (Pod::Simple 3.07) +.\" +.\" 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 "native::Ra 3" +.TH native::Ra 3 "2008-01-27" "perl v5.10.1" "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::Ra \- Subversion remote access functions +.SH "SYNOPSIS" +.IX Header "SYNOPSIS" +.Vb 2 +\& use SVN::Core; +\& use SVN::Ra; +\& +\& my $ra = SVN::Ra\->new(\*(Aqfile:///tmp/svntest\*(Aq); +\& print $ra\->get_latest_revnum; +.Ve +.SH "DESCRIPTION" +.IX Header "DESCRIPTION" +SVN::Ra wraps the object-oriented \f(CW\*(C`svn_ra_plugin_t\*(C'\fR functions, +providing access to a Subversion repository though a \s-1URL\s0, using +whichever repository access module is appropriate. +.SH "SVN::Ra" +.IX Header "SVN::Ra" +.SS "SVN::Ra\->new(...)" +.IX Subsection "SVN::Ra->new(...)" +The constructor creates an \s-1RA\s0 object and calls \f(CW\*(C`open\*(C'\fR for it. Its parameters +are either a hash of options or a single value containing the \s-1URL\s0 of the +repository. Valid options are: +.IP "url" 4 +.IX Item "url" +The \s-1URL\s0 of the repository. +.IP "auth" 4 +.IX Item "auth" +An \f(CW\*(C`auth_baton\*(C'\fR could be given to the \s-1SVN::RA\s0 object. Defaults to an +\&\f(CW\*(C`auth_provider\*(C'\fR with a \f(CW\*(C`username_provider\*(C'\fR. See SVN::Client for how to +create \f(CW\*(C`auth_baton\*(C'\fR. +.IP "pool" 4 +.IX Item "pool" +The pool for the \s-1RA\s0 session to use. Member functions will also be +called with this pool. Defaults to a newly created root pool. +.IP "config" 4 +.IX Item "config" +The config hash that could be obtained by calling +\&\f(CW\*(C`SVN::Core::config_get_config(undef)\*(C'\fR. +.IP "callback" 4 +.IX Item "callback" +The \f(CW\*(C`ra_callback\*(C'\fR namespace to use. Defaults to SVN::Ra::Callbacks. +.PP +The following examples will both do the same thing, with all the optional +arguments taking their defaults: +.PP +.Vb 2 +\& my $ra = SVN::Ra\->new(\*(Aqfile:///tmp/repos\*(Aq); +\& my $ra = SVN::Ra\->new(url => \*(Aqfile:///tmp/repos\*(Aq); +.Ve +.SS "\s-1METHODS\s0" +.IX Subsection "METHODS" +Please consult the svn_ra.h section in the Subversion \s-1API\s0. Member +functions of \f(CW\*(C`svn_ra_plugin_t\*(C'\fR can be called as methods of SVN::Ra +objects, with the \f(CW\*(C`session_baton\*(C'\fR and \f(CW\*(C`pool\*(C'\fR arguments omitted. +.ie n .IP "$ra\->change_rev_prop($revnum, $name, $value)" 4 +.el .IP "\f(CW$ra\fR\->change_rev_prop($revnum, \f(CW$name\fR, \f(CW$value\fR)" 4 +.IX Item "$ra->change_rev_prop($revnum, $name, $value)" +Sets the revision (unversioned) property \f(CW$name\fR to \f(CW$value\fR on +revision \f(CW$revnum\fR, or removes the property if \f(CW$value\fR is undef. +.Sp +.Vb 1 +\& $ra\->change_rev_prop(123, \*(Aqsvn:log\*(Aq, \*(AqNew log message.\*(Aq); +.Ve +.Sp +Of course this will only work if there is a \f(CW\*(C`pre\-revprop\-change\*(C'\fR +hook available. +.ie n .IP "$ra\->check_path($path, $revnum)" 4 +.el .IP "\f(CW$ra\fR\->check_path($path, \f(CW$revnum\fR)" 4 +.IX Item "$ra->check_path($path, $revnum)" +Kind of node at \f(CW$path\fR in revision \f(CW$revnum\fR. A number which matches one +of these constants: +\&\f(CW$SVN::Node::none\fR, \f(CW$SVN::Node::file\fR, +\&\f(CW$SVN::Node::dir\fR, \f(CW$SVN::Node::unknown\fR. +.ie n .IP "$ra\->do_diff($revision, $target, $recurse, $ignore_ancestry, $versus_url, $editor)" 4 +.el .IP "\f(CW$ra\fR\->do_diff($revision, \f(CW$target\fR, \f(CW$recurse\fR, \f(CW$ignore_ancestry\fR, \f(CW$versus_url\fR, \f(CW$editor\fR)" 4 +.IX Item "$ra->do_diff($revision, $target, $recurse, $ignore_ancestry, $versus_url, $editor)" +.PD 0 +.ie n .IP "$ra\->do_diff2($revision, $target, $recurse, $ignore_ancestry, $text_deltas, $versus_url, $editor)" 4 +.el .IP "\f(CW$ra\fR\->do_diff2($revision, \f(CW$target\fR, \f(CW$recurse\fR, \f(CW$ignore_ancestry\fR, \f(CW$text_deltas\fR, \f(CW$versus_url\fR, \f(CW$editor\fR)" 4 +.IX Item "$ra->do_diff2($revision, $target, $recurse, $ignore_ancestry, $text_deltas, $versus_url, $editor)" +.PD +Both of these return a SVN::Ra::Reporter with which you can describe +a working copy. It will then call methods on \f(CW$editor\fR to indicates +the differences between the repository and the working copy. +.Sp +The \f(CW\*(C`do_diff2\*(C'\fR method was added in Subversion\ 1.4. It adds the +\&\f(CW$text_deltas\fR option, which if false disables the generation of text +deltas on the editor. With \f(CW\*(C`do_diff\*(C'\fR text deltas are always generated. +.Sp +.Vb 4 +\& my $reporter = $ra\->do_diff(1, \*(Aq\*(Aq, 1, 0, $repos_url, +\& MyEditor\->new); +\& $reporter\->set_path(...); +\& $reporter\->finish_report; +.Ve +.ie n .IP "$ra\->do_status($target, $revision, $recurse, $editor)" 4 +.el .IP "\f(CW$ra\fR\->do_status($target, \f(CW$revision\fR, \f(CW$recurse\fR, \f(CW$editor\fR)" 4 +.IX Item "$ra->do_status($target, $revision, $recurse, $editor)" +Returns a SVN::Ra::Reporter to which you can describe the status of +a working copy. It will then call methods on \f(CW$editor\fR to describe +the current status of the working copy compared to the repository. +.ie n .IP "$ra\->do_switch($revnum, $target, $recurse, $repos_url, $editor)" 4 +.el .IP "\f(CW$ra\fR\->do_switch($revnum, \f(CW$target\fR, \f(CW$recurse\fR, \f(CW$repos_url\fR, \f(CW$editor\fR)" 4 +.IX Item "$ra->do_switch($revnum, $target, $recurse, $repos_url, $editor)" +Returns a SVN::Ra::Reporter with which you can describe a working copy. +It will then call methods on \f(CW$editor\fR to indicate how to adjust the working +copy to switch it to revision \f(CW$revnum\fR of \f(CW$repos_url\fR. +.ie n .IP "$ra\->do_update($revision_to_update_to, $target, $recurse, $editor)" 4 +.el .IP "\f(CW$ra\fR\->do_update($revision_to_update_to, \f(CW$target\fR, \f(CW$recurse\fR, \f(CW$editor\fR)" 4 +.IX Item "$ra->do_update($revision_to_update_to, $target, $recurse, $editor)" +Returns a SVN::Ra::Reporter object. Call methods on the reporter to +describe the current state of your working copy (or whatever you're +updating). After calling the reporter's \f(CW\*(C`finish_report()\*(C'\fR method, +Subversion will generate calls to your \f(CW$editor\fR to describe the +differences between what you already have and the state of the repository in +\&\f(CW$revision_to_update_to\fR. +.Sp +To update to the latest revision, pass \f(CW$SVN::Core::INVALID_REVNUM\fR for +the first argument. +.Sp +\&\f(CW$target\fR should be the path to the part of the repository you are +interested in. You won't be given information about changes outside this +path. If you want everything, pass an empty string. +.Sp +If \f(CW$recurse\fR is true and the target is a directory, update +recursively; otherwise, update just the target and its immediate +entries, but not its child directories (if any). +.Sp +All paths are relative to the \s-1URL\s0 used to open \f(CW$ra\fR. +.Sp +The caller may not perform any \s-1RA\s0 operations using \f(CW$ra\fR before +finishing the report, and may not perform any \s-1RA\s0 operations using +\&\f(CW$ra\fR from within the editing operations of \f(CW$editor\fR. +.Sp +This example shows the simplest update, where the client tells the reporter +that it has nothing to start with: +.Sp +.Vb 3 +\& my $reporter = $ra\->do_update($revnum, \*(Aq\*(Aq, 1, MyEditor\->new); +\& $reporter\->set_path(\*(Aq\*(Aq, 0, 1, undef); +\& $reporter\->finish_report; +.Ve +.ie n .IP "$ra\->get_commit_editor($logmsg, $callback, $callback_baton, $lock_tokens, $keep_locks)" 4 +.el .IP "\f(CW$ra\fR\->get_commit_editor($logmsg, \f(CW$callback\fR, \f(CW$callback_baton\fR, \f(CW$lock_tokens\fR, \f(CW$keep_locks\fR)" 4 +.IX Item "$ra->get_commit_editor($logmsg, $callback, $callback_baton, $lock_tokens, $keep_locks)" +.PD 0 +.ie n .IP "$ra\->get_commit_editor2($logmsg, $callback, $callback_baton, $lock_tokens, $keep_locks)" 4 +.el .IP "\f(CW$ra\fR\->get_commit_editor2($logmsg, \f(CW$callback\fR, \f(CW$callback_baton\fR, \f(CW$lock_tokens\fR, \f(CW$keep_locks\fR)" 4 +.IX Item "$ra->get_commit_editor2($logmsg, $callback, $callback_baton, $lock_tokens, $keep_locks)" +.PD +Return an opaque editor object for committing a new revision to the +repository. The return values should be passed to the +SVN::Delta::Editor constructor to create an +editor object you can actually use. For example: +.Sp +.Vb 4 +\& my $editor = SVN::Delta::Editor\->new( +\& $ra\->get_commit_editor( +\& "I\*(Aqm going to commit some changes from within my Perl code.", +\& \e&commit_callback, undef, {}, 0)); +.Ve +.Sp +Now that you've got your editor you can call methods on it to describe +changes in the tree you want to make, such as adding directories, changing +file contents, etc. See SVN::Delta for documentation of the editor +interface. +.Sp +The \f(CW$callback\fR function will be called during your call to the +\&\f(CW\*(C`$ed\->close_edit()\*(C'\fR method, after the commit has succeeded. It will +not be called if there were no changes to commit. If you don't need it, +pass undef instead of a code ref. +.Sp +\&\f(CW\*(C`get_commit_editor2\*(C'\fR is identical to \f(CW\*(C`get_commit_editor\*(C'\fR except for +the information passed to the callback function. The new version, added +in Subversion\ 1.4, will pass the callback a single value (\s-1TODO:\s0 I +can' test this, but it's probably an object or hash ref) which contains +all the information. It also includes the error message from the +post-commit hook script, which is not available with \f(CW\*(C`get_commit_editor\*(C'\fR. +.Sp +The callback for the original version will be passed three arguments: +.RS 4 +.IP "\(bu" 4 +Number of the new revision. +.IP "\(bu" 4 +Date and time that the revision was committed, which will be exactly +the same value as its \f(CW\*(C`svn:date\*(C'\fR revision property. It will be in +this format: \f(CW\*(C`2006\-04\-05T12:17:48.180320Z\*(C'\fR +.IP "\(bu" 4 +The name of the author who committed the revision, which will be the same +as the \f(CW\*(C`svn:author\*(C'\fR revision property. +.RE +.RS 4 +.Sp +The undef in the argument list in the example above is the baton which is +meant to be passed to the commit callback, but it isn't. This isn't a +problem since you can supply a closure as the callback so that it can get to +whatever variables you need. +.Sp +The \f(CW$logmsg\fR value should be a string which will be stored in the +\&\f(CW\*(C`svn:log\*(C'\fR revision property. If undef is passed instead then the +new revision won't have a \f(CW\*(C`svn:log\*(C'\fR property. +.Sp +\&\f(CW$lock_tokens\fR should be a reference to a hash mapping the paths to +lock tokens to use for them. I seems that with Subversion\ 1.2 this is +required, so if you aren't using any locks simply pass \f(CW\*(C`{}\*(C'\fR. In +Subversion\ 1.3.1 though it seems to be necessary to \fInot\fR pass this +argument at all. +.Sp +If \f(CW$keep_locks\fR is true then locks on the files committed won't be +released by the commit. +.Sp +The \f(CW\*(C`get_commit_editor()\*(C'\fR method itself returns a list of two items, the +first of which (a \f(CW\*(C`_p_svn_delta_editor_t\*(C'\fR object) is the actual editor. +The second is the editor baton. Neither is of any use without wrapping the +pair of them in a SVN::Delta::Editor. +.RE +.ie n .IP "$ra\->get_dated_revision($time)" 4 +.el .IP "\f(CW$ra\fR\->get_dated_revision($time)" 4 +.IX Item "$ra->get_dated_revision($time)" +\&\s-1TODO\s0 \- this doesn't seem to work in Subversion\ 1.3. +.ie n .IP "$ra\->get_dir($path, $revnum)" 4 +.el .IP "\f(CW$ra\fR\->get_dir($path, \f(CW$revnum\fR)" 4 +.IX Item "$ra->get_dir($path, $revnum)" +.PD 0 +.ie n .IP "$ra\->get_dir2($path, $revnum, $dirent_fields)" 4 +.el .IP "\f(CW$ra\fR\->get_dir2($path, \f(CW$revnum\fR, \f(CW$dirent_fields\fR)" 4 +.IX Item "$ra->get_dir2($path, $revnum, $dirent_fields)" +.PD +Fetch the directory entries and properties of the directory at \f(CW$path\fR +in revision \f(CW$revnum\fR +.Sp +A list of three values are returned. The first is a reference to a hash +of directory entries. The keys are the names of all the files and +directories in \f(CW$path\fR (not full paths, just the filenames). The values +are _p_svn_dirent_t objects, with all their +fields filled in. The third parameter to \f(CW\*(C`get_dir2\*(C'\fR allows you to +select particular fields. \s-1TODO:\s0 I don't think the constants you'd use +to construct the \f(CW$dirent_fields\fR value are provided in the Perl \s-1API\s0. +.Sp +The second value is a number, which is only valid if \f(CW$revnum\fR is +\&\f(CW$SVN::Core::INVALID_REVNUM\fR. If that is the case then the latest revision +will be fetched, and the revision number (the \s-1HEAD\s0 revision) will be returned +as the second value. Otherwise the revision number returned will be +completely arbitrary. +.Sp +The third value returned will be a reference to a hash of all properties +on the directory. This means \fIall\fR properties: not just ones controlled by +the user and stored in the repository fs, but non-tweakable ones +generated by the \s-1SCM\s0 system itself (e.g. 'wcprops', 'entryprops', etc). +.Sp +.Vb 3 +\& my ($dirents, undef, $props) = $ra\->get_dir(\*(Aq/trunk/dir\*(Aq, 123); +\& my ($dirents, $fetched_revnum, $props) = $ra\->get_dir( +\& \*(Aq/trunk/dir\*(Aq, $SVN::Core::INVALID_REVNUM); +.Ve +.ie n .IP "$ra\->get_file($path, $revnum, $fh)" 4 +.el .IP "\f(CW$ra\fR\->get_file($path, \f(CW$revnum\fR, \f(CW$fh\fR)" 4 +.IX Item "$ra->get_file($path, $revnum, $fh)" +Fetch the contents and properties of the file at \f(CW$path\fR in revision +\&\f(CW$revnum\fR. \f(CW$fh\fR should be a Perl filehandle, to which the contents +of the file will be written, or undef if you don't need the file contents. +.Sp +Note that \f(CW$path\fR cannot end in a slash unless it is just '/'. +.Sp +A list of two values are returned. The first is a number, which is only +valid if \f(CW$revnum\fR is \f(CW$SVN::Core::INVALID_REVNUM\fR. If that is the +case then the latest revision will be fetched, and the revision number +(the \s-1HEAD\s0 revision) will be returned as the first value. Otherwise the +number returned will be completely arbitrary. +.Sp +The second value returned will be a reference to a hash of all properties +on the file. This means \fIall\fR properties: not just ones controlled by +the user and stored in the repository fs, but non-tweakable ones +generated by the \s-1SCM\s0 system itself (e.g. 'wcprops', 'entryprops', etc). +.Sp +.Vb 2 +\& my (undef, $props) = $ra\->get_file( +\& \*(Aq/trunk/foo\*(Aq, 123, undef); +\& +\& open my $fh, \*(Aq>\*(Aq, \*(Aqtmp_out\*(Aq +\& or die "error opening file: $!"; +\& my (undef, $props) = $ra\->get_file( +\& \*(Aq/trunk/foo\*(Aq, 123, $fh); +\& +\& my ($fetched_revnum, $props) = $ra\->get_file( +\& \*(Aq/trunk/foo\*(Aq, $SVN::Core::INVALID_REVNUM, $fh); +.Ve +.ie n .IP "$ra\->get_file_revs($path, $start, $end, \e&callback)" 4 +.el .IP "\f(CW$ra\fR\->get_file_revs($path, \f(CW$start\fR, \f(CW$end\fR, \e&callback)" 4 +.IX Item "$ra->get_file_revs($path, $start, $end, &callback)" +\&\s-1TODO\s0 \- doesn't seem to work in Subversion 1.3 +.ie n .IP "$ra\->get_latest_revnum" 4 +.el .IP "\f(CW$ra\fR\->get_latest_revnum" 4 +.IX Item "$ra->get_latest_revnum" +Return the number of the latest revision in the repository (\s-1HEAD\s0). +.ie n .IP "$ra\->get_locations($path, $peg_revnum, \e@location_revisions)" 4 +.el .IP "\f(CW$ra\fR\->get_locations($path, \f(CW$peg_revnum\fR, \e@location_revisions)" 4 +.IX Item "$ra->get_locations($path, $peg_revnum, @location_revisions)" +\&\s-1TODO\s0 \- doesn't seem to work in Subversion 1.3 +.ie n .IP "$ra\->get_lock($path)" 4 +.el .IP "\f(CW$ra\fR\->get_lock($path)" 4 +.IX Item "$ra->get_lock($path)" +Returns a _p_svn_lock_t object containing +information about the lock at \f(CW$path\fR, or undef if that path isn't +currently locked. +.ie n .IP "$ra\->get_locks($path)" 4 +.el .IP "\f(CW$ra\fR\->get_locks($path)" 4 +.IX Item "$ra->get_locks($path)" +\&\s-1TODO\s0 \- doesn't seem to work in Subversion 1.3 +.ie n .IP "$ra\->get_log(\e@paths, $start, $end, $limit, $discover_changed_paths, $strict_node_history, \e&callback)" 4 +.el .IP "\f(CW$ra\fR\->get_log(\e@paths, \f(CW$start\fR, \f(CW$end\fR, \f(CW$limit\fR, \f(CW$discover_changed_paths\fR, \f(CW$strict_node_history\fR, \e&callback)" 4 +.IX Item "$ra->get_log(@paths, $start, $end, $limit, $discover_changed_paths, $strict_node_history, &callback)" +For \f(CW$limit\fR revisions from \f(CW$start\fR to \f(CW$end\fR, invoke the receiver +\&\f(CW\*(C`callback()\*(C'\fR with information about the changes made in the revision +(log message, time, etc.). +.Sp +The caller may not invoke any \s-1RA\s0 operations using \f(CW$ra\fR from +within the callback function. They may work in some situations, but +it's not guaranteed. +.Sp +The first argument can be either a single string or a reference to an +array of strings. Each of these indicates a path in the repository +which you are interested in. Revisions which don't change any of these +paths (or files below them) will be ignored. Simply pass '' if you don't +want to limit by path. +.Sp +\&\f(CW$start\fR and \f(CW$end\fR should be revision numbers. If \f(CW$start\fR has a lower +value than \f(CW$end\fR then the revisions will be produced in ascending order +(r1, r2, ...), otherwise in descending order. If \f(CW$start\fR is +\&\f(CW$SVN::Core::INVALID_REVNUM\fR then it defaults to the latest revision. +.Sp +\&\s-1TODO\s0 \- the previous sentence should also be true of \f(CW$end\fR, but doing that +gets an error message in Subversion 1.3. +.Sp +\&\f(CW$limit\fR is a number indicating the maximum number of times that the +receiver \f(CW\*(C`callback()\*(C'\fR should be called. If it is 0, there will be no +limit. +.Sp +If \f(CW$discover_changed_paths\fR is true, then information about which changes +were made to which paths is passed to \f(CW\*(C`callback()\*(C'\fR. +.Sp +If \f(CW$strict_node_history\fR is true, copy history will not be traversed +(if any exists) when harvesting the revision logs for each path. +.Sp +The callback function will be given the following arguments: +.RS 4 +.IP "\(bu" 4 +A reference to a hash of paths changed by the revision. Only passed if +\&\f(CW$discover_changed_paths\fR is true, otherwise undef is passed in its +place. +.Sp +The hash's keys are the full paths to the files and directories changed. +The values are _p_svn_log_changed_path_t +objects. +.IP "\(bu" 4 +Revision number. +.IP "\(bu" 4 +Name of user who made the change, or undef if not known. +.IP "\(bu" 4 +Date and time the revision was committed. +.IP "\(bu" 4 +Log message as a single string, or undef. +.IP "\(bu" 4 +A pool object. +.RE +.RS 4 +.Sp +This example prints some of the information received in a simple format, +showing which paths were changed in each revision, for all revisions starting +from the first: +.Sp +.Vb 2 +\& $ra\->get_log(\*(Aq\*(Aq, 1, $ra\->get_latest_revnum, 0, 1, 0, +\& \e&log_callback); +\& +\& sub log_callback +\& { +\& my ($paths, $revnum, $user, $datetime, $logmsg) = @_; +\& print "$datetime \- $user \- r$revnum\en"; +\& +\& while (my ($path, $changes) = each %$paths) { +\& print $changes\->action, " $path\en"; +\& if ($changes\->copyfrom_path) { +\& print " from ", $changes\->copyfrom_path, +\& " r", $changes\->copyfrom_rev, "\en" +\& } +\& } +\& +\& print "\en"; +\& } +.Ve +.RE +.ie n .IP "$ra\->get_repos_root" 4 +.el .IP "\f(CW$ra\fR\->get_repos_root" 4 +.IX Item "$ra->get_repos_root" +Returns the repository's root \s-1URL\s0. The value will not include +a trailing '/'. The returned \s-1URL\s0 is guaranteed to be a prefix of the +session's \s-1URL\s0. +.ie n .IP "$ra\->get_uuid" 4 +.el .IP "\f(CW$ra\fR\->get_uuid" 4 +.IX Item "$ra->get_uuid" +Returns the repository's \s-1UUID\s0 as a string. +.ie n .IP "$ra\->lock(\e%path_revs, $comment, $steal_lock, \e&callback)" 4 +.el .IP "\f(CW$ra\fR\->lock(\e%path_revs, \f(CW$comment\fR, \f(CW$steal_lock\fR, \e&callback)" 4 +.IX Item "$ra->lock(%path_revs, $comment, $steal_lock, &callback)" +\&\s-1TODO\s0 \- doesn't seem to work in Subversion 1.3.2 +.ie n .IP "$ra\->reparent($url)" 4 +.el .IP "\f(CW$ra\fR\->reparent($url)" 4 +.IX Item "$ra->reparent($url)" +Change the root \s-1URL\s0 of the session in \f(CW$ra\fR to point to a different +path. \f(CW$url\fR must be in the same repository as the one \f(CW$ra\fR is +already accessing. +.Sp +New in Subversion\ 1.4. +.ie n .IP "$ra\->replay($revnum, $low_water_mark, $send_deltas, $editor)" 4 +.el .IP "\f(CW$ra\fR\->replay($revnum, \f(CW$low_water_mark\fR, \f(CW$send_deltas\fR, \f(CW$editor\fR)" 4 +.IX Item "$ra->replay($revnum, $low_water_mark, $send_deltas, $editor)" +Call methods on \f(CW$editor\fR to describe the changes made in the revisions +after \f(CW$low_water_mark\fR, up to revision \f(CW$revnum\fR. This is like using +\&\f(CW\*(C`do_update()\*(C'\fR, except that it doesn't return a reporter object, and so +you don't have to describe a working copy to it. It assumes that you've +already got everything up to \f(CW$low_water_mark\fR. +.Sp +If \f(CW$send_deltas\fR is true then file contents and property values will +be supplied, otherwise just filename changes. +.Sp +New in Subversion\ 1.4. +.ie n .IP "$ra\->rev_prop($revnum, $name)" 4 +.el .IP "\f(CW$ra\fR\->rev_prop($revnum, \f(CW$name\fR)" 4 +.IX Item "$ra->rev_prop($revnum, $name)" +Return the value of the unversioned property \f(CW$name\fR from revision \f(CW$revnum\fR. +Returns undef if there is no such property. +.Sp +.Vb 1 +\& print $ra\->rev_prop(123, \*(Aqsvn:date\*(Aq); +.Ve +.ie n .IP "$ra\->rev_proplist($revnum)" 4 +.el .IP "\f(CW$ra\fR\->rev_proplist($revnum)" 4 +.IX Item "$ra->rev_proplist($revnum)" +Returns a reference to a hash containing all the unversioned properties +of revision \f(CW$revnum\fR. +.Sp +.Vb 2 +\& my $props = $ra\->rev_proplist(123); +\& print $props\->{\*(Aqsvn:log\*(Aq}; +.Ve +.ie n .IP "$ra\->stat($path, $revnum)" 4 +.el .IP "\f(CW$ra\fR\->stat($path, \f(CW$revnum\fR)" 4 +.IX Item "$ra->stat($path, $revnum)" +Returns a _p_svn_dirent_t object containing +information about the file at \f(CW$path\fR in revision \f(CW$revnum\fR. +.ie n .IP "$ra\->unlock(\e%path_tokens, $break_lock, \e&callback)" 4 +.el .IP "\f(CW$ra\fR\->unlock(\e%path_tokens, \f(CW$break_lock\fR, \e&callback)" 4 +.IX Item "$ra->unlock(%path_tokens, $break_lock, &callback)" +\&\s-1TODO\s0 \- doesn't seem to work in Subversion 1.3.2 +.SH "SVN::Ra::Reporter" +.IX Header "SVN::Ra::Reporter" +The SVN::Ra methods \f(CW\*(C`do_diff\*(C'\fR, \f(CW\*(C`do_status\*(C'\fR, \f(CW\*(C`do_switch\*(C'\fR, and +\&\f(CW\*(C`do_update\*(C'\fR all return a SVN::Ra::Reporter object, which can be used +to describe the working copy (or other available data) which the client has. +Subversion uses this to figure out what new information should be provided +through a tree delta editor. +.PP +Objects of this class are actually simple wrappers around underlying +\&\f(CW\*(C`svn_ra_reporter2_t\*(C'\fR objects and their associated baton. +.SS "\s-1METHODS\s0" +.IX Subsection "METHODS" +.ie n .IP "$reporter\->set_path($path, $revision, $start_empty, $lock_token, $pool)" 4 +.el .IP "\f(CW$reporter\fR\->set_path($path, \f(CW$revision\fR, \f(CW$start_empty\fR, \f(CW$lock_token\fR, \f(CW$pool\fR)" 4 +.IX Item "$reporter->set_path($path, $revision, $start_empty, $lock_token, $pool)" +Describe a working copy \f(CW$path\fR as being at a particular \f(CW$revision\fR. +.Sp +If \f(CW$start_empty\fR is true and \f(CW$path\fR is a directory, the +implementor should assume the directory has no entries or properties. +.Sp +This will \fIoverride\fR any previous \f(CW\*(C`set_path()\*(C'\fR calls made on parent +paths. \f(CW$path\fR is relative to the \s-1URL\s0 specified in \f(CW\*(C`SVN::Ra\->open()\*(C'\fR +or \f(CW\*(C`SVN::Ra\->new()\*(C'\fR. +.Sp +If \f(CW$lock_token\fR is not undef, it is the lock token for \f(CW$path\fR in the \s-1WC\s0. +.Sp +All temporary allocations are done in \f(CW$pool\fR. +.ie n .IP "$reporter\->delete_path($path, $pool)" 4 +.el .IP "\f(CW$reporter\fR\->delete_path($path, \f(CW$pool\fR)" 4 +.IX Item "$reporter->delete_path($path, $pool)" +Describe a working copy \f(CW$path\fR as missing. +.Sp +All temporary allocations are done in \f(CW$pool\fR. +.ie n .IP "$reporter\->link_path($path, $url, $revision, $start_empty, $lock_token, $pool)" 4 +.el .IP "\f(CW$reporter\fR\->link_path($path, \f(CW$url\fR, \f(CW$revision\fR, \f(CW$start_empty\fR, \f(CW$lock_token\fR, \f(CW$pool\fR)" 4 +.IX Item "$reporter->link_path($path, $url, $revision, $start_empty, $lock_token, $pool)" +Like \f(CW\*(C`set_path()\*(C'\fR, but differs in that \f(CW$path\fR in the working copy +(relative to the root of the report driver) isn't a reflection of +\&\f(CW$path\fR in the repository (relative to the \s-1URL\s0 specified when +opening the \s-1RA\s0 layer), but is instead a reflection of a different +repository \f(CW$url\fR at \f(CW$revision\fR. +.Sp +If \f(CW$start_empty\fR is true and \f(CW$path\fR is a directory, +the implementor should assume the directory has no entries or props. +.Sp +If \f(CW$lock_token\fR is not undef, it is the lock token for \f(CW$path\fR in the \s-1WC\s0. +.Sp +All temporary allocations are done in \f(CW$pool\fR. +.ie n .IP "$reporter\->finish_report($pool)" 4 +.el .IP "\f(CW$reporter\fR\->finish_report($pool)" 4 +.IX Item "$reporter->finish_report($pool)" +Call this when the state report is finished; any directories +or files not explicitly 'set' are assumed to be at the +baseline revision originally passed into \f(CW\*(C`do_update()\*(C'\fR. No other +reporting functions, including \f(CW\*(C`abort_report()\*(C'\fR, should be called after +calling this function. +.ie n .IP "$reporter\->abort_report($pool)" 4 +.el .IP "\f(CW$reporter\fR\->abort_report($pool)" 4 +.IX Item "$reporter->abort_report($pool)" +If an error occurs during a report, this method should cause the +filesystem transaction to be aborted and cleaned up. No other reporting +methods should be called after calling this method. +.SH "SVN::Ra::Callbacks" +.IX Header "SVN::Ra::Callbacks" +This is the wrapper class for \f(CW\*(C`svn_ra_callback_t\*(C'\fR. To supply custom +callbacks to SVN::Ra, subclass this class and override the member +functions. +.SH "AUTHORS" +.IX Header "AUTHORS" +Chia-liang Kao +.SH "COPYRIGHT" +.IX Header "COPYRIGHT" +Copyright (c) 2003 CollabNet. All rights reserved. +.PP +This software is licensed as described in the file \s-1COPYING\s0, which you +should have received as part of this distribution. The terms are also +available at http://subversion.tigris.org/license\-1.html. If newer +versions of this license are posted there, you may use a newer version +instead, at your option. +.PP +This software consists of voluntary contributions made by many +individuals. For exact contribution history, see the revision history +and logs, available at http://subversion.tigris.org/. diff --git a/extra/subversion/pkgnone/SVN::Repos.0 b/extra/subversion/pkgnone/SVN::Repos.0 new file mode 100644 index 000000000..febe78659 --- /dev/null +++ b/extra/subversion/pkgnone/SVN::Repos.0 @@ -0,0 +1,398 @@ +.\" Automatically generated by Pod::Man 2.22 (Pod::Simple 3.07) +.\" +.\" 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 "native::Repos 3" +.TH native::Repos 3 "2008-03-17" "perl v5.10.1" "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::Repos \- Subversion repository functions +.SH "SYNOPSIS" +.IX Header "SYNOPSIS" +.Vb 3 +\& use SVN::Core; +\& use SVN::Repos; +\& use SVN::Fs; +\& +\& my $repos = SVN::Repos::open(\*(Aq/path/to/repos\*(Aq); +\& print $repos\->fs()\->youngest_rev; +.Ve +.SH "DESCRIPTION" +.IX Header "DESCRIPTION" +SVN::Repos wraps the object-oriented \f(CW\*(C`svn_repos_t\*(C'\fR functions, providing +access to a Subversion repository on the local filesystem. +.SS "\s-1CONSTRUCTORS\s0" +.IX Subsection "CONSTRUCTORS" +.IP "SVN::Repos::open($path)" 4 +.IX Item "SVN::Repos::open($path)" +This function opens an existing repository, and returns an +\&\f(CW\*(C`SVN::Repos\*(C'\fR object. +.ie n .IP "create($path, undef, undef, $config, $fs_config)" 4 +.el .IP "create($path, undef, undef, \f(CW$config\fR, \f(CW$fs_config\fR)" 4 +.IX Item "create($path, undef, undef, $config, $fs_config)" +This function creates a new repository, and returns an \f(CW\*(C`SVN::Repos\*(C'\fR +object. +.SS "\s-1METHODS\s0" +.IX Subsection "METHODS" +.ie n .IP "$repos\->dump_fs($dump_fh, $feedback_fh, $start_rev, $end_rev, $incremental, $cancel_func, $cancel_baton)" 4 +.el .IP "\f(CW$repos\fR\->dump_fs($dump_fh, \f(CW$feedback_fh\fR, \f(CW$start_rev\fR, \f(CW$end_rev\fR, \f(CW$incremental\fR, \f(CW$cancel_func\fR, \f(CW$cancel_baton\fR)" 4 +.IX Item "$repos->dump_fs($dump_fh, $feedback_fh, $start_rev, $end_rev, $incremental, $cancel_func, $cancel_baton)" +.PD 0 +.ie n .IP "$repos\->dump_fs2($dump_fh, $feedback_fh, $start_rev, $end_rev, $incremental, $deltify, $cancel_func, $cancel_baton)" 4 +.el .IP "\f(CW$repos\fR\->dump_fs2($dump_fh, \f(CW$feedback_fh\fR, \f(CW$start_rev\fR, \f(CW$end_rev\fR, \f(CW$incremental\fR, \f(CW$deltify\fR, \f(CW$cancel_func\fR, \f(CW$cancel_baton\fR)" 4 +.IX Item "$repos->dump_fs2($dump_fh, $feedback_fh, $start_rev, $end_rev, $incremental, $deltify, $cancel_func, $cancel_baton)" +.PD +Create a dump file of the repository from revision \f(CW$start_rev\fR to \f(CW$end_rev\fR +, store it into the filehandle \f(CW$dump_fh\fR, and write feedback on the progress +of the operation to filehandle \f(CW$feedback_fh\fR. +.Sp +If \f(CW$incremental\fR is \s-1TRUE\s0, the first revision dumped will be a diff +against the previous revision (usually it looks like a full dump of +the tree). +.Sp +If \f(CW$use_deltas\fR is \s-1TRUE\s0, output only node properties which have +changed relative to the previous contents, and output text contents +as svndiff data against the previous contents. Regardless of how +this flag is set, the first revision of a non-incremental dump will +be done with full plain text. A dump with \f(CW@a\fR use_deltas set cannot +be loaded by Subversion 1.0.x. +.Sp +According to svn_repos.h, the \f(CW$cancel_func\fR is a function that is called +periodically and given \f(CW$cancel_baton\fR as a parameter to determine whether +the client wishes to cancel the dump. You must supply \f(CW\*(C`undef\*(C'\fR at the very +least. +.Sp +Example: +.Sp +.Vb 2 +\& use SVN::Core; +\& use SVN::Repos; +\& +\& my $repos = SVN::Repos::open (\*(Aq/repo/sandbox\*(Aq); +\& +\& open my $fh, ">/tmp/tmp.dump" or die "Cannot open file: $!\en"; +\& +\& my $start_rev = 10; +\& my $end_rev = 20; +\& my $incremental = 1; +\& my $deltify = 1; +\& +\& $repos\->dump_fs2($fh, \e*STDOUT, # Dump file => $fh, Feedback => STDOUT +\& $start_rev, $end_rev, # Revision Range +\& $incremental, $deltify, # Options +\& undef, undef); # Cancel Function +\& +\& close $fh; +.Ve +.ie n .IP "$repos\->load_fs($dumpfile_fh, $feedback_fh, $uuid_action, $parent_dir, $cancel_func, $cancel_baton);" 4 +.el .IP "\f(CW$repos\fR\->load_fs($dumpfile_fh, \f(CW$feedback_fh\fR, \f(CW$uuid_action\fR, \f(CW$parent_dir\fR, \f(CW$cancel_func\fR, \f(CW$cancel_baton\fR);" 4 +.IX Item "$repos->load_fs($dumpfile_fh, $feedback_fh, $uuid_action, $parent_dir, $cancel_func, $cancel_baton);" +.PD 0 +.ie n .IP "$repos\->load_fs2($dumpfile_fh, $feedback_fh, $uuid_action, $parent_dir, $use_pre_commit_hook, $use_post_commit_hook, $cancel_func, $cancel_baton);" 4 +.el .IP "\f(CW$repos\fR\->load_fs2($dumpfile_fh, \f(CW$feedback_fh\fR, \f(CW$uuid_action\fR, \f(CW$parent_dir\fR, \f(CW$use_pre_commit_hook\fR, \f(CW$use_post_commit_hook\fR, \f(CW$cancel_func\fR, \f(CW$cancel_baton\fR);" 4 +.IX Item "$repos->load_fs2($dumpfile_fh, $feedback_fh, $uuid_action, $parent_dir, $use_pre_commit_hook, $use_post_commit_hook, $cancel_func, $cancel_baton);" +.PD +Loads a dumpfile specified by the \f(CW$dumpfile_fh\fR filehandle into the repository. +If the dumpstream contains copy history that is unavailable in the repository, +an error will be thrown. +.Sp +The repository's \s-1UUID\s0 will be updated iff the dumpstream contains a \s-1UUID\s0 and +\&\f(CW$uuid_action\fR is not equal to \f(CW$SVN::Repos::load_uuid_ignore\fR and either the +repository contains no revisions or \f(CW$uuid_action\fR is equal to +\&\f(CW$SVN::Repos::load_uuid_force\fR. +.Sp +If the dumpstream contains no \s-1UUID\s0, then \f(CW$uuid_action\fR is +ignored and the repository \s-1UUID\s0 is not touched. +.Sp +If \f(CW$parent_dir\fR is not null, then the parser will reparent all the +loaded nodes, from root to \f(CW@a\fR parent_dir. The directory \f(CW$parent_dir\fR +must be an existing directory in the repository. +.Sp +If \f(CW$use_pre_commit_hook\fR is set, call the repository's pre-commit +hook before committing each loaded revision. +.Sp +If \f(CW$use_post_commit_hook\fR is set, call the repository's +post-commit hook after committing each loaded revision. +.Sp +If \f(CW$cancel_func\fR is not \s-1NULL\s0, it is called periodically with +\&\f(CW$cancel_baton\fR as argument to see if the client wishes to cancel +the load. +.Sp +You must at least provide undef for these parameters for the method call +to work. +.Sp +Example: + use SVN::Core; + use SVN::Repos; +.Sp +.Vb 1 +\& my $repos = SVN::Repos::open (\*(Aq/repo/test_repo\*(Aq); +\& +\& open my $fh, "/repo/sandbox.dump" or die "Cannot open file: $!\en"; +\& +\& my $parent_dir = \*(Aq/\*(Aq; +\& my $use_pre_commit_hook = 0; +\& my $use_post_commit_hook = 0; +\& +\& $repos\->load_fs2($fh, \e*STDOUT, +\& $SVN::Repos::load_uuid_ignore, # Ignore uuid +\& $parent_dir, +\& $use_pre_commit_hook, # Use pre\-commit hook? +\& $use_post_commit_hook, # Use post\-commit hook? +\& undef, undef); +\& +\& +\& close $fh; +.Ve +.ie n .IP "$repos\->\fIfs()\fR" 4 +.el .IP "\f(CW$repos\fR\->\fIfs()\fR" 4 +.IX Item "$repos->fs()" +Returns the \f(CW\*(C`SVN::Fs\*(C'\fR object for this repository. +.ie n .IP "$repos\->get_logs([$path, ...], $start, $end, $discover_changed_paths, $strict_node_history, $receiver)" 4 +.el .IP "\f(CW$repos\fR\->get_logs([$path, ...], \f(CW$start\fR, \f(CW$end\fR, \f(CW$discover_changed_paths\fR, \f(CW$strict_node_history\fR, \f(CW$receiver\fR)" 4 +.IX Item "$repos->get_logs([$path, ...], $start, $end, $discover_changed_paths, $strict_node_history, $receiver)" +Iterates over all the revisions that affect the list of paths passed +as the first parameter, starting at \f(CW$start\fR, and ending at \f(CW$end\fR. +.Sp +\&\f(CW$receiver\fR is called for each change. The arguments to \f(CW$receiver\fR are: +.RS 4 +.ie n .IP "$self" 4 +.el .IP "\f(CW$self\fR" 4 +.IX Item "$self" +The \f(CW\*(C`SVN::Repos\*(C'\fR object. +.ie n .IP "$paths" 4 +.el .IP "\f(CW$paths\fR" 4 +.IX Item "$paths" +\&\f(CW\*(C`undef\*(C'\fR if \f(CW$discover_changed_paths\fR is false. Otherwise, contains a hash +of paths that have changed in this revision. +.ie n .IP "$rev" 4 +.el .IP "\f(CW$rev\fR" 4 +.IX Item "$rev" +The revision this change occured in. +.ie n .IP "$date" 4 +.el .IP "\f(CW$date\fR" 4 +.IX Item "$date" +The date and time the revision occured. +.ie n .IP "$msg" 4 +.el .IP "\f(CW$msg\fR" 4 +.IX Item "$msg" +The log message associated with this revision. +.ie n .IP "$pool" 4 +.el .IP "\f(CW$pool\fR" 4 +.IX Item "$pool" +An \f(CW\*(C`SVN::Pool\*(C'\fR object which may be used in the function. +.RE +.RS 4 +.Sp +If \f(CW$strict_node_history\fR is true then copies will not be traversed. +.RE +.SS "\s-1ADDITIONAL\s0 \s-1METHODS\s0" +.IX Subsection "ADDITIONAL METHODS" +The following methods work, but are not currently documented in this +file. Please consult the svn_repos.h section in the Subversion \s-1API\s0 +for more details. +.ie n .IP "$repos\->get_commit_editor(...)" 4 +.el .IP "\f(CW$repos\fR\->get_commit_editor(...)" 4 +.IX Item "$repos->get_commit_editor(...)" +.PD 0 +.ie n .IP "$repos\->get_commit_editor2(...)" 4 +.el .IP "\f(CW$repos\fR\->get_commit_editor2(...)" 4 +.IX Item "$repos->get_commit_editor2(...)" +.ie n .IP "$repos\->path(...)" 4 +.el .IP "\f(CW$repos\fR\->path(...)" 4 +.IX Item "$repos->path(...)" +.ie n .IP "$repos\->db_env(...)" 4 +.el .IP "\f(CW$repos\fR\->db_env(...)" 4 +.IX Item "$repos->db_env(...)" +.ie n .IP "$repos\->lock_dir(...)" 4 +.el .IP "\f(CW$repos\fR\->lock_dir(...)" 4 +.IX Item "$repos->lock_dir(...)" +.ie n .IP "$repos\->db_lockfile(...)" 4 +.el .IP "\f(CW$repos\fR\->db_lockfile(...)" 4 +.IX Item "$repos->db_lockfile(...)" +.ie n .IP "$repos\->hook_dir(...)" 4 +.el .IP "\f(CW$repos\fR\->hook_dir(...)" 4 +.IX Item "$repos->hook_dir(...)" +.ie n .IP "$repos\->start_commit_hook(...)" 4 +.el .IP "\f(CW$repos\fR\->start_commit_hook(...)" 4 +.IX Item "$repos->start_commit_hook(...)" +.ie n .IP "$repos\->pre_commit_hook(...)" 4 +.el .IP "\f(CW$repos\fR\->pre_commit_hook(...)" 4 +.IX Item "$repos->pre_commit_hook(...)" +.ie n .IP "$repos\->post_commit_hook(...)" 4 +.el .IP "\f(CW$repos\fR\->post_commit_hook(...)" 4 +.IX Item "$repos->post_commit_hook(...)" +.ie n .IP "$repos\->pre_revprop_change(...)" 4 +.el .IP "\f(CW$repos\fR\->pre_revprop_change(...)" 4 +.IX Item "$repos->pre_revprop_change(...)" +.ie n .IP "$repos\->post_revprop_change(...)" 4 +.el .IP "\f(CW$repos\fR\->post_revprop_change(...)" 4 +.IX Item "$repos->post_revprop_change(...)" +.ie n .IP "$repos\->dated_revision(...)" 4 +.el .IP "\f(CW$repos\fR\->dated_revision(...)" 4 +.IX Item "$repos->dated_revision(...)" +.ie n .IP "$repos\->fs_commit_txn(...)" 4 +.el .IP "\f(CW$repos\fR\->fs_commit_txn(...)" 4 +.IX Item "$repos->fs_commit_txn(...)" +.ie n .IP "$repos\->fs_being_txn_for_commit(...)" 4 +.el .IP "\f(CW$repos\fR\->fs_being_txn_for_commit(...)" 4 +.IX Item "$repos->fs_being_txn_for_commit(...)" +.ie n .IP "$repos\->fs_being_txn_for_update(...)" 4 +.el .IP "\f(CW$repos\fR\->fs_being_txn_for_update(...)" 4 +.IX Item "$repos->fs_being_txn_for_update(...)" +.ie n .IP "$repos\->fs_change_rev_prop(...)" 4 +.el .IP "\f(CW$repos\fR\->fs_change_rev_prop(...)" 4 +.IX Item "$repos->fs_change_rev_prop(...)" +.ie n .IP "$repos\->node_editor(...)" 4 +.el .IP "\f(CW$repos\fR\->node_editor(...)" 4 +.IX Item "$repos->node_editor(...)" +.ie n .IP "$repos\->dump_fs(...)" 4 +.el .IP "\f(CW$repos\fR\->dump_fs(...)" 4 +.IX Item "$repos->dump_fs(...)" +.ie n .IP "$repos\->load_fs(...)" 4 +.el .IP "\f(CW$repos\fR\->load_fs(...)" 4 +.IX Item "$repos->load_fs(...)" +.ie n .IP "$repos\->get_fs_build_parser(...)" 4 +.el .IP "\f(CW$repos\fR\->get_fs_build_parser(...)" 4 +.IX Item "$repos->get_fs_build_parser(...)" +.PD +.SH "AUTHORS" +.IX Header "AUTHORS" +Chia-liang Kao +.SH "COPYRIGHT" +.IX Header "COPYRIGHT" +Copyright (c) 2003\-2006 CollabNet. All rights reserved. +.PP +This software is licensed as described in the file \s-1COPYING\s0, which you +should have received as part of this distribution. The terms are also +available at http://subversion.tigris.org/license\-1.html. If newer +versions of this license are posted there, you may use a newer version +instead, at your option. +.PP +This software consists of voluntary contributions made by many +individuals. For exact contribution history, see the revision history +and logs, available at http://subversion.tigris.org/. diff --git a/extra/subversion/pkgnone/SVN::Wc.0 b/extra/subversion/pkgnone/SVN::Wc.0 new file mode 100644 index 000000000..69c92a492 --- /dev/null +++ b/extra/subversion/pkgnone/SVN::Wc.0 @@ -0,0 +1,473 @@ +.\" Automatically generated by Pod::Man 2.22 (Pod::Simple 3.07) +.\" +.\" 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 "native::Wc 3" +.TH native::Wc 3 "2007-11-05" "perl v5.10.1" "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::Wc \- Subversion working copy functions +.SH "SYNOPSIS" +.IX Header "SYNOPSIS" +Incomplete +.SH "OBJECTS" +.IX Header "OBJECTS" +.SS "svn_wc_status_t" +.IX Subsection "svn_wc_status_t" +.ie n .IP "$wcstat\->\fIentry()\fR" 4 +.el .IP "\f(CW$wcstat\fR\->\fIentry()\fR" 4 +.IX Item "$wcstat->entry()" +A svn_wc_entry_t object for the item. Can be undef if not under version +control. +.ie n .IP "$wcstat\->\fItext_status()\fR" 4 +.el .IP "\f(CW$wcstat\fR\->\fItext_status()\fR" 4 +.IX Item "$wcstat->text_status()" +An integer representing the status of the item's text. Can be one of the +\&\f(CW$SVN::Wc::Status::\fR* constants. +.ie n .IP "$wcstat\->\fIprop_status()\fR" 4 +.el .IP "\f(CW$wcstat\fR\->\fIprop_status()\fR" 4 +.IX Item "$wcstat->prop_status()" +An integer representing the status of the item's properties. Can be one of the +\&\f(CW$SVN::Wc::Status::\fR* constants. +.ie n .IP "$wcstat\->\fIlocked()\fR" 4 +.el .IP "\f(CW$wcstat\fR\->\fIlocked()\fR" 4 +.IX Item "$wcstat->locked()" +A boolean telling if the item is locked. A directory can be locked if a +working copy update was interrupted. +.ie n .IP "$wcstat\->\fIcopied()\fR" 4 +.el .IP "\f(CW$wcstat\fR\->\fIcopied()\fR" 4 +.IX Item "$wcstat->copied()" +A boolean telling if the item was copied. A file or directory can be copied if +it's scheduled for addition-with-history (or part of a subtree that is +scheduled as such). +.ie n .IP "$wcstat\->\fIswitched()\fR" 4 +.el .IP "\f(CW$wcstat\fR\->\fIswitched()\fR" 4 +.IX Item "$wcstat->switched()" +A boolean telling if the item was switched. A file or directory can be +switched if the switch command has been used. +.ie n .IP "$wcstat\->\fIrepos_text_status()\fR" 4 +.el .IP "\f(CW$wcstat\fR\->\fIrepos_text_status()\fR" 4 +.IX Item "$wcstat->repos_text_status()" +An integer representing the status of the item's text in the repository. Can +be one of the \f(CW$SVN::Wc::Status::\fR* constants. +.ie n .IP "$wcstat\->\fIrepos_prop_status()\fR" 4 +.el .IP "\f(CW$wcstat\fR\->\fIrepos_prop_status()\fR" 4 +.IX Item "$wcstat->repos_prop_status()" +An integer representing the status of the item's properties in the repository. +Can be one of the \f(CW$SVN::Wc::Status::\fR* constants. +.SS "svn_wc_entry_t" +.IX Subsection "svn_wc_entry_t" +.ie n .IP "$wcent\->\fIname()\fR" 4 +.el .IP "\f(CW$wcent\fR\->\fIname()\fR" 4 +.IX Item "$wcent->name()" +Entry's name. +.ie n .IP "$wcent\->\fIrevision()\fR" 4 +.el .IP "\f(CW$wcent\fR\->\fIrevision()\fR" 4 +.IX Item "$wcent->revision()" +Base revision. +.ie n .IP "$wcent\->\fIurl()\fR" 4 +.el .IP "\f(CW$wcent\fR\->\fIurl()\fR" 4 +.IX Item "$wcent->url()" +\&\s-1URL\s0 in repository. +.ie n .IP "$wcent\->\fIrepos()\fR" 4 +.el .IP "\f(CW$wcent\fR\->\fIrepos()\fR" 4 +.IX Item "$wcent->repos()" +Canonical repository \s-1URL\s0. +.ie n .IP "$wcent\->\fIuuid()\fR" 4 +.el .IP "\f(CW$wcent\fR\->\fIuuid()\fR" 4 +.IX Item "$wcent->uuid()" +Repository uuid. +.ie n .IP "$wcent\->\fIkind()\fR" 4 +.el .IP "\f(CW$wcent\fR\->\fIkind()\fR" 4 +.IX Item "$wcent->kind()" +The kind of node. One of the following constants: +\&\f(CW$SVN::Node::none\fR, \f(CW$SVN::Node::file\fR, +\&\f(CW$SVN::Node::dir\fR, \f(CW$SVN::Node::unknown\fR. +.ie n .IP "$wcent\->\fIschedule()\fR" 4 +.el .IP "\f(CW$wcent\fR\->\fIschedule()\fR" 4 +.IX Item "$wcent->schedule()" +Scheduling. One of the SVN::Wc::Schedule::* constants. +.ie n .IP "$wcent\->\fIcopied()\fR" 4 +.el .IP "\f(CW$wcent\fR\->\fIcopied()\fR" 4 +.IX Item "$wcent->copied()" +In a copied state. +.ie n .IP "$wcent\->\fIdeleted()\fR" 4 +.el .IP "\f(CW$wcent\fR\->\fIdeleted()\fR" 4 +.IX Item "$wcent->deleted()" +Deleted, but parent rev lags behind. +.ie n .IP "$wcent\->\fIabsent()\fR" 4 +.el .IP "\f(CW$wcent\fR\->\fIabsent()\fR" 4 +.IX Item "$wcent->absent()" +Absent \*(-- we know an entry of this name exists, but that's all (usually this +happens because of authz restrictions) +.ie n .IP "$wcent\->\fIincomplete()\fR" 4 +.el .IP "\f(CW$wcent\fR\->\fIincomplete()\fR" 4 +.IX Item "$wcent->incomplete()" +For \s-1THIS_DIR\s0 entry, implies whole entries file is incomplete. +.ie n .IP "$wcent\->\fIcopyfrom_url()\fR" 4 +.el .IP "\f(CW$wcent\fR\->\fIcopyfrom_url()\fR" 4 +.IX Item "$wcent->copyfrom_url()" +Copyfrom location. +.ie n .IP "$wcent\->\fIcopyfrom_rev()\fR" 4 +.el .IP "\f(CW$wcent\fR\->\fIcopyfrom_rev()\fR" 4 +.IX Item "$wcent->copyfrom_rev()" +Copyfrom revision. +.ie n .IP "$wcent\->\fIconflict_old()\fR" 4 +.el .IP "\f(CW$wcent\fR\->\fIconflict_old()\fR" 4 +.IX Item "$wcent->conflict_old()" +Old version of conflicted file. +.ie n .IP "$wcent\->\fIconflict_new()\fR" 4 +.el .IP "\f(CW$wcent\fR\->\fIconflict_new()\fR" 4 +.IX Item "$wcent->conflict_new()" +New version of conflicted file. +.ie n .IP "$wcent\->\fIconflict_wrk()\fR" 4 +.el .IP "\f(CW$wcent\fR\->\fIconflict_wrk()\fR" 4 +.IX Item "$wcent->conflict_wrk()" +Working version of conflicted file. +.ie n .IP "$wcent\->\fIprejfile()\fR" 4 +.el .IP "\f(CW$wcent\fR\->\fIprejfile()\fR" 4 +.IX Item "$wcent->prejfile()" +Property reject file. +.ie n .IP "$wcent\->\fItext_time()\fR" 4 +.el .IP "\f(CW$wcent\fR\->\fItext_time()\fR" 4 +.IX Item "$wcent->text_time()" +Last up-to-date time for text contents (0 means no information available). +.ie n .IP "$wcent\->\fIprop_time()\fR" 4 +.el .IP "\f(CW$wcent\fR\->\fIprop_time()\fR" 4 +.IX Item "$wcent->prop_time()" +Last up-to-date time for properties (0 means no information available). +.ie n .IP "$wcent\->\fIchecksum()\fR" 4 +.el .IP "\f(CW$wcent\fR\->\fIchecksum()\fR" 4 +.IX Item "$wcent->checksum()" +Base\-64 encoded checksum for the untranslated text base file, can be undef for +backwards compatibility. +.ie n .IP "$wcent\->\fIcmt_rev()\fR" 4 +.el .IP "\f(CW$wcent\fR\->\fIcmt_rev()\fR" 4 +.IX Item "$wcent->cmt_rev()" +Last revision this was changed. +.ie n .IP "$wcent\->\fIcmt_date()\fR" 4 +.el .IP "\f(CW$wcent\fR\->\fIcmt_date()\fR" 4 +.IX Item "$wcent->cmt_date()" +Last date this was changed. +.ie n .IP "$wcent\->\fIcmt_author()\fR" 4 +.el .IP "\f(CW$wcent\fR\->\fIcmt_author()\fR" 4 +.IX Item "$wcent->cmt_author()" +Last commit author of this item. +.SH "CONSTANTS" +.IX Header "CONSTANTS" +.SS "SVN::Wc::Notify::Action" +.IX Subsection "SVN::Wc::Notify::Action" +.ie n .IP "$SVN::Wc::Notify::Action::add" 4 +.el .IP "\f(CW$SVN::Wc::Notify::Action::add\fR" 4 +.IX Item "$SVN::Wc::Notify::Action::add" +Adding a path to revision control. +.ie n .IP "$SVN::Wc::Notify::Action::copy" 4 +.el .IP "\f(CW$SVN::Wc::Notify::Action::copy\fR" 4 +.IX Item "$SVN::Wc::Notify::Action::copy" +Copying a versioned path. +.ie n .IP "$SVN::Wc::Notify::Action::delete" 4 +.el .IP "\f(CW$SVN::Wc::Notify::Action::delete\fR" 4 +.IX Item "$SVN::Wc::Notify::Action::delete" +Deleting a versioned path. +.ie n .IP "$SVN::Wc::Notify::Action::restore" 4 +.el .IP "\f(CW$SVN::Wc::Notify::Action::restore\fR" 4 +.IX Item "$SVN::Wc::Notify::Action::restore" +Restoring a missing path from the pristine text-base. +.ie n .IP "$SVN::Wc::Notify::Action::revert" 4 +.el .IP "\f(CW$SVN::Wc::Notify::Action::revert\fR" 4 +.IX Item "$SVN::Wc::Notify::Action::revert" +Reverting a modified path. +.ie n .IP "$SVN::Wc::Notify::Action::failed_revert" 4 +.el .IP "\f(CW$SVN::Wc::Notify::Action::failed_revert\fR" 4 +.IX Item "$SVN::Wc::Notify::Action::failed_revert" +A revert operation has failed. +.ie n .IP "$SVN::Wc::Notify::Action::resolved" 4 +.el .IP "\f(CW$SVN::Wc::Notify::Action::resolved\fR" 4 +.IX Item "$SVN::Wc::Notify::Action::resolved" +Resolving a conflict. +.ie n .IP "$SVN::Wc::Notify::Action::skip" 4 +.el .IP "\f(CW$SVN::Wc::Notify::Action::skip\fR" 4 +.IX Item "$SVN::Wc::Notify::Action::skip" +Skipping a path. +.ie n .IP "$SVN::Wc::Notify::Action::update_delete" 4 +.el .IP "\f(CW$SVN::Wc::Notify::Action::update_delete\fR" 4 +.IX Item "$SVN::Wc::Notify::Action::update_delete" +Got a delete in an update. +.ie n .IP "$SVN::Wc::Notify::Action::update_add" 4 +.el .IP "\f(CW$SVN::Wc::Notify::Action::update_add\fR" 4 +.IX Item "$SVN::Wc::Notify::Action::update_add" +Got an add in an update. +.ie n .IP "$SVN::Wc::Notify::Action::update_update" 4 +.el .IP "\f(CW$SVN::Wc::Notify::Action::update_update\fR" 4 +.IX Item "$SVN::Wc::Notify::Action::update_update" +Got any other action in an update. +.ie n .IP "$SVN::Wc::Notify::Action::update_completed" 4 +.el .IP "\f(CW$SVN::Wc::Notify::Action::update_completed\fR" 4 +.IX Item "$SVN::Wc::Notify::Action::update_completed" +The last notification in an update (including updates of externals). +.ie n .IP "$SVN::Wc::Notify::Action::update_external" 4 +.el .IP "\f(CW$SVN::Wc::Notify::Action::update_external\fR" 4 +.IX Item "$SVN::Wc::Notify::Action::update_external" +Updating an external module. +.ie n .IP "$SVN::Wc::Notify::Action::status_completed" 4 +.el .IP "\f(CW$SVN::Wc::Notify::Action::status_completed\fR" 4 +.IX Item "$SVN::Wc::Notify::Action::status_completed" +The last notification in a status (including status on externals). +.ie n .IP "$SVN::Wc::Notify::Action::status_external" 4 +.el .IP "\f(CW$SVN::Wc::Notify::Action::status_external\fR" 4 +.IX Item "$SVN::Wc::Notify::Action::status_external" +Running status on an external module. +.ie n .IP "$SVN::Wc::Notify::Action::commit_modified" 4 +.el .IP "\f(CW$SVN::Wc::Notify::Action::commit_modified\fR" 4 +.IX Item "$SVN::Wc::Notify::Action::commit_modified" +Committing a modification. +.ie n .IP "$SVN::Wc::Notify::Action::commit_added" 4 +.el .IP "\f(CW$SVN::Wc::Notify::Action::commit_added\fR" 4 +.IX Item "$SVN::Wc::Notify::Action::commit_added" +Committing an addition. +.ie n .IP "$SVN::Wc::Notify::Action::commit_deleted" 4 +.el .IP "\f(CW$SVN::Wc::Notify::Action::commit_deleted\fR" 4 +.IX Item "$SVN::Wc::Notify::Action::commit_deleted" +Committing a deletion. +.ie n .IP "$SVN::Wc::Notify::Action::commit_replaced" 4 +.el .IP "\f(CW$SVN::Wc::Notify::Action::commit_replaced\fR" 4 +.IX Item "$SVN::Wc::Notify::Action::commit_replaced" +Committing a replacement. +.ie n .IP "$SVN::Wc::Notify::Action::commit_postfix_txdelta" 4 +.el .IP "\f(CW$SVN::Wc::Notify::Action::commit_postfix_txdelta\fR" 4 +.IX Item "$SVN::Wc::Notify::Action::commit_postfix_txdelta" +Transmitting post-fix text-delta data for a file. +.ie n .IP "$SVN::Wc::Notify::Action::blame_revision" 4 +.el .IP "\f(CW$SVN::Wc::Notify::Action::blame_revision\fR" 4 +.IX Item "$SVN::Wc::Notify::Action::blame_revision" +Processed a single revision's blame. +.SS "SVN::Wc::Notify::State" +.IX Subsection "SVN::Wc::Notify::State" +.ie n .IP "$SVN::Wc::Notify::State::unknown" 4 +.el .IP "\f(CW$SVN::Wc::Notify::State::unknown\fR" 4 +.IX Item "$SVN::Wc::Notify::State::unknown" +Notifier doesn't know or isn't saying. +.ie n .IP "$SVN::Wc::Notify::State::unchanged" 4 +.el .IP "\f(CW$SVN::Wc::Notify::State::unchanged\fR" 4 +.IX Item "$SVN::Wc::Notify::State::unchanged" +The state did not change. +.ie n .IP "$SVN::Wc::Notify::State::missing" 4 +.el .IP "\f(CW$SVN::Wc::Notify::State::missing\fR" 4 +.IX Item "$SVN::Wc::Notify::State::missing" +The item wasn't present. +.ie n .IP "$SVN::Wc::Notify::State::obstructed" 4 +.el .IP "\f(CW$SVN::Wc::Notify::State::obstructed\fR" 4 +.IX Item "$SVN::Wc::Notify::State::obstructed" +An unversioned item obstructed work. +.ie n .IP "$SVN::Wc::Notify::State::changed" 4 +.el .IP "\f(CW$SVN::Wc::Notify::State::changed\fR" 4 +.IX Item "$SVN::Wc::Notify::State::changed" +Pristine state was modified. +.ie n .IP "$SVN::Wc::Notify::State::merged" 4 +.el .IP "\f(CW$SVN::Wc::Notify::State::merged\fR" 4 +.IX Item "$SVN::Wc::Notify::State::merged" +Modified state had mods merged in. +.ie n .IP "$SVN::Wc::Notify::State::conflicted" 4 +.el .IP "\f(CW$SVN::Wc::Notify::State::conflicted\fR" 4 +.IX Item "$SVN::Wc::Notify::State::conflicted" +Modified state got conflicting mods. +.SS "SVN::Wc::Schedule" +.IX Subsection "SVN::Wc::Schedule" +.ie n .IP "$SVN::Wc::Schedule::normal" 4 +.el .IP "\f(CW$SVN::Wc::Schedule::normal\fR" 4 +.IX Item "$SVN::Wc::Schedule::normal" +Nothing special here. +.ie n .IP "$SVN::Wc::Schedule::add" 4 +.el .IP "\f(CW$SVN::Wc::Schedule::add\fR" 4 +.IX Item "$SVN::Wc::Schedule::add" +Slated for addition. +.ie n .IP "$SVN::Wc::Schedule::delete" 4 +.el .IP "\f(CW$SVN::Wc::Schedule::delete\fR" 4 +.IX Item "$SVN::Wc::Schedule::delete" +Slated for deletion. +.ie n .IP "$SVN::Wc::Schedule::replace" 4 +.el .IP "\f(CW$SVN::Wc::Schedule::replace\fR" 4 +.IX Item "$SVN::Wc::Schedule::replace" +Slated for replacement (delete + add) +.SS "SVN::Wc::Status" +.IX Subsection "SVN::Wc::Status" +.ie n .IP "$SVN::Wc::Status::none" 4 +.el .IP "\f(CW$SVN::Wc::Status::none\fR" 4 +.IX Item "$SVN::Wc::Status::none" +Does not exist. +.ie n .IP "$SVN::Wc::Status::unversioned" 4 +.el .IP "\f(CW$SVN::Wc::Status::unversioned\fR" 4 +.IX Item "$SVN::Wc::Status::unversioned" +Is not a versioned node in this working copy. +.ie n .IP "$SVN::Wc::Status::normal" 4 +.el .IP "\f(CW$SVN::Wc::Status::normal\fR" 4 +.IX Item "$SVN::Wc::Status::normal" +Exists, but uninteresting. +.ie n .IP "$SVN::Wc::Status::added" 4 +.el .IP "\f(CW$SVN::Wc::Status::added\fR" 4 +.IX Item "$SVN::Wc::Status::added" +Is scheduled for addition. +.ie n .IP "$SVN::Wc::Status::missing" 4 +.el .IP "\f(CW$SVN::Wc::Status::missing\fR" 4 +.IX Item "$SVN::Wc::Status::missing" +Under version control but missing. +.ie n .IP "$SVN::Wc::Status::deleted" 4 +.el .IP "\f(CW$SVN::Wc::Status::deleted\fR" 4 +.IX Item "$SVN::Wc::Status::deleted" +Scheduled for deletion. +.ie n .IP "$SVN::Wc::Status::replaced" 4 +.el .IP "\f(CW$SVN::Wc::Status::replaced\fR" 4 +.IX Item "$SVN::Wc::Status::replaced" +Was deleted and then re-added. +.ie n .IP "$SVN::Wc::Status::modified" 4 +.el .IP "\f(CW$SVN::Wc::Status::modified\fR" 4 +.IX Item "$SVN::Wc::Status::modified" +Text or props have been modified. +.ie n .IP "$SVN::Wc::Status::merged" 4 +.el .IP "\f(CW$SVN::Wc::Status::merged\fR" 4 +.IX Item "$SVN::Wc::Status::merged" +Local mods received repos mods. +.ie n .IP "$SVN::Wc::Status::conflicted" 4 +.el .IP "\f(CW$SVN::Wc::Status::conflicted\fR" 4 +.IX Item "$SVN::Wc::Status::conflicted" +Local mods received conflicting mods. +.ie n .IP "$SVN::Wc::Status::ignored" 4 +.el .IP "\f(CW$SVN::Wc::Status::ignored\fR" 4 +.IX Item "$SVN::Wc::Status::ignored" +A node marked as ignored. +.ie n .IP "$SVN::Wc::Status::obstructed" 4 +.el .IP "\f(CW$SVN::Wc::Status::obstructed\fR" 4 +.IX Item "$SVN::Wc::Status::obstructed" +An unversioned resource is in the way of the versioned resource. +.ie n .IP "$SVN::Wc::Status::external" 4 +.el .IP "\f(CW$SVN::Wc::Status::external\fR" 4 +.IX Item "$SVN::Wc::Status::external" +An unversioned path populated by an svn:externals property. +.ie n .IP "$SVN::Wc::Status::incomplete" 4 +.el .IP "\f(CW$SVN::Wc::Status::incomplete\fR" 4 +.IX Item "$SVN::Wc::Status::incomplete" +A directory doesn't contain a complete entries list. diff --git a/extra/subversion/subversion.rpath.fix.patch b/extra/subversion/subversion.rpath.fix.patch new file mode 100644 index 000000000..ba6ee9e4e --- /dev/null +++ b/extra/subversion/subversion.rpath.fix.patch @@ -0,0 +1,10 @@ +--- Makefile.in.orig 2009-02-16 14:10:48.000000000 -0200 ++++ Makefile.in 2009-06-04 00:56:29.000000000 -0300 +@@ -678,6 +678,7 @@ + + $(SWIG_PL_DIR)/native/Makefile: $(SWIG_PL_DIR)/native/Makefile.PL + cd $(SWIG_PL_DIR)/native; $(PERL) Makefile.PL ++ cd $(SWIG_PL_DIR)/native; sed -i 's|LD_RUN_PATH|DIE_RPATH_DIE|g' Makefile{,.{client,delta,fs,ra,repos,wc}} + + swig-pl_DEPS = autogen-swig-pl libsvn_swig_perl \ + $(SWIG_PL_DIR)/native/Makefile diff --git a/extra/subversion/subversion.suppress.deprecation.warnings.patch b/extra/subversion/subversion.suppress.deprecation.warnings.patch new file mode 100644 index 000000000..94ce89b18 --- /dev/null +++ b/extra/subversion/subversion.suppress.deprecation.warnings.patch @@ -0,0 +1,22 @@ +diff -urN subversion-1.6.9/subversion/bindings/swig/python/svn/core.py subversion-1.6.9-fixed/subversion/bindings/swig/python/svn/core.py +--- subversion-1.6.9/subversion/bindings/swig/python/svn/core.py 2009-02-13 11:22:26.000000000 -0500 ++++ subversion-1.6.9-fixed/subversion/bindings/swig/python/svn/core.py 2010-02-08 07:46:29.000000000 -0500 +@@ -19,6 +19,7 @@ + from libsvn.core import * + import libsvn.core as _libsvncore + import atexit as _atexit ++import warnings + + class SubversionException(Exception): + def __init__(self, message=None, apr_err=None, child=None, +@@ -44,7 +45,9 @@ + Exception.__init__(self, *args) + + self.apr_err = apr_err +- self.message = message ++ with warnings.catch_warnings(): ++ warnings.simplefilter("ignore", DeprecationWarning) ++ self.message = message + self.child = child + self.file = file + self.line = line diff --git a/extra/subversion/svn b/extra/subversion/svn new file mode 100644 index 000000000..8988aaf63 --- /dev/null +++ b/extra/subversion/svn @@ -0,0 +1,11 @@ +service svn +{ + flags = REUSE + socket_type = stream + wait = no + user = root + server = /usr/bin/svnserve + server_args = -i + log_on_failure += USERID + disable = yes +} diff --git a/extra/subversion/svnmerge.py b/extra/subversion/svnmerge.py new file mode 100644 index 000000000..da0594926 --- /dev/null +++ b/extra/subversion/svnmerge.py @@ -0,0 +1,2370 @@ +#!/usr/bin/env python +# -*- coding: utf-8 -*- +# Copyright (c) 2005, Giovanni Bajo +# Copyright (c) 2004-2005, Awarix, Inc. +# All rights reserved. +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation; either version 2 +# of the License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA +# +# Author: Archie Cobbs +# Rewritten in Python by: Giovanni Bajo +# +# Acknowledgments: +# John Belmonte - metadata and usability +# improvements +# Blair Zajac - random improvements +# Raman Gupta - bidirectional and transitive +# merging support +# Dustin J. Mitchell - support for multiple +# location identifier formats +# +# $HeadURL$ +# $LastChangedDate$ +# $LastChangedBy$ +# $LastChangedRevision$ +# +# Requisites: +# svnmerge.py has been tested with all SVN major versions since 1.1 (both +# client and server). It is unknown if it works with previous versions. +# +# Differences from svnmerge.sh: +# - More portable: tested as working in FreeBSD and OS/2. +# - Add double-verbose mode, which shows every svn command executed (-v -v). +# - "svnmerge avail" now only shows commits in source, not also commits in +# other parts of the repository. +# - Add "svnmerge block" to flag some revisions as blocked, so that +# they will not show up anymore in the available list. Added also +# the complementary "svnmerge unblock". +# - "svnmerge avail" has grown two new options: +# -B to display a list of the blocked revisions +# -A to display both the blocked and the available revisions. +# - Improved generated commit message to make it machine parsable even when +# merging commits which are themselves merges. +# - Add --force option to skip working copy check +# - Add --record-only option to "svnmerge merge" to avoid performing +# an actual merge, yet record that a merge happened. +# - Can use a variety of location-identifier formats +# +# TODO: +# - Add "svnmerge avail -R": show logs in reverse order +# +# Information for Hackers: +# +# Identifiers for branches: +# A branch is identified in three ways within this source: +# - as a working copy (variable name usually includes 'dir') +# - as a fully qualified URL +# - as a path identifier (an opaque string indicating a particular path +# in a particular repository; variable name includes 'pathid') +# A "target" is generally user-specified, and may be a working copy or +# a URL. + +import sys, os, getopt, re, types, tempfile, time, locale +from bisect import bisect +from xml.dom import pulldom + +NAME = "svnmerge" +if not hasattr(sys, "version_info") or sys.version_info < (2, 0): + error("requires Python 2.0 or newer") + +# Set up the separator used to separate individual log messages from +# each revision merged into the target location. Also, create a +# regular expression that will find this same separator in already +# committed log messages, so that the separator used for this run of +# svnmerge.py will have one more LOG_SEPARATOR appended to the longest +# separator found in all the commits. +LOG_SEPARATOR = 8 * '.' +LOG_SEPARATOR_RE = re.compile('^((%s)+)' % re.escape(LOG_SEPARATOR), + re.MULTILINE) + +# Each line of the embedded log messages will be prefixed by LOG_LINE_PREFIX. +LOG_LINE_PREFIX = 2 * ' ' + +# Set python to the default locale as per environment settings, same as svn +# TODO we should really parse config and if log-encoding is specified, set +# the locale to match that encoding +locale.setlocale(locale.LC_ALL, '') + +# We want the svn output (such as svn info) to be non-localized +# Using LC_MESSAGES should not affect localized output of svn log, for example +if os.environ.has_key("LC_ALL"): + del os.environ["LC_ALL"] +os.environ["LC_MESSAGES"] = "C" + +############################################################################### +# Support for older Python versions +############################################################################### + +# True/False constants are Python 2.2+ +try: + True, False +except NameError: + True, False = 1, 0 + +def lstrip(s, ch): + """Replacement for str.lstrip (support for arbitrary chars to strip was + added in Python 2.2.2).""" + i = 0 + try: + while s[i] == ch: + i = i+1 + return s[i:] + except IndexError: + return "" + +def rstrip(s, ch): + """Replacement for str.rstrip (support for arbitrary chars to strip was + added in Python 2.2.2).""" + try: + if s[-1] != ch: + return s + i = -2 + while s[i] == ch: + i = i-1 + return s[:i+1] + except IndexError: + return "" + +def strip(s, ch): + """Replacement for str.strip (support for arbitrary chars to strip was + added in Python 2.2.2).""" + return lstrip(rstrip(s, ch), ch) + +def rsplit(s, sep, maxsplits=0): + """Like str.rsplit, which is Python 2.4+ only.""" + L = s.split(sep) + if not 0 < maxsplits <= len(L): + return L + return [sep.join(L[0:-maxsplits])] + L[-maxsplits:] + +############################################################################### + +def kwextract(s): + """Extract info from a svn keyword string.""" + try: + return strip(s, "$").strip().split(": ")[1] + except IndexError: + return "" + +__revision__ = kwextract('$Rev$') +__date__ = kwextract('$Date$') + +# Additional options, not (yet?) mapped to command line flags +default_opts = { + "svn": "svn", + "prop": NAME + "-integrated", + "block-prop": NAME + "-blocked", + "commit-verbose": True, + "verbose": 0, +} +logs = {} + +def console_width(): + """Get the width of the console screen (if any).""" + try: + return int(os.environ["COLUMNS"]) + except (KeyError, ValueError): + pass + + try: + # Call the Windows API (requires ctypes library) + from ctypes import windll, create_string_buffer + h = windll.kernel32.GetStdHandle(-11) + csbi = create_string_buffer(22) + res = windll.kernel32.GetConsoleScreenBufferInfo(h, csbi) + if res: + import struct + (bufx, bufy, + curx, cury, wattr, + left, top, right, bottom, + maxx, maxy) = struct.unpack("hhhhHhhhhhh", csbi.raw) + return right - left + 1 + except ImportError: + pass + + # Parse the output of stty -a + if os.isatty(1): + out = os.popen("stty -a").read() + m = re.search(r"columns (\d+);", out) + if m: + return int(m.group(1)) + + # sensible default + return 80 + +def error(s): + """Subroutine to output an error and bail.""" + print >> sys.stderr, "%s: %s" % (NAME, s) + sys.exit(1) + +def report(s): + """Subroutine to output progress message, unless in quiet mode.""" + if opts["verbose"]: + print "%s: %s" % (NAME, s) + +def prefix_lines(prefix, lines): + """Given a string representing one or more lines of text, insert the + specified prefix at the beginning of each line, and return the result. + The input must be terminated by a newline.""" + assert lines[-1] == "\n" + return prefix + lines[:-1].replace("\n", "\n"+prefix) + "\n" + +def recode_stdout_to_file(s): + if locale.getdefaultlocale()[1] is None or not hasattr(sys.stdout, "encoding") \ + or sys.stdout.encoding is None: + return s + u = s.decode(sys.stdout.encoding) + return u.encode(locale.getdefaultlocale()[1]) + +class LaunchError(Exception): + """Signal a failure in execution of an external command. Parameters are the + exit code of the process, the original command line, and the output of the + command.""" + +try: + """Launch a sub-process. Return its output (both stdout and stderr), + optionally split by lines (if split_lines is True). Raise a LaunchError + exception if the exit code of the process is non-zero (failure). + + This function has two implementations, one based on subprocess (preferred), + and one based on popen (for compatibility). + """ + import subprocess + import shlex + + def launch(cmd, split_lines=True): + # Requiring python 2.4 or higher, on some platforms we get + # much faster performance from the subprocess module (where python + # doesn't try to close an exhorbitant number of file descriptors) + stdout = "" + stderr = "" + try: + if os.name == 'nt': + p = subprocess.Popen(cmd, stdout=subprocess.PIPE, \ + close_fds=False, stderr=subprocess.PIPE) + else: + # Use shlex to break up the parameters intelligently, + # respecting quotes. shlex can't handle unicode. + args = shlex.split(cmd.encode('ascii')) + p = subprocess.Popen(args, stdout=subprocess.PIPE, \ + close_fds=False, stderr=subprocess.PIPE) + stdoutAndErr = p.communicate() + stdout = stdoutAndErr[0] + stderr = stdoutAndErr[1] + except OSError, inst: + # Using 1 as failure code; should get actual number somehow? For + # examples see svnmerge_test.py's TestCase_launch.test_failure and + # TestCase_launch.test_failurecode. + raise LaunchError(1, cmd, stdout + " " + stderr + ": " + str(inst)) + + if p.returncode == 0: + if split_lines: + # Setting keepends=True for compatibility with previous logic + # (where file.readlines() preserves newlines) + return stdout.splitlines(True) + else: + return stdout + else: + raise LaunchError(p.returncode, cmd, stdout + stderr) +except ImportError: + # support versions of python before 2.4 (slower on some systems) + def launch(cmd, split_lines=True): + if os.name not in ['nt', 'os2']: + import popen2 + p = popen2.Popen4(cmd) + p.tochild.close() + if split_lines: + out = p.fromchild.readlines() + else: + out = p.fromchild.read() + ret = p.wait() + if ret == 0: + ret = None + else: + ret >>= 8 + else: + i,k = os.popen4(cmd) + i.close() + if split_lines: + out = k.readlines() + else: + out = k.read() + ret = k.close() + + if ret is None: + return out + raise LaunchError(ret, cmd, out) + +def launchsvn(s, show=False, pretend=False, **kwargs): + """Launch SVN and grab its output.""" + username = password = configdir = "" + if opts.get("username", None): + username = "--username=" + opts["username"] + if opts.get("password", None): + password = "--password=" + opts["password"] + if opts.get("config-dir", None): + configdir = "--config-dir=" + opts["config-dir"] + cmd = ' '.join(filter(None, [opts["svn"], "--non-interactive", + username, password, configdir, s])) + if show or opts["verbose"] >= 2: + print cmd + if pretend: + return None + return launch(cmd, **kwargs) + +def svn_command(s): + """Do (or pretend to do) an SVN command.""" + out = launchsvn(s, show=opts["show-changes"] or opts["dry-run"], + pretend=opts["dry-run"], + split_lines=False) + if not opts["dry-run"]: + print out + +def check_dir_clean(dir): + """Check the current status of dir for local mods.""" + if opts["force"]: + report('skipping status check because of --force') + return + report('checking status of "%s"' % dir) + + # Checking with -q does not show unversioned files or external + # directories. Though it displays a debug message for external + # directories, after a blank line. So, practically, the first line + # matters: if it's non-empty there is a modification. + out = launchsvn("status -q %s" % dir) + if out and out[0].strip(): + error('"%s" has local modifications; it must be clean' % dir) + +class PathIdentifier: + """Abstraction for a path identifier, so that we can start talking + about it before we know the form that it takes in the properties (its + external_form). Objects are referenced in the class variable 'locobjs', + keyed by all known forms.""" + + # a map of UUID (or None) to repository root URL. + repo_hints = {} + + # a map from any known string form to the corresponding PathIdentifier + locobjs = {} + + def __init__(self, repo_relative_path, uuid=None, url=None, external_form=None): + self.repo_relative_path = repo_relative_path + self.uuid = uuid + self.url = url + self.external_form = external_form + + def __repr__(self): + return "' + + def __str__(self): + """Return a printable string representation""" + if self.external_form: + return self.external_form + if self.url: + return self.format('url') + if self.uuid: + return self.format('uuid') + return self.format('path') + + def from_pathid(pathid_str): + """convert pathid_str to a PathIdentifier""" + if not PathIdentifier.locobjs.has_key(pathid_str): + if is_url(pathid_str): + # we can determine every form; PathIdentifier.hint knows how to do that + PathIdentifier.hint(pathid_str) + elif pathid_str[:7] == 'uuid://': + mo = re.match('uuid://([^/]*)(.*)', pathid_str) + if not mo: + error("Invalid path identifier '%s'" % pathid_str) + uuid, repo_relative_path = mo.groups() + pathid = PathIdentifier(repo_relative_path, uuid=uuid) + # we can cache this by uuid:// pathid and by repo-relative path + PathIdentifier.locobjs[pathid_str] = PathIdentifier.locobjs[repo_relative_path] = pathid + elif pathid_str and pathid_str[0] == '/': + # strip any trailing slashes + pathid_str = pathid_str.rstrip('/') + pathid = PathIdentifier(repo_relative_path=pathid_str) + # we can only cache this by repo-relative path + PathIdentifier.locobjs[pathid_str] = pathid + else: + error("Invalid path identifier '%s'" % pathid_str) + return PathIdentifier.locobjs[pathid_str] + from_pathid = staticmethod(from_pathid) + + def from_target(target): + """Convert a target (either a working copy path or an URL) into a + path identifier.""" + # prime the cache first if we don't know about this target yet + if not PathIdentifier.locobjs.has_key(target): + PathIdentifier.hint(target) + + try: + return PathIdentifier.locobjs[target] + except KeyError: + error("Could not recognize path identifier '%s'" % target) + from_target = staticmethod(from_target) + + def hint(target): + """Cache some information about target, as it may be referenced by + repo-relative path in subversion properties; the cache can help to + expand such a relative path to a full path identifier.""" + if PathIdentifier.locobjs.has_key(target): return + if not is_url(target) and not is_wc(target): return + + url = target_to_url(target) + + root = get_repo_root(url) + assert root[-1] != "/" + assert url[:len(root)] == root, "url=%r, root=%r" % (url, root) + repo_relative_path = url[len(root):] + + try: + uuid = get_svninfo(target)['Repository UUID'] + uuid_pathid = 'uuid://%s%s' % (uuid, repo_relative_path) + except KeyError: + uuid = None + uuid_pathid = None + + locobj = PathIdentifier.locobjs.get(url) or \ + (uuid_pathid and PathIdentifier.locobjs.get(uuid_pathid)) + if not locobj: + locobj = PathIdentifier(repo_relative_path, uuid=uuid, url=url) + + PathIdentifier.repo_hints[uuid] = root # (uuid may be None) + + PathIdentifier.locobjs[target] = locobj + PathIdentifier.locobjs[url] = locobj + if uuid_pathid: + PathIdentifier.locobjs[uuid_pathid] = locobj + if not PathIdentifier.locobjs.has_key(repo_relative_path): + PathIdentifier.locobjs[repo_relative_path] = locobj + hint = staticmethod(hint) + + def format(self, fmt): + if fmt == 'path': + return self.repo_relative_path + elif fmt == 'uuid': + return "uuid://%s%s" % (self.uuid, self.repo_relative_path) + elif fmt == 'url': + return self.url + else: + error("Unkonwn path type '%s'" % fmt) + + def match_substring(self, str): + """Test whether str is a substring of any representation of this + PathIdentifier.""" + if self.repo_relative_path.find(str) >= 0: + return True + + if self.uuid: + if ("uuid://%s%s" % (self.uuid, self.repo_relative_path)).find(str) >= 0: + return True + + if self.url: + if (self.url + self.repo_relative_path).find(str) >= 0: + return True + + return False + + def get_url(self): + """Convert a pathid into a URL. If this is not possible, error out.""" + if self.url: + return self.url + # if we have a uuid and happen to know the URL for it, use that + elif self.uuid and PathIdentifier.repo_hints.has_key(self.uuid): + self.url = PathIdentifier.repo_hints[self.uuid] + self.repo_relative_path + PathIdentifier.locobjs[self.url] = self + return self.url + # if we've only seen one rep, use that (a guess, but an educated one) + elif not self.uuid and len(PathIdentifier.repo_hints) == 1: + uuid, root = PathIdentifier.repo_hints.items()[0] + if uuid: + self.uuid = uuid + PathIdentifier.locobjs['uuid://%s%s' % (uuid, self.repo_relative_path)] = self + self.url = root + self.repo_relative_path + PathIdentifier.locobjs[self.url] = self + report("Guessing that '%s' refers to '%s'" % (self, self.url)) + return self.url + else: + error("Cannot determine URL for '%s'; " % self + + "Explicit source argument (-S/--source) required.\n") + +class RevisionLog: + """ + A log of the revisions which affected a given URL between two + revisions. + """ + + def __init__(self, url, begin, end, find_propchanges=False): + """ + Create a new RevisionLog object, which stores, in self.revs, a list + of the revisions which affected the specified URL between begin and + end. If find_propchanges is True, self.propchange_revs will contain a + list of the revisions which changed properties directly on the + specified URL. URL must be the URL for a directory in the repository. + """ + self.url = url + + # Setup the log options (--quiet, so we don't show log messages) + log_opts = '--xml --quiet -r%s:%s "%s"' % (begin, end, url) + if find_propchanges: + # The --verbose flag lets us grab merge tracking information + # by looking at propchanges + log_opts = "--verbose " + log_opts + + # Read the log to look for revision numbers and merge-tracking info + self.revs = [] + self.propchange_revs = [] + repos_pathid = PathIdentifier.from_target(url) + for chg in SvnLogParser(launchsvn("log %s" % log_opts, + split_lines=False)): + self.revs.append(chg.revision()) + for p in chg.paths(): + if p.action() == 'M' and p.pathid() == repos_pathid.repo_relative_path: + self.propchange_revs.append(chg.revision()) + + # Save the range of the log + self.begin = int(begin) + if end == "HEAD": + # If end is not provided, we do not know which is the latest + # revision in the repository. So we set 'end' to the latest + # known revision. + self.end = self.revs[-1] + else: + self.end = int(end) + + self._merges = None + self._blocks = None + + def merge_metadata(self): + """ + Return a VersionedProperty object, with a cached view of the merge + metadata in the range of this log. + """ + + # Load merge metadata if necessary + if not self._merges: + self._merges = VersionedProperty(self.url, opts["prop"]) + self._merges.load(self) + + return self._merges + + def block_metadata(self): + if not self._blocks: + self._blocks = VersionedProperty(self.url, opts["block-prop"]) + self._blocks.load(self) + + return self._blocks + + +class VersionedProperty: + """ + A read-only, cached view of a versioned property. + + self.revs contains a list of the revisions in which the property changes. + self.values stores the new values at each corresponding revision. If the + value of the property is unknown, it is set to None. + + Initially, we set self.revs to [0] and self.values to [None]. This + indicates that, as of revision zero, we know nothing about the value of + the property. + + Later, if you run self.load(log), we cache the value of this property over + the entire range of the log by noting each revision in which the property + was changed. At the end of the range of the log, we invalidate our cache + by adding the value "None" to our cache for any revisions which fall out + of the range of our log. + + Once self.revs and self.values are filled, we can find the value of the + property at any arbitrary revision using a binary search on self.revs. + Once we find the last revision during which the property was changed, + we can lookup the associated value in self.values. (If the associated + value is None, the associated value was not cached and we have to do + a full propget.) + + An example: We know that the 'svnmerge' property was added in r10, and + changed in r21. We gathered log info up until r40. + + revs = [0, 10, 21, 40] + values = [None, "val1", "val2", None] + + What these values say: + - From r0 to r9, we know nothing about the property. + - In r10, the property was set to "val1". This property stayed the same + until r21, when it was changed to "val2". + - We don't know what happened after r40. + """ + + def __init__(self, url, name): + """View the history of a versioned property at URL with name""" + self.url = url + self.name = name + + # We know nothing about the value of the property. Setup revs + # and values to indicate as such. + self.revs = [0] + self.values = [None] + + # We don't have any revisions cached + self._initial_value = None + self._changed_revs = [] + self._changed_values = [] + + def load(self, log): + """ + Load the history of property changes from the specified + RevisionLog object. + """ + + # Get the property value before the range of the log + if log.begin > 1: + self.revs.append(log.begin-1) + try: + self._initial_value = self.raw_get(log.begin-1) + except LaunchError: + # The specified URL might not exist before the + # range of the log. If so, we can safely assume + # that the property was empty at that time. + self._initial_value = { } + self.values.append(self._initial_value) + else: + self._initial_value = { } + self.values[0] = self._initial_value + + # Cache the property values in the log range + old_value = self._initial_value + for rev in log.propchange_revs: + new_value = self.raw_get(rev) + if new_value != old_value: + self._changed_revs.append(rev) + self._changed_values.append(new_value) + self.revs.append(rev) + self.values.append(new_value) + old_value = new_value + + # Indicate that we know nothing about the value of the property + # after the range of the log. + if log.revs: + self.revs.append(log.end+1) + self.values.append(None) + + def raw_get(self, rev=None): + """ + Get the property at revision REV. If rev is not specified, get + the property at revision HEAD. + """ + return get_revlist_prop(self.url, self.name, rev) + + def get(self, rev=None): + """ + Get the property at revision REV. If rev is not specified, get + the property at revision HEAD. + """ + + if rev is not None: + + # Find the index using a binary search + i = bisect(self.revs, rev) - 1 + + # Return the value of the property, if it was cached + if self.values[i] is not None: + return self.values[i] + + # Get the current value of the property + return self.raw_get(rev) + + def changed_revs(self, key=None): + """ + Get a list of the revisions in which the specified dictionary + key was changed in this property. If key is not specified, + return a list of revisions in which any key was changed. + """ + if key is None: + return self._changed_revs + else: + changed_revs = [] + old_val = self._initial_value + for rev, val in zip(self._changed_revs, self._changed_values): + if val.get(key) != old_val.get(key): + changed_revs.append(rev) + old_val = val + return changed_revs + + def initialized_revs(self): + """ + Get a list of the revisions in which keys were added or + removed in this property. + """ + initialized_revs = [] + old_len = len(self._initial_value) + for rev, val in zip(self._changed_revs, self._changed_values): + if len(val) != old_len: + initialized_revs.append(rev) + old_len = len(val) + return initialized_revs + +class RevisionSet: + """ + A set of revisions, held in dictionary form for easy manipulation. If we + were to rewrite this script for Python 2.3+, we would subclass this from + set (or UserSet). As this class does not include branch + information, it's assumed that one instance will be used per + branch. + """ + def __init__(self, parm): + """Constructs a RevisionSet from a string in property form, or from + a dictionary whose keys are the revisions. Raises ValueError if the + input string is invalid.""" + + self._revs = {} + + revision_range_split_re = re.compile('[-:]') + + if isinstance(parm, types.DictType): + self._revs = parm.copy() + elif isinstance(parm, types.ListType): + for R in parm: + self._revs[int(R)] = 1 + else: + parm = parm.strip() + if parm: + for R in parm.split(","): + rev_or_revs = re.split(revision_range_split_re, R) + if len(rev_or_revs) == 1: + self._revs[int(rev_or_revs[0])] = 1 + elif len(rev_or_revs) == 2: + for rev in range(int(rev_or_revs[0]), + int(rev_or_revs[1])+1): + self._revs[rev] = 1 + else: + raise ValueError, 'Ill formatted revision range: ' + R + + def sorted(self): + revnums = self._revs.keys() + revnums.sort() + return revnums + + def normalized(self): + """Returns a normalized version of the revision set, which is an + ordered list of couples (start,end), with the minimum number of + intervals.""" + revnums = self.sorted() + revnums.reverse() + ret = [] + while revnums: + s = e = revnums.pop() + while revnums and revnums[-1] in (e, e+1): + e = revnums.pop() + ret.append((s, e)) + return ret + + def __str__(self): + """Convert the revision set to a string, using its normalized form.""" + L = [] + for s,e in self.normalized(): + if s == e: + L.append(str(s)) + else: + L.append(str(s) + "-" + str(e)) + return ",".join(L) + + def __contains__(self, rev): + return self._revs.has_key(rev) + + def __sub__(self, rs): + """Compute subtraction as in sets.""" + revs = {} + for r in self._revs.keys(): + if r not in rs: + revs[r] = 1 + return RevisionSet(revs) + + def __and__(self, rs): + """Compute intersections as in sets.""" + revs = {} + for r in self._revs.keys(): + if r in rs: + revs[r] = 1 + return RevisionSet(revs) + + def __nonzero__(self): + return len(self._revs) != 0 + + def __len__(self): + """Return the number of revisions in the set.""" + return len(self._revs) + + def __iter__(self): + return iter(self.sorted()) + + def __or__(self, rs): + """Compute set union.""" + revs = self._revs.copy() + revs.update(rs._revs) + return RevisionSet(revs) + +def merge_props_to_revision_set(merge_props, pathid): + """A converter which returns a RevisionSet instance containing the + revisions from PATH as known to BRANCH_PROPS. BRANCH_PROPS is a + dictionary of pathid -> revision set branch integration information + (as returned by get_merge_props()).""" + if not merge_props.has_key(pathid): + error('no integration info available for path "%s"' % pathid) + return RevisionSet(merge_props[pathid]) + +def dict_from_revlist_prop(propvalue): + """Given a property value as a string containing per-source revision + lists, return a dictionary whose key is a source path identifier + and whose value is the revisions for that source.""" + prop = {} + + # Multiple sources are separated by any whitespace. + for L in propvalue.split(): + # We use rsplit to play safe and allow colons in pathids. + pathid_str, revs = rsplit(L.strip(), ":", 1) + + pathid = PathIdentifier.from_pathid(pathid_str) + + # cache the "external" form we saw + pathid.external_form = pathid_str + + prop[pathid] = revs + return prop + +def get_revlist_prop(url_or_dir, propname, rev=None): + """Given a repository URL or working copy path and a property + name, extract the values of the property which store per-source + revision lists and return a dictionary whose key is a source path + identifier, and whose value is the revisions for that source.""" + + # Note that propget does not return an error if the property does + # not exist, it simply does not output anything. So we do not need + # to check for LaunchError here. + args = '--strict "%s" "%s"' % (propname, url_or_dir) + if rev: + args = '-r %s %s' % (rev, args) + out = launchsvn('propget %s' % args, split_lines=False) + + return dict_from_revlist_prop(out) + +def get_merge_props(dir): + """Extract the merged revisions.""" + return get_revlist_prop(dir, opts["prop"]) + +def get_block_props(dir): + """Extract the blocked revisions.""" + return get_revlist_prop(dir, opts["block-prop"]) + +def get_blocked_revs(dir, source_pathid): + p = get_block_props(dir) + if p.has_key(source_pathid): + return RevisionSet(p[source_pathid]) + return RevisionSet("") + +def format_merge_props(props, sep=" "): + """Formats the hash PROPS as a string suitable for use as a + Subversion property value.""" + assert sep in ["\t", "\n", " "] # must be a whitespace + props = props.items() + props.sort() + L = [] + for h, r in props: + L.append("%s:%s" % (h, r)) + return sep.join(L) + +def _run_propset(dir, prop, value): + """Set the property 'prop' of directory 'dir' to value 'value'. We go + through a temporary file to not run into command line length limits.""" + try: + fd, fname = tempfile.mkstemp() + f = os.fdopen(fd, "wb") + except AttributeError: + # Fallback for Python <= 2.3 which does not have mkstemp (mktemp + # suffers from race conditions. Not that we care...) + fname = tempfile.mktemp() + f = open(fname, "wb") + + try: + f.write(value) + f.close() + report("property data written to temp file: %s" % value) + svn_command('propset "%s" -F "%s" "%s"' % (prop, fname, dir)) + finally: + os.remove(fname) + +def set_props(dir, name, props): + props = format_merge_props(props) + if props: + _run_propset(dir, name, props) + else: + # Check if NAME exists on DIR before trying to delete it. + # As of 1.6 propdel no longer supports deleting a + # non-existent property. + out = launchsvn('propget "%s" "%s"' % (name, dir)) + if out: + svn_command('propdel "%s" "%s"' % (name, dir)) + +def set_merge_props(dir, props): + set_props(dir, opts["prop"], props) + +def set_block_props(dir, props): + set_props(dir, opts["block-prop"], props) + +def set_blocked_revs(dir, source_pathid, revs): + props = get_block_props(dir) + if revs: + props[source_pathid] = str(revs) + elif props.has_key(source_pathid): + del props[source_pathid] + set_block_props(dir, props) + +def is_url(url): + """Check if url looks like a valid url.""" + return re.search(r"^[a-zA-Z][-+\.\w]*://[^\s]+$", url) is not None and url[:4] != 'uuid' + +def check_url(url): + """Similar to is_url, but actually invoke get_svninfo to find out""" + return get_svninfo(url) != {} + +def is_pathid(pathid): + return isinstance(pathid, PathIdentifier) + +def is_wc(dir): + """Check if a directory is a working copy.""" + return os.path.isdir(os.path.join(dir, ".svn")) or \ + os.path.isdir(os.path.join(dir, "_svn")) + +_cache_svninfo = {} +def get_svninfo(target): + """Extract the subversion information for a target (through 'svn info'). + This function uses an internal cache to let clients query information + many times.""" + if _cache_svninfo.has_key(target): + return _cache_svninfo[target] + info = {} + for L in launchsvn('info "%s"' % target): + L = L.strip() + if not L: + continue + key, value = L.split(": ", 1) + info[key] = value.strip() + _cache_svninfo[target] = info + return info + +def target_to_url(target): + """Convert working copy path or repos URL to a repos URL.""" + if is_wc(target): + info = get_svninfo(target) + return info["URL"] + return target + +_cache_reporoot = {} +def get_repo_root(target): + """Compute the root repos URL given a working-copy path, or a URL.""" + # Try using "svn info WCDIR". This works only on SVN clients >= 1.3 + if not is_url(target): + try: + info = get_svninfo(target) + root = info["Repository Root"] + _cache_reporoot[root] = None + return root + except KeyError: + pass + url = target_to_url(target) + assert url[-1] != '/' + else: + url = target + + # Go through the cache of the repository roots. This avoids extra + # server round-trips if we are asking the root of different URLs + # in the same repository (the cache in get_svninfo() cannot detect + # that of course and would issue a remote command). + assert is_url(url) + for r in _cache_reporoot: + if url.startswith(r): + return r + + # Try using "svn info URL". This works only on SVN clients >= 1.2 + try: + info = get_svninfo(url) + # info may be {}, in which case we'll see KeyError here + root = info["Repository Root"] + _cache_reporoot[root] = None + return root + except (KeyError, LaunchError): + pass + + # Constrained to older svn clients, we are stuck with this ugly + # trial-and-error implementation. It could be made faster with a + # binary search. + while url: + temp = os.path.dirname(url) + try: + launchsvn('proplist "%s"' % temp) + except LaunchError: + _cache_reporoot[url] = None + return rstrip(url, "/") + url = temp + + error("svn repos root of %s not found" % target) + +class SvnLogParser: + """ + Parse the "svn log", going through the XML output and using pulldom (which + would even allow streaming the command output). + """ + def __init__(self, xml): + self._events = pulldom.parseString(xml) + def __getitem__(self, idx): + for event, node in self._events: + if event == pulldom.START_ELEMENT and node.tagName == "logentry": + self._events.expandNode(node) + return self.SvnLogRevision(node) + raise IndexError, "Could not find 'logentry' tag in xml" + + class SvnLogRevision: + def __init__(self, xmlnode): + self.n = xmlnode + def revision(self): + return int(self.n.getAttribute("revision")) + def author(self): + return self.n.getElementsByTagName("author")[0].firstChild.data + def paths(self): + return [self.SvnLogPath(n) + for n in self.n.getElementsByTagName("path")] + + class SvnLogPath: + def __init__(self, xmlnode): + self.n = xmlnode + def action(self): + return self.n.getAttribute("action") + def pathid(self): + return self.n.firstChild.data + def copyfrom_rev(self): + try: return self.n.getAttribute("copyfrom-rev") + except KeyError: return None + def copyfrom_pathid(self): + try: return self.n.getAttribute("copyfrom-path") + except KeyError: return None + +def get_copyfrom(target): + """Get copyfrom info for a given target (it represents the + repository-relative path from where it was branched). NOTE: + repos root has no copyfrom info. In this case None is returned. + + Returns the: + - source file or directory from which the copy was made + - revision from which that source was copied + - revision in which the copy was committed + """ + repos_path = PathIdentifier.from_target(target).repo_relative_path + for chg in SvnLogParser(launchsvn('log -v --xml --stop-on-copy "%s"' + % target, split_lines=False)): + for p in chg.paths(): + if p.action() == 'A' and p.pathid() == repos_path: + # These values will be None if the corresponding elements are + # not found in the log. + return p.copyfrom_pathid(), p.copyfrom_rev(), chg.revision() + return None,None,None + +def get_latest_rev(url): + """Get the latest revision of the repository of which URL is part.""" + try: + info = get_svninfo(url) + if not info.has_key("Revision"): + error("Not a valid URL: %s" % url) + return info["Revision"] + except LaunchError: + # Alternative method for latest revision checking (for svn < 1.2) + report('checking latest revision of "%s"' % url) + L = launchsvn('proplist --revprop -r HEAD "%s"' % opts["source-url"])[0] + rev = re.search("revision (\d+)", L).group(1) + report('latest revision of "%s" is %s' % (url, rev)) + return rev + +def get_created_rev(url): + """Lookup the revision at which the path identified by the + provided URL was first created.""" + oldest_rev = -1 + report('determining oldest revision for URL "%s"' % url) + ### TODO: Refactor this to use a modified RevisionLog class. + lines = None + cmd = "log -r1:HEAD --stop-on-copy -q " + url + try: + lines = launchsvn(cmd + " --limit=1") + except LaunchError: + # Assume that --limit isn't supported by the installed 'svn'. + lines = launchsvn(cmd) + if lines and len(lines) > 1: + i = lines[1].find(" ") + if i != -1: + oldest_rev = int(lines[1][1:i]) + if oldest_rev == -1: + error('unable to determine oldest revision for URL "%s"' % url) + return oldest_rev + +def get_commit_log(url, revnum): + """Return the log message for a specific integer revision + number.""" + out = launchsvn("log --incremental -r%d %s" % (revnum, url)) + return recode_stdout_to_file("".join(out[1:])) + +def construct_merged_log_message(url, revnums): + """Return a commit log message containing all the commit messages + in the specified revisions at the given URL. The separator used + in this log message is determined by searching for the longest + svnmerge separator existing in the commit log messages and + extending it by one more separator. This results in a new commit + log message that is clearer in describing merges that contain + other merges. Trailing newlines are removed from the embedded + log messages.""" + messages = [''] + longest_sep = '' + for r in revnums.sorted(): + message = get_commit_log(url, r) + if message: + message = re.sub(r'(\r\n|\r|\n)', "\n", message) + message = rstrip(message, "\n") + "\n" + messages.append(prefix_lines(LOG_LINE_PREFIX, message)) + for match in LOG_SEPARATOR_RE.findall(message): + sep = match[1] + if len(sep) > len(longest_sep): + longest_sep = sep + + longest_sep += LOG_SEPARATOR + "\n" + messages.append('') + return longest_sep.join(messages) + +def get_default_source(branch_target, branch_props): + """Return the default source for branch_target (given its branch_props). + Error out if there is ambiguity.""" + if not branch_props: + error("no integration info available") + + props = branch_props.copy() + pathid = PathIdentifier.from_target(branch_target) + + # To make bidirectional merges easier, find the target's + # repository local path so it can be removed from the list of + # possible integration sources. + if props.has_key(pathid): + del props[pathid] + + if len(props) > 1: + err_msg = "multiple sources found. " + err_msg += "Explicit source argument (-S/--source) required.\n" + err_msg += "The merge sources available are:" + for prop in props: + err_msg += "\n " + str(prop) + error(err_msg) + + return props.keys()[0] + +def should_find_reflected(branch_dir): + should_find_reflected = opts["bidirectional"] + + # If the source has integration info for the target, set find_reflected + # even if --bidirectional wasn't specified + if not should_find_reflected: + source_props = get_merge_props(opts["source-url"]) + should_find_reflected = source_props.has_key(PathIdentifier.from_target(branch_dir)) + + return should_find_reflected + +def analyze_revs(target_pathid, url, begin=1, end=None, + find_reflected=False): + """For the source of the merges in the source URL being merged into + target_pathid, analyze the revisions in the interval begin-end (which + defaults to 1-HEAD), to find out which revisions are changes in + the url, which are changes elsewhere (so-called 'phantom' + revisions), optionally which are reflected changes (to avoid + conflicts that can occur when doing bidirectional merging between + branches), and which revisions initialize merge tracking against other + branches. Return a tuple of four RevisionSet's: + (real_revs, phantom_revs, reflected_revs, initialized_revs). + + NOTE: To maximize speed, if "end" is not provided, the function is + not able to find phantom revisions following the last real + revision in the URL. + """ + + begin = str(begin) + if end is None: + end = "HEAD" + else: + end = str(end) + if long(begin) > long(end): + return RevisionSet(""), RevisionSet(""), \ + RevisionSet(""), RevisionSet("") + + logs[url] = RevisionLog(url, begin, end, find_reflected) + revs = RevisionSet(logs[url].revs) + + if end == "HEAD": + # If end is not provided, we do not know which is the latest revision + # in the repository. So return the phantom revision set only up to + # the latest known revision. + end = str(list(revs)[-1]) + + phantom_revs = RevisionSet("%s-%s" % (begin, end)) - revs + + if find_reflected: + reflected_revs = logs[url].merge_metadata().changed_revs(target_pathid) + reflected_revs += logs[url].block_metadata().changed_revs(target_pathid) + else: + reflected_revs = [] + + initialized_revs = RevisionSet(logs[url].merge_metadata().initialized_revs()) + reflected_revs = RevisionSet(reflected_revs) + + return revs, phantom_revs, reflected_revs, initialized_revs + +def analyze_source_revs(branch_target, source_url, **kwargs): + """For the given branch and source, extract the real and phantom + source revisions.""" + branch_url = target_to_url(branch_target) + branch_pathid = PathIdentifier.from_target(branch_target) + + # Extract the latest repository revision from the URL of the branch + # directory (which is already cached at this point). + end_rev = get_latest_rev(source_url) + + # Calculate the base of analysis. If there is a "1-XX" interval in the + # merged_revs, we do not need to check those. + base = 1 + r = opts["merged-revs"].normalized() + if r and r[0][0] == 1: + base = r[0][1] + 1 + + # See if the user filtered the revision set. If so, we are not + # interested in something outside that range. + if opts["revision"]: + revs = RevisionSet(opts["revision"]).sorted() + if base < revs[0]: + base = revs[0] + if end_rev > revs[-1]: + end_rev = revs[-1] + + return analyze_revs(branch_pathid, source_url, base, end_rev, **kwargs) + +def minimal_merge_intervals(revs, phantom_revs): + """Produce the smallest number of intervals suitable for merging. revs + is the RevisionSet which we want to merge, and phantom_revs are phantom + revisions which can be used to concatenate intervals, thus minimizing the + number of operations.""" + revnums = revs.normalized() + ret = [] + + cur = revnums.pop() + while revnums: + next = revnums.pop() + assert next[1] < cur[0] # otherwise it is not ordered + assert cur[0] - next[1] > 1 # otherwise it is not normalized + for i in range(next[1]+1, cur[0]): + if i not in phantom_revs: + ret.append(cur) + cur = next + break + else: + cur = (next[0], cur[1]) + + ret.append(cur) + ret.reverse() + return ret + +def display_revisions(revs, display_style, revisions_msg, source_url): + """Show REVS as dictated by DISPLAY_STYLE, either numerically, in + log format, or as diffs. When displaying revisions numerically, + prefix output with REVISIONS_MSG when in verbose mode. Otherwise, + request logs or diffs using SOURCE_URL.""" + if display_style == "revisions": + if revs: + report(revisions_msg) + print revs + elif display_style == "logs": + for start,end in revs.normalized(): + svn_command('log --incremental -v -r %d:%d %s' % \ + (start, end, source_url)) + elif display_style in ("diffs", "summarize"): + if display_style == 'summarize': + summarize = '--summarize ' + else: + summarize = '' + + for start, end in revs.normalized(): + print + if start == end: + print "%s: changes in revision %d follow" % (NAME, start) + else: + print "%s: changes in revisions %d-%d follow" % (NAME, + start, end) + print + + # Note: the starting revision number to 'svn diff' is + # NOT inclusive so we have to subtract one from ${START}. + svn_command("diff -r %d:%d %s %s" % (start - 1, end, summarize, + source_url)) + else: + assert False, "unhandled display style: %s" % display_style + +def action_init(target_dir, target_props): + """Initialize for merges.""" + # Check that directory is ready for being modified + check_dir_clean(target_dir) + + target_pathid = PathIdentifier.from_target(target_dir) + source_pathid = opts['source-pathid'] + if source_pathid == target_pathid: + error("cannot init integration source path '%s'\nIts path identifier does not " + "differ from the path identifier of the current directory, '%s'." + % (source_pathid, target_pathid)) + + source_url = opts['source-url'] + + # If the user hasn't specified the revisions to use, see if the + # "source" is a copy from the current tree and if so, we can use + # the version data obtained from it. + revision_range = opts["revision"] + if not revision_range: + # If source was originally copied from target, and we are merging + # changes from source to target (the copy target is the merge source, + # and the copy source is the merge target), then we want to mark as + # integrated up to the rev in which the copy was committed which + # created the merge source: + cf_source, cf_rev, copy_committed_in_rev = get_copyfrom(source_url) + + cf_pathid = None + if cf_source: + cf_url = get_repo_root(source_url) + cf_source + if is_url(cf_url) and check_url(cf_url): + cf_pathid = PathIdentifier.from_target(cf_url) + + if target_pathid == cf_pathid: + report('the source "%s" was copied from "%s" in rev %s and committed in rev %s' % + (source_url, target_dir, cf_rev, copy_committed_in_rev)) + revision_range = "1-" + str(copy_committed_in_rev) + + if not revision_range: + # If the reverse is true: copy source is the merge source, and + # the copy target is the merge target, then we want to mark as + # integrated up to the specific rev of the merge target from + # which the merge source was copied. (Longer discussion at: + # http://subversion.tigris.org/issues/show_bug.cgi?id=2810 ) + cf_source, cf_rev, copy_committed_in_rev = get_copyfrom(target_dir) + + cf_pathid = None + if cf_source: + cf_url = get_repo_root(target_dir) + cf_source + if is_url(cf_url) and check_url(cf_url): + cf_pathid = PathIdentifier.from_target(cf_url) + + source_pathid = PathIdentifier.from_target(source_url) + if source_pathid == cf_pathid: + report('the target "%s" was copied the source "%s" in rev %s and committed in rev %s' % + (target_dir, source_url, cf_rev, copy_committed_in_rev)) + revision_range = "1-" + cf_rev + + # When neither the merge source nor target is a copy of the other, and + # the user did not specify a revision range, then choose a default which is + # the current revision; saying, in effect, "everything has been merged, so + # mark as integrated up to the latest rev on source url). + if not revision_range: + revision_range = "1-" + get_latest_rev(source_url) + + revs = RevisionSet(revision_range) + + report('marking "%s" as already containing revisions "%s" of "%s"' % + (target_dir, revs, source_url)) + + revs = str(revs) + # If the local svnmerge-integrated property already has an entry + # for the source-pathid, simply error out. + if not opts["force"] and target_props.has_key(source_pathid): + error('Repository-relative path %s has already been initialized at %s\n' + 'Use --force to re-initialize' % (source_pathid, target_dir)) + # set the pathid's external_form based on the user's options + source_pathid.external_form = source_pathid.format(opts['location-type']) + + revs = str(revs) + target_props[source_pathid] = revs + + # Set property + set_merge_props(target_dir, target_props) + + # Write out commit message if desired + if opts["commit-file"]: + f = open(opts["commit-file"], "w") + print >>f, 'Initialized merge tracking via "%s" with revisions "%s" from ' \ + % (NAME, revs) + print >>f, '%s' % source_url + f.close() + report('wrote commit message to "%s"' % opts["commit-file"]) + +def action_avail(branch_dir, branch_props): + """Show commits available for merges.""" + source_revs, phantom_revs, reflected_revs, initialized_revs = \ + analyze_source_revs(branch_dir, opts["source-url"], + find_reflected= + should_find_reflected(branch_dir)) + report('skipping phantom revisions: %s' % phantom_revs) + if reflected_revs: + report('skipping reflected revisions: %s' % reflected_revs) + report('skipping initialized revisions: %s' % initialized_revs) + + blocked_revs = get_blocked_revs(branch_dir, opts["source-pathid"]) + avail_revs = source_revs - opts["merged-revs"] - blocked_revs - \ + reflected_revs - initialized_revs + + # Compose the set of revisions to show + revs = RevisionSet("") + report_msg = "revisions available to be merged are:" + if "avail" in opts["avail-showwhat"]: + revs |= avail_revs + if "blocked" in opts["avail-showwhat"]: + revs |= blocked_revs + report_msg = "revisions blocked are:" + + # Limit to revisions specified by -r (if any) + if opts["revision"]: + revs = revs & RevisionSet(opts["revision"]) + + display_revisions(revs, opts["avail-display"], + report_msg, + opts["source-url"]) + +def action_integrated(branch_dir, branch_props): + """Show change sets already merged. This set of revisions is + calculated from taking svnmerge-integrated property from the + branch, and subtracting any revision older than the branch + creation revision.""" + # Extract the integration info for the branch_dir + branch_props = get_merge_props(branch_dir) + revs = merge_props_to_revision_set(branch_props, opts["source-pathid"]) + + # Lookup the oldest revision on the branch path. + oldest_src_rev = get_created_rev(opts["source-url"]) + + # Subtract any revisions which pre-date the branch. + report("subtracting revisions which pre-date the source URL (%d)" % + oldest_src_rev) + revs = revs - RevisionSet(range(1, oldest_src_rev)) + + # Limit to revisions specified by -r (if any) + if opts["revision"]: + revs = revs & RevisionSet(opts["revision"]) + + display_revisions(revs, opts["integrated-display"], + "revisions already integrated are:", opts["source-url"]) + +def action_merge(branch_dir, branch_props): + """Record merge meta data, and do the actual merge (if not + requested otherwise via --record-only).""" + # Check branch directory is ready for being modified + check_dir_clean(branch_dir) + + source_revs, phantom_revs, reflected_revs, initialized_revs = \ + analyze_source_revs(branch_dir, opts["source-url"], + find_reflected= + should_find_reflected(branch_dir)) + + if opts["revision"]: + revs = RevisionSet(opts["revision"]) + else: + revs = source_revs + + blocked_revs = get_blocked_revs(branch_dir, opts["source-pathid"]) + merged_revs = opts["merged-revs"] + + # Show what we're doing + if opts["verbose"]: # just to avoid useless calculations + if merged_revs & revs: + report('"%s" already contains revisions %s' % (branch_dir, + merged_revs & revs)) + if phantom_revs: + report('memorizing phantom revision(s): %s' % phantom_revs) + if reflected_revs: + report('memorizing reflected revision(s): %s' % reflected_revs) + if blocked_revs & revs: + report('skipping blocked revisions(s): %s' % (blocked_revs & revs)) + if initialized_revs: + report('skipping initialized revision(s): %s' % initialized_revs) + + # Compute final merge set. + revs = revs - merged_revs - blocked_revs - reflected_revs - \ + phantom_revs - initialized_revs + if not revs: + report('no revisions to merge, exiting') + return + + # When manually marking revisions as merged, we only update the + # integration meta data, and don't perform an actual merge. + record_only = opts["record-only"] + + if record_only: + report('recording merge of revision(s) %s from "%s"' % + (revs, opts["source-url"])) + else: + report('merging in revision(s) %s from "%s"' % + (revs, opts["source-url"])) + + # Do the merge(s). Note: the starting revision number to 'svn merge' + # is NOT inclusive so we have to subtract one from start. + # We try to keep the number of merge operations as low as possible, + # because it is faster and reduces the number of conflicts. + old_block_props = get_block_props(branch_dir) + merge_metadata = logs[opts["source-url"]].merge_metadata() + block_metadata = logs[opts["source-url"]].block_metadata() + for start,end in minimal_merge_intervals(revs, phantom_revs): + if not record_only: + # Preset merge/blocked properties to the source value at + # the start rev to avoid spurious property conflicts + set_merge_props(branch_dir, merge_metadata.get(start - 1)) + set_block_props(branch_dir, block_metadata.get(start - 1)) + # Do the merge + svn_command("merge --force -r %d:%d %s %s" % \ + (start - 1, end, opts["source-url"], branch_dir)) + # TODO: to support graph merging, add logic to merge the property + # meta-data manually + + # Update the set of merged revisions. + merged_revs = merged_revs | revs | reflected_revs | phantom_revs | initialized_revs + branch_props[opts["source-pathid"]] = str(merged_revs) + set_merge_props(branch_dir, branch_props) + # Reset the blocked revs + set_block_props(branch_dir, old_block_props) + + # Write out commit message if desired + if opts["commit-file"]: + f = open(opts["commit-file"], "w") + if record_only: + print >>f, 'Recorded merge of revisions %s via %s from ' % \ + (revs, NAME) + else: + print >>f, 'Merged revisions %s via %s from ' % \ + (revs, NAME) + print >>f, '%s' % opts["source-url"] + if opts["commit-verbose"]: + print >>f + print >>f, construct_merged_log_message(opts["source-url"], revs), + + f.close() + report('wrote commit message to "%s"' % opts["commit-file"]) + +def action_block(branch_dir, branch_props): + """Block revisions.""" + # Check branch directory is ready for being modified + check_dir_clean(branch_dir) + + source_revs, phantom_revs, reflected_revs, initialized_revs = \ + analyze_source_revs(branch_dir, opts["source-url"]) + revs_to_block = source_revs - opts["merged-revs"] + + # Limit to revisions specified by -r (if any) + if opts["revision"]: + revs_to_block = RevisionSet(opts["revision"]) & revs_to_block + + if not revs_to_block: + error('no available revisions to block') + + # Change blocked information + blocked_revs = get_blocked_revs(branch_dir, opts["source-pathid"]) + blocked_revs = blocked_revs | revs_to_block + set_blocked_revs(branch_dir, opts["source-pathid"], blocked_revs) + + # Write out commit message if desired + if opts["commit-file"]: + f = open(opts["commit-file"], "w") + print >>f, 'Blocked revisions %s via %s' % (revs_to_block, NAME) + if opts["commit-verbose"]: + print >>f + print >>f, construct_merged_log_message(opts["source-url"], + revs_to_block), + + f.close() + report('wrote commit message to "%s"' % opts["commit-file"]) + +def action_unblock(branch_dir, branch_props): + """Unblock revisions.""" + # Check branch directory is ready for being modified + check_dir_clean(branch_dir) + + blocked_revs = get_blocked_revs(branch_dir, opts["source-pathid"]) + revs_to_unblock = blocked_revs + + # Limit to revisions specified by -r (if any) + if opts["revision"]: + revs_to_unblock = revs_to_unblock & RevisionSet(opts["revision"]) + + if not revs_to_unblock: + error('no available revisions to unblock') + + # Change blocked information + blocked_revs = blocked_revs - revs_to_unblock + set_blocked_revs(branch_dir, opts["source-pathid"], blocked_revs) + + # Write out commit message if desired + if opts["commit-file"]: + f = open(opts["commit-file"], "w") + print >>f, 'Unblocked revisions %s via %s' % (revs_to_unblock, NAME) + if opts["commit-verbose"]: + print >>f + print >>f, construct_merged_log_message(opts["source-url"], + revs_to_unblock), + f.close() + report('wrote commit message to "%s"' % opts["commit-file"]) + +def action_rollback(branch_dir, branch_props): + """Rollback previously integrated revisions.""" + + # Make sure the revision arguments are present + if not opts["revision"]: + error("The '-r' option is mandatory for rollback") + + # Check branch directory is ready for being modified + check_dir_clean(branch_dir) + + # Extract the integration info for the branch_dir + branch_props = get_merge_props(branch_dir) + # Get the list of all revisions already merged into this source-pathid. + merged_revs = merge_props_to_revision_set(branch_props, + opts["source-pathid"]) + + # At which revision was the src created? + oldest_src_rev = get_created_rev(opts["source-url"]) + src_pre_exist_range = RevisionSet("1-%d" % oldest_src_rev) + + # Limit to revisions specified by -r (if any) + revs = merged_revs & RevisionSet(opts["revision"]) + + # make sure there's some revision to rollback + if not revs: + report("Nothing to rollback in revision range r%s" % opts["revision"]) + return + + # If even one specified revision lies outside the lifetime of the + # merge source, error out. + if revs & src_pre_exist_range: + err_str = "Specified revision range falls out of the rollback range.\n" + err_str += "%s was created at r%d" % (opts["source-pathid"], + oldest_src_rev) + error(err_str) + + record_only = opts["record-only"] + + if record_only: + report('recording rollback of revision(s) %s from "%s"' % + (revs, opts["source-url"])) + else: + report('rollback of revision(s) %s from "%s"' % + (revs, opts["source-url"])) + + # Do the reverse merge(s). Note: the starting revision number + # to 'svn merge' is NOT inclusive so we have to subtract one from start. + # We try to keep the number of merge operations as low as possible, + # because it is faster and reduces the number of conflicts. + rollback_intervals = minimal_merge_intervals(revs, []) + # rollback in the reverse order of merge + rollback_intervals.reverse() + for start, end in rollback_intervals: + if not record_only: + # Do the merge + svn_command("merge --force -r %d:%d %s %s" % \ + (end, start - 1, opts["source-url"], branch_dir)) + + # Write out commit message if desired + # calculate the phantom revs first + if opts["commit-file"]: + f = open(opts["commit-file"], "w") + if record_only: + print >>f, 'Recorded rollback of revisions %s via %s from ' % \ + (revs , NAME) + else: + print >>f, 'Rolled back revisions %s via %s from ' % \ + (revs , NAME) + print >>f, '%s' % opts["source-url"] + + f.close() + report('wrote commit message to "%s"' % opts["commit-file"]) + + # Update the set of merged revisions. + merged_revs = merged_revs - revs + branch_props[opts["source-pathid"]] = str(merged_revs) + set_merge_props(branch_dir, branch_props) + +def action_uninit(branch_dir, branch_props): + """Uninit SOURCE URL.""" + # Check branch directory is ready for being modified + check_dir_clean(branch_dir) + + # If the source-pathid does not have an entry in the svnmerge-integrated + # property, simply error out. + if not branch_props.has_key(opts["source-pathid"]): + error('Repository-relative path "%s" does not contain merge ' + 'tracking information for "%s"' \ + % (opts["source-pathid"], branch_dir)) + + del branch_props[opts["source-pathid"]] + + # Set merge property with the selected source deleted + set_merge_props(branch_dir, branch_props) + + # Set blocked revisions for the selected source to None + set_blocked_revs(branch_dir, opts["source-pathid"], None) + + # Write out commit message if desired + if opts["commit-file"]: + f = open(opts["commit-file"], "w") + print >>f, 'Removed merge tracking for "%s" for ' % NAME + print >>f, '%s' % opts["source-url"] + f.close() + report('wrote commit message to "%s"' % opts["commit-file"]) + +############################################################################### +# Command line parsing -- options and commands management +############################################################################### + +class OptBase: + def __init__(self, *args, **kwargs): + self.help = kwargs["help"] + del kwargs["help"] + self.lflags = [] + self.sflags = [] + for a in args: + if a.startswith("--"): self.lflags.append(a) + elif a.startswith("-"): self.sflags.append(a) + else: + raise TypeError, "invalid flag name: %s" % a + if kwargs.has_key("dest"): + self.dest = kwargs["dest"] + del kwargs["dest"] + else: + if not self.lflags: + raise TypeError, "cannot deduce dest name without long options" + self.dest = self.lflags[0][2:] + if kwargs: + raise TypeError, "invalid keyword arguments: %r" % kwargs.keys() + def repr_flags(self): + f = self.sflags + self.lflags + r = f[0] + for fl in f[1:]: + r += " [%s]" % fl + return r + +class Option(OptBase): + def __init__(self, *args, **kwargs): + self.default = kwargs.setdefault("default", 0) + del kwargs["default"] + self.value = kwargs.setdefault("value", None) + del kwargs["value"] + OptBase.__init__(self, *args, **kwargs) + def apply(self, state, value): + assert value == "" + if self.value is not None: + state[self.dest] = self.value + else: + state[self.dest] += 1 + +class OptionArg(OptBase): + def __init__(self, *args, **kwargs): + self.default = kwargs["default"] + del kwargs["default"] + self.metavar = kwargs.setdefault("metavar", None) + del kwargs["metavar"] + OptBase.__init__(self, *args, **kwargs) + + if self.metavar is None: + if self.dest is not None: + self.metavar = self.dest.upper() + else: + self.metavar = "arg" + if self.default: + self.help += " (default: %s)" % self.default + def apply(self, state, value): + assert value is not None + state[self.dest] = value + def repr_flags(self): + r = OptBase.repr_flags(self) + return r + " " + self.metavar + +class CommandOpts: + class Cmd: + def __init__(self, *args): + self.name, self.func, self.usage, self.help, self.opts = args + def short_help(self): + return self.help.split(".")[0] + def __str__(self): + return self.name + def __call__(self, *args, **kwargs): + return self.func(*args, **kwargs) + + def __init__(self, global_opts, common_opts, command_table, version=None): + self.progname = NAME + self.version = version.replace("%prog", self.progname) + self.cwidth = console_width() - 2 + self.ctable = command_table.copy() + self.gopts = global_opts[:] + self.copts = common_opts[:] + self._add_builtins() + for k in self.ctable.keys(): + cmd = self.Cmd(k, *self.ctable[k]) + opts = [] + for o in cmd.opts: + if isinstance(o, types.StringType) or \ + isinstance(o, types.UnicodeType): + o = self._find_common(o) + opts.append(o) + cmd.opts = opts + self.ctable[k] = cmd + + def _add_builtins(self): + self.gopts.append( + Option("-h", "--help", help="show help for this command and exit")) + if self.version is not None: + self.gopts.append( + Option("-V", "--version", help="show version info and exit")) + self.ctable["help"] = (self._cmd_help, + "help [COMMAND]", + "Display help for a specific command. If COMMAND is omitted, " + "display brief command description.", + []) + + def _cmd_help(self, cmd=None, *args): + if args: + self.error("wrong number of arguments", "help") + if cmd is not None: + cmd = self._command(cmd) + self.print_command_help(cmd) + else: + self.print_command_list() + + def _paragraph(self, text, width=78): + chunks = re.split("\s+", text.strip()) + chunks.reverse() + lines = [] + while chunks: + L = chunks.pop() + while chunks and len(L) + len(chunks[-1]) + 1 <= width: + L += " " + chunks.pop() + lines.append(L) + return lines + + def _paragraphs(self, text, *args, **kwargs): + pars = text.split("\n\n") + lines = self._paragraph(pars[0], *args, **kwargs) + for p in pars[1:]: + lines.append("") + lines.extend(self._paragraph(p, *args, **kwargs)) + return lines + + def _print_wrapped(self, text, indent=0): + text = self._paragraphs(text, self.cwidth - indent) + print text.pop(0) + for t in text: + print " " * indent + t + + def _find_common(self, fl): + for o in self.copts: + if fl in o.lflags+o.sflags: + return o + assert False, fl + + def _compute_flags(self, opts, check_conflicts=True): + back = {} + sfl = "" + lfl = [] + for o in opts: + sapp = lapp = "" + if isinstance(o, OptionArg): + sapp, lapp = ":", "=" + for s in o.sflags: + if check_conflicts and back.has_key(s): + raise RuntimeError, "option conflict: %s" % s + back[s] = o + sfl += s[1:] + sapp + for l in o.lflags: + if check_conflicts and back.has_key(l): + raise RuntimeError, "option conflict: %s" % l + back[l] = o + lfl.append(l[2:] + lapp) + return sfl, lfl, back + + def _extract_command(self, args): + """ + Try to extract the command name from the argument list. This is + non-trivial because we want to allow command-specific options even + before the command itself. + """ + opts = self.gopts[:] + for cmd in self.ctable.values(): + opts.extend(cmd.opts) + sfl, lfl, _ = self._compute_flags(opts, check_conflicts=False) + + lopts,largs = getopt.getopt(args, sfl, lfl) + if not largs: + return None + return self._command(largs[0]) + + def _fancy_getopt(self, args, opts, state=None): + if state is None: + state= {} + for o in opts: + if not state.has_key(o.dest): + state[o.dest] = o.default + + sfl, lfl, back = self._compute_flags(opts) + try: + lopts,args = getopt.gnu_getopt(args, sfl, lfl) + except AttributeError: + # Before Python 2.3, there was no gnu_getopt support. + # So we can't parse intermixed positional arguments + # and options. + lopts,args = getopt.getopt(args, sfl, lfl) + + for o,v in lopts: + back[o].apply(state, v) + return state, args + + def _command(self, cmd): + if not self.ctable.has_key(cmd): + self.error("unknown command: '%s'" % cmd) + return self.ctable[cmd] + + def parse(self, args): + if not args: + self.print_small_help() + sys.exit(0) + + cmd = None + try: + cmd = self._extract_command(args) + opts = self.gopts[:] + if cmd: + opts.extend(cmd.opts) + args.remove(cmd.name) + state, args = self._fancy_getopt(args, opts) + except getopt.GetoptError, e: + self.error(e, cmd) + + # Handle builtins + if self.version is not None and state["version"]: + self.print_version() + sys.exit(0) + if state["help"]: # special case for --help + if cmd: + self.print_command_help(cmd) + sys.exit(0) + cmd = self.ctable["help"] + else: + if cmd is None: + self.error("command argument required") + if str(cmd) == "help": + cmd(*args) + sys.exit(0) + return cmd, args, state + + def error(self, s, cmd=None): + print >>sys.stderr, "%s: %s" % (self.progname, s) + if cmd is not None: + self.print_command_help(cmd) + else: + self.print_small_help() + sys.exit(1) + def print_small_help(self): + print "Type '%s help' for usage" % self.progname + def print_usage_line(self): + print "usage: %s [options...] [args...]\n" % self.progname + def print_command_list(self): + print "Available commands (use '%s help COMMAND' for more details):\n" \ + % self.progname + cmds = self.ctable.keys() + cmds.sort() + indent = max(map(len, cmds)) + for c in cmds: + h = self.ctable[c].short_help() + print " %-*s " % (indent, c), + self._print_wrapped(h, indent+6) + def print_command_help(self, cmd): + cmd = self.ctable[str(cmd)] + print 'usage: %s %s\n' % (self.progname, cmd.usage) + self._print_wrapped(cmd.help) + def print_opts(opts, self=self): + if not opts: return + flags = [o.repr_flags() for o in opts] + indent = max(map(len, flags)) + for f,o in zip(flags, opts): + print " %-*s :" % (indent, f), + self._print_wrapped(o.help, indent+5) + print '\nCommand options:' + print_opts(cmd.opts) + print '\nGlobal options:' + print_opts(self.gopts) + + def print_version(self): + print self.version + +############################################################################### +# Options and Commands description +############################################################################### + +global_opts = [ + Option("-F", "--force", + help="force operation even if the working copy is not clean, or " + "there are pending updates"), + Option("-n", "--dry-run", + help="don't actually change anything, just pretend; " + "implies --show-changes"), + Option("-s", "--show-changes", + help="show subversion commands that make changes"), + Option("-v", "--verbose", + help="verbose mode: output more information about progress"), + OptionArg("-u", "--username", + default=None, + help="invoke subversion commands with the supplied username"), + OptionArg("-p", "--password", + default=None, + help="invoke subversion commands with the supplied password"), + OptionArg("-c", "--config-dir", metavar="DIR", + default=None, + help="cause subversion commands to consult runtime config directory DIR"), +] + +common_opts = [ + Option("-b", "--bidirectional", + value=True, + default=False, + help="remove reflected and initialized revisions from merge candidates. " + "Not required but may be specified to speed things up slightly"), + OptionArg("-f", "--commit-file", metavar="FILE", + default="svnmerge-commit-message.txt", + help="set the name of the file where the suggested log message " + "is written to"), + Option("-M", "--record-only", + value=True, + default=False, + help="do not perform an actual merge of the changes, yet record " + "that a merge happened"), + OptionArg("-r", "--revision", + metavar="REVLIST", + default="", + help="specify a revision list, consisting of revision numbers " + 'and ranges separated by commas, e.g., "534,537-539,540"'), + OptionArg("-S", "--source", "--head", + default=None, + help="specify a merge source for this branch. It can be either " + "a working directory path, a full URL, or an unambiguous " + "substring of one of the locations for which merge tracking was " + "already initialized. Needed only to disambiguate in case of " + "multiple merge sources"), +] + +command_table = { + "init": (action_init, + "init [OPTION...] [SOURCE]", + """Initialize merge tracking from SOURCE on the current working + directory. + + If SOURCE is specified, all the revisions in SOURCE are marked as already + merged; if this is not correct, you can use --revision to specify the + exact list of already-merged revisions. + + If SOURCE is omitted, then it is computed from the "svn cp" history of the + current working directory (searching back for the branch point); in this + case, %s assumes that no revision has been integrated yet since + the branch point (unless you teach it with --revision).""" % NAME, + [ + "-f", "-r", # import common opts + OptionArg("-L", "--location-type", + dest="location-type", + default="path", + help="Use this type of location identifier in the new " + + "Subversion properties; 'uuid', 'url', or 'path' " + + "(default)"), + ]), + + "avail": (action_avail, + "avail [OPTION...] [PATH]", + """Show unmerged revisions available for PATH as a revision list. + If --revision is given, the revisions shown will be limited to those + also specified in the option. + + When svnmerge is used to bidirectionally merge changes between a + branch and its source, it is necessary to not merge the same changes + forth and back: e.g., if you committed a merge of a certain + revision of the branch into the source, you do not want that commit + to appear as available to merged into the branch (as the code + originated in the branch itself!). svnmerge will automatically + exclude these so-called "reflected" revisions.""", + [ + Option("-A", "--all", + dest="avail-showwhat", + value=["blocked", "avail"], + default=["avail"], + help="show both available and blocked revisions (aka ignore " + "blocked revisions)"), + "-b", + Option("-B", "--blocked", + dest="avail-showwhat", + value=["blocked"], + help="show the blocked revision list (see '%s block')" % NAME), + Option("-d", "--diff", + dest="avail-display", + value="diffs", + default="revisions", + help="show corresponding diff instead of revision list"), + Option("--summarize", + dest="avail-display", + value="summarize", + help="show summarized diff instead of revision list"), + Option("-l", "--log", + dest="avail-display", + value="logs", + help="show corresponding log history instead of revision list"), + "-r", + "-S", + ]), + + "integrated": (action_integrated, + "integrated [OPTION...] [PATH]", + """Show merged revisions available for PATH as a revision list. + If --revision is given, the revisions shown will be limited to + those also specified in the option.""", + [ + Option("-d", "--diff", + dest="integrated-display", + value="diffs", + default="revisions", + help="show corresponding diff instead of revision list"), + Option("-l", "--log", + dest="integrated-display", + value="logs", + help="show corresponding log history instead of revision list"), + "-r", + "-S", + ]), + + "rollback": (action_rollback, + "rollback [OPTION...] [PATH]", + """Rollback previously merged in revisions from PATH. The + --revision option is mandatory, and specifies which revisions + will be rolled back. Only the previously integrated merges + will be rolled back. + + When manually rolling back changes, --record-only can be used to + instruct %s that a manual rollback of a certain revision + already happened, so that it can record it and offer that + revision for merge henceforth.""" % (NAME), + [ + "-f", "-r", "-S", "-M", # import common opts + ]), + + "merge": (action_merge, + "merge [OPTION...] [PATH]", + """Merge in revisions into PATH from its source. If --revision is omitted, + all the available revisions will be merged. In any case, already merged-in + revisions will NOT be merged again. + + When svnmerge is used to bidirectionally merge changes between a + branch and its source, it is necessary to not merge the same changes + forth and back: e.g., if you committed a merge of a certain + revision of the branch into the source, you do not want that commit + to appear as available to merged into the branch (as the code + originated in the branch itself!). svnmerge will automatically + exclude these so-called "reflected" revisions. + + When manually merging changes across branches, --record-only can + be used to instruct %s that a manual merge of a certain revision + already happened, so that it can record it and not offer that + revision for merge anymore. Conversely, when there are revisions + which should not be merged, use '%s block'.""" % (NAME, NAME), + [ + "-b", "-f", "-r", "-S", "-M", # import common opts + ]), + + "block": (action_block, + "block [OPTION...] [PATH]", + """Block revisions within PATH so that they disappear from the available + list. This is useful to hide revisions which will not be integrated. + If --revision is omitted, it defaults to all the available revisions. + + Do not use this option to hide revisions that were manually merged + into the branch. Instead, use '%s merge --record-only', which + records that a merge happened (as opposed to a merge which should + not happen).""" % NAME, + [ + "-f", "-r", "-S", # import common opts + ]), + + "unblock": (action_unblock, + "unblock [OPTION...] [PATH]", + """Revert the effect of '%s block'. If --revision is omitted, all the + blocked revisions are unblocked""" % NAME, + [ + "-f", "-r", "-S", # import common opts + ]), + + "uninit": (action_uninit, + "uninit [OPTION...] [PATH]", + """Remove merge tracking information from PATH. It cleans any kind of merge + tracking information (including the list of blocked revisions). If there + are multiple sources, use --source to indicate which source you want to + forget about.""", + [ + "-f", "-S", # import common opts + ]), +} + + +def main(args): + global opts + + # Initialize default options + opts = default_opts.copy() + logs.clear() + + optsparser = CommandOpts(global_opts, common_opts, command_table, + version="%%prog r%s\n modified: %s\n\n" + "Copyright (C) 2004,2005 Awarix Inc.\n" + "Copyright (C) 2005, Giovanni Bajo" + % (__revision__, __date__)) + + cmd, args, state = optsparser.parse(args) + opts.update(state) + + source = opts.get("source", None) + branch_dir = "." + + if str(cmd) == "init": + if len(args) == 1: + source = args[0] + elif len(args) > 1: + optsparser.error("wrong number of parameters", cmd) + elif str(cmd) in command_table.keys(): + if len(args) == 1: + branch_dir = args[0] + elif len(args) > 1: + optsparser.error("wrong number of parameters", cmd) + else: + assert False, "command not handled: %s" % cmd + + # Validate branch_dir + if not is_wc(branch_dir): + if str(cmd) == "avail": + info = None + # it should be noted here that svn info does not error exit + # if an invalid target is specified to it (as is + # intuitive). so the try, except code is not absolutely + # necessary. but, I retain it to indicate the intuitive + # handling. + try: + info = get_svninfo(branch_dir) + except LaunchError: + pass + # test that we definitely targeted a subversion directory, + # mirroring the purpose of the earlier is_wc() call + if info is None or not info.has_key("Node Kind") or info["Node Kind"] != "directory": + error('"%s" is neither a valid URL, nor a working directory' % branch_dir) + else: + error('"%s" is not a subversion working directory' % branch_dir) + + # give out some hints as to potential pathids + PathIdentifier.hint(branch_dir) + if source: PathIdentifier.hint(source) + + # Extract the integration info for the branch_dir + branch_props = get_merge_props(branch_dir) + + # Calculate source_url and source_path + report("calculate source path for the branch") + if not source: + if str(cmd) == "init": + cf_source, cf_rev, copy_committed_in_rev = get_copyfrom(branch_dir) + if not cf_source: + error('no copyfrom info available. ' + 'Explicit source argument (-S/--source) required.') + opts["source-url"] = get_repo_root(branch_dir) + cf_source + opts["source-pathid"] = PathIdentifier.from_target(opts["source-url"]) + + if not opts["revision"]: + opts["revision"] = "1-" + cf_rev + else: + opts["source-pathid"] = get_default_source(branch_dir, branch_props) + opts["source-url"] = opts["source-pathid"].get_url() + + assert is_pathid(opts["source-pathid"]) + assert is_url(opts["source-url"]) + else: + # The source was given as a command line argument and is stored in + # SOURCE. Ensure that the specified source does not end in a /, + # otherwise it's easy to have the same source path listed more + # than once in the integrated version properties, with and without + # trailing /'s. + source = rstrip(source, "/") + if not is_wc(source) and not is_url(source): + # Check if it is a substring of a pathid recorded + # within the branch properties. + found = [] + for pathid in branch_props.keys(): + if pathid.match_substring(source): + found.append(pathid) + if len(found) == 1: + # (assumes pathid is a repository-relative-path) + source_pathid = found[0] + source = source_pathid.get_url() + else: + error('"%s" is neither a valid URL, nor an unambiguous ' + 'substring of a repository path, nor a working directory' + % source) + else: + source_pathid = PathIdentifier.from_target(source) + + source_pathid = PathIdentifier.from_target(source) + if str(cmd) == "init" and \ + source_pathid == PathIdentifier.from_target("."): + error("cannot init integration source path '%s'\n" + "Its repository-relative path must differ from the " + "repository-relative path of the current directory." + % source_pathid) + opts["source-pathid"] = source_pathid + opts["source-url"] = target_to_url(source) + + # Sanity check source_url + assert is_url(opts["source-url"]) + # SVN does not support non-normalized URL (and we should not + # have created them) + assert opts["source-url"].find("/..") < 0 + + report('source is "%s"' % opts["source-url"]) + + # Get previously merged revisions (except when command is init) + if str(cmd) != "init": + opts["merged-revs"] = merge_props_to_revision_set(branch_props, + opts["source-pathid"]) + + # Perform the action + cmd(branch_dir, branch_props) + + +if __name__ == "__main__": + try: + main(sys.argv[1:]) + except LaunchError, (ret, cmd, out): + err_msg = "command execution failed (exit code: %d)\n" % ret + err_msg += cmd + "\n" + err_msg += "".join(out) + error(err_msg) + except KeyboardInterrupt: + # Avoid traceback on CTRL+C + print "aborted by user" + sys.exit(1) diff --git a/extra/subversion/svnserve b/extra/subversion/svnserve new file mode 100755 index 000000000..670fee742 --- /dev/null +++ b/extra/subversion/svnserve @@ -0,0 +1,42 @@ +#!/bin/bash + +. /etc/rc.conf +. /etc/rc.d/functions +. /etc/conf.d/svnserve + +PID=`pidof -o %PPID /usr/bin/svnserve` +case "$1" in + start) + stat_busy "Starting svnserve" + if [ -z "$PID" ]; then + if [ -n "$SVNSERVE_USER" ]; then + su -s '/bin/sh' $SVNSERVE_USER -c "/usr/bin/svnserve -d $SVNSERVE_ARGS" & + else + /usr/bin/svnserve -d $SVNSERVE_ARGS & + fi + fi + if [ ! -z "$PID" -o $? -gt 0 ]; then + stat_fail + else + add_daemon svnserve + stat_done + fi + ;; + stop) + stat_busy "Stopping svnserve" + [ ! -z "$PID" ] && kill $PID &> /dev/null + if [ $? -gt 0 ]; then + stat_fail + else + rm_daemon svnserve + stat_done + fi + ;; + restart) + $0 stop + sleep 1 + $0 start + ;; + *) + echo "usage: $0 {start|stop|restart}" +esac diff --git a/extra/subversion/svnserve.conf b/extra/subversion/svnserve.conf new file mode 100644 index 000000000..37fb7ea10 --- /dev/null +++ b/extra/subversion/svnserve.conf @@ -0,0 +1,7 @@ +# +# Parameters to be passed to svnserve +# +#SVNSERVE_ARGS="-r /path/to/some/repos" +SVNSERVE_ARGS="" + +#SVNSERVE_USER="svn"