Nik Clayton <nik@ngo.org.uk> (nikclayton)


Patch
r863643, r863638, r863637, r863633, r863561, r863560, r863559, r863558, r863532, r863527, r863525, r863524, r863523, r863522, r863442, r863441, r863391, r863322, r863321, r863320, r863319, r863318, r863317, r863316, r863282, r863281, r863262, r863261, r863240, r863187, r863186, r863185, r863184, r863143, r861815

r861815 | djames | 2006-10-03 18:32:14 +0000 (Tue, 03 Oct 2006)

Add more detail to the documentation for the SVN::Repos Perl bindings

Rearrange how methods are wrapped in this file, to make it easier to add new
methods in the future while keeping the documentation in sync.

Patch by: Nik Clayton <nik@ngo.org.uk>

* subversion/bindings/swig/perl/native/Repos.pm
  (@methods): Build up the list of exported methods throughout the file,
  which keeps a method's export point nearer its point of documentation.
  (POD Documentation): Add documentation for get_logs().  Explicitly list
  the other methods that are exported.  Bring the example up to date, and
  update the copyright date.



r863143 | nikclayton | 2007-01-17 16:23:28 +0000 (Wed, 17 Jan 2007)

* COMMITTERS: add myself, partial access, for work on the Perl bindings.


r863184 | nikclayton | 2007-01-19 19:33:16 +0000 (Fri, 19 Jan 2007)

Explicitly clear an error to avoid a coredump if built with
--enable-maintainer-mode.

* subversion/bindings/swig/perl/native/t/3client.t:  After testing to see if
  an error was generated (when testing error generation), explicitly clear
  the generated error.  This fixes an abort introduced in r22934 if you
  run this test with --enable-maintainer-mode.  The test ran to completion
  (all tests pass), but the Perl interpreter aborts at END time.  This was
  not considered a test failure.

  Add an additional test in the END block.  This should always succeed,
  and serves to prove that the END block ran.


r863185 | nikclayton | 2007-01-19 19:33:35 +0000 (Fri, 19 Jan 2007)

Introduce named/optional parameter support to the Perl bindings, starting
with SVN::Client::ls().

[in subversion/bindings/swig]

* perl/native/Client.pm: Provide a second mechanism for instantiating
  methods, used for methods that take named/optional parameters.  Use
  this mechanism to migrate ls() to the new functionality, where only
  the 'path_or_url' argument is mandatory.  Update the documentation
  to reflect this.  Use Params::Validate for argument parsing and 
  validation.

* perl/native/Makefile.PL.in: List Params::Validate as a pre-requisite.
  If it's not present that triggers a fatal error at "perl Makefile.PL"
  time.

* perl/native/t/3client.t: Add extra tests for ls() that verify that
  using named parameters generates the same results as using positional
  parameters.

* INSTALL: Note that the Perl bindings now have an external dependency on
  Params::Validate


r863186 | nikclayton | 2007-01-19 19:33:57 +0000 (Fri, 19 Jan 2007)

Add a test for POD correctness.  Correct two errors highlighted by the test.

[in subversion/bindings/swig/perl/native]

* t/pod.t: Use Test::Pod (if it's installed) to syntax check the POD
  embedded in the code.

* Client.pm, Repos.pm: Correct missing '=back' directives highlighted by
  pod.t.


r863187 | nikclayton | 2007-01-19 19:34:13 +0000 (Fri, 19 Jan 2007)

Adjust revprop_get() with named and optional parameter support.
 
[in subversion/bindings/swig/perl/native]
 
* Client.pm: Remove revprop_get from the list of general functions and
  add it to the list of the functions that take named params.  Provide
  a Params::Validate parameter specification.  Adjust the revprop_get
  documentation accordingly.
 
* t/3client.t: Add tests that verify that revprop_get works with named
  params, and that optional parameters are filled out correctly.  Add
  comments to the file that explain the testing strategy for whoever
  else wants to contribute.


r863240 | nikclayton | 2007-01-22 19:00:52 +0000 (Mon, 22 Jan 2007)

Adjust revprop_list() with named and optional parameter support.
 
[in subversion/bindings/swig/perl/native]
 
* Client.pm: Remove revprop_list from the list of general functions and
  add it to the list of the functions that take named params.  Provide
  a Params::Validate parameter specification.  Adjust the revprop_list
  documentation accordingly.

  Adjust the revprop_get documentation, and remove the positional
  params example.
 
* t/3client.t: Add tests that verify that revprop_list works with named
  params, and that optional parameters are filled out correctly.


r863261 | nikclayton | 2007-01-23 18:13:38 +0000 (Tue, 23 Jan 2007)

Refactor some of the argument specifications in to their own variables.

Many of these functions take arguments with the same name and the same
specification -- url, revision, etc.  Rather than duplicate the argument
spec for these in each method definition, hoist the spec (a hash ref) into
its own variable, and use that in the method definition.

* subversion/bindings/swig/perl/native/Client.pm: Refactor the argument
  specifications.


r863262 | nikclayton | 2007-01-23 18:14:29 +0000 (Tue, 23 Jan 2007)

Adjust checkout() with named and optional parameter support.
 
[in subversion/bindings/swig/perl/native]
 
* Client.pm: Remove checkout from the list of general functions and
  add it to the list of the functions that take named params.  Provide
  a Params::Validate parameter specification.  Adjust the checkout    
  documentation accordingly.
 
* t/3client.t: Add tests that verify that checkout works with named
  params, and that optional parameters are filled out correctly.  Add
  additional tests that check that the working copy is created and that,
  when doing recursive checkouts, that the sub-directories are also
  created.
 
  Start adding calls to die() at various points, to abort the test early.
  This prevents an initial error from cascading and causing a multitude
  of additional errors, and reduces the amount of scroll back that needs
  to be examined when a test fails.


r863281 | nikclayton | 2007-01-24 17:20:46 +0000 (Wed, 24 Jan 2007)

Abort the test if the IO operations fail.

* subversion/bindings/swig/perl/native/3client.t: die() if the calls to
  open(), print(), or close() fail.  They set up the environment for the
  rest of the test, and there is no point continuing if that fails.


r863282 | nikclayton | 2007-01-24 17:21:04 +0000 (Wed, 24 Jan 2007)

Add a (currently skipped) test for SVN::Client::Status that will make the
interpreter dump core.

SVN::Client::status('.', ...) will cause the interpreter to dump core.
'.' should be canonicalised to '', but isn't, which triggers an assertion.
I don't have a fix for this yet, the test is here as a reminder that the
bug exists.

* subversion/bindings/swig/perl/native/t/3client.t: Call status() with
  the first argument set to '.'.  This test is in a SKIP block so will
  not run, but stays as documentation.  Problem discovered by
  Eric Miller <eric.miller@amd.com>.


r863316 | nikclayton | 2007-01-26 07:59:10 +0000 (Fri, 26 Jan 2007)

Abort the test script if an individual test fails.

The tests in this file build upon one another -- a checkout, followed by
an add, followed by a commit, and so on.  If the checkout fails there's no
point continuing the rest of the test; it just leads to spurious errors
when the add and commit both fail.  Use the Fatal module to cause the
testing functions, and open() and close(), to die() instead of returning
false.

* subversion/bindings/swig/perl/native/3client.t: Use Fatal to have open,
  close, ok, is, and isa_ok die() instead of returning false.  Remove the
  "... or die '...'" stanza from places where it's used.



r863317 | nikclayton | 2007-01-26 07:59:47 +0000 (Fri, 26 Jan 2007)

Adjust info() with named and optional parameter support.
 
[in subversion/bindings/swig/perl/native]

* Client.pm:
  (info) Remove from the list of general functions and add it to the list 
  of the functions that take named params.  Provide a Params::Validate 
  parameter specification.  Adjust the documentation accordingly.
 
* t/3client.t: Add tests that verify that info works with named
  params, and that optional parameters are filled out correctly.



r863318 | nikclayton | 2007-01-26 07:59:59 +0000 (Fri, 26 Jan 2007)

Improve inter- and intra- document linking.

* subversion/bindings/swig/perl/native/Client.pm: Make sure that existing
  references to svn_* objects are links to the documentation for that object.
  Use explicit link names (and update existing links to be explicit too), to
  ensure that we do not fall foul of whatever the POD -> HTML conversion
  decides to do.


r863319 | nikclayton | 2007-01-26 08:00:24 +0000 (Fri, 26 Jan 2007)

Adjust log() with named and optional parameter support.
 
[in subversion/bindings/swig/perl/native]

* Client.pm:
  (log) Remove from the list of general functions and add it to the list 
  of the functions that take named params.  Provide a Params::Validate 
  parameter specification.  Adjust the documentation accordingly.  Note
  that the 'targets' parameter can be a scalar for a single path, or an
  arrayref to list multiple paths.
 
* t/3client.t: Add tests that verify that log works with named params,
  and that both scalars and arrayrefs for the 'targets' parameter are
  supported properly.


r863320 | nikclayton | 2007-01-26 08:00:49 +0000 (Fri, 26 Jan 2007)

Adjust log3() and log2() with named and optional parameter support.
 
[in subversion/bindings/swig/perl/native]

* Client.pm:
  (log3, log2): Remove from the list of general functions and add to the list 
  of the functions that take named params.  Provide Params::Validate 
  parameter specifications.  Adjust the documentation accordingly.      

  (log1): Most of its documentation moved to the section for log3().    
  Retained the special case docs re: rev 0.
 
* t/3client.t: Add tests that verify that the functions work with named 
  params.


r863321 | nikclayton | 2007-01-26 08:01:10 +0000 (Fri, 26 Jan 2007)

Adjust the documentation structure for all the SVN::Client methods.
 
[in subversion/bindings/swig/perl/native]

* Client.pm: Don't list methods as items in a list.  Instead, give each
  method it's own '=head2' section.  Most POD -> HTML converters will then
  automatically include them in the ToC.  

  (log3, log2, log, ls, revprop_get, revprop_list): List the bare
  method name, do not include the "$ctx->" -- it clutters up the ToC,
  and is duplicated by the sample code that immediately follows the header.
  The remaining methods will be cleared up in the same way as they are
  converted to use named params.


r863322 | nikclayton | 2007-01-26 08:01:25 +0000 (Fri, 26 Jan 2007)

Adjust propget() and update() to add named and optional parameter support.
 
[in subversion/bindings/swig/perl/native]
 
* Client.pm:
  (propget, update) Remove from the list of general methods and add to the 
  list of methods that take named params. Provide a Params::Validate 
  parameter specification. Adjust the documentation accordingly.
 
* t/3client.t: Add tests that verify that the methods work with named
  params, and that optional parameters are filled out correctly.


r863391 | nikclayton | 2007-01-31 20:34:53 +0000 (Wed, 31 Jan 2007)

Add gen_method_defs, which helps automate the process of creating method
definitions for the Perl bindings.

gen_method_defs parses the XML generated by Doxygen (if GENERATE_XML is
enabled in the doxygen.conf file) and uses it to generate a list of
methods with argument parameter definitions.  It doesn't fully automate
the process, as the generated content must still be reviewed, but it
does help with the initial boot strapping.

* subversion/bindings/swig/perl/native/gen_method_defs: Initial addition.


r863441 | nikclayton | 2007-02-07 21:59:59 +0000 (Wed, 07 Feb 2007)

Augment gen_method_defs to sort method names and generate stub POD
documentation for the method.

* subversion/bindings/swig/perl/native/gen_method_defs: Update the embedded
  template.  It now sorts the list of method names before producing the
  output, and the template includes stub POD documentation for the method.


r863442 | nikclayton | 2007-02-07 22:00:56 +0000 (Wed, 07 Feb 2007)

Add a --method option to gen_method_defs. 
 
* subversion/bindings/swig/perl/native/gen_method_defs: Support the 
  extraction of a single method using gen_method_defs.  Add a hack that 
  prevents the POD embedded in the bundled template from being parsed
  by perldoc.


r863522 | nikclayton | 2007-02-21 11:47:11 +0000 (Wed, 21 Feb 2007)

Support tests in subdirectories of t/.

Preparatory work for splitting the tests in t/3client.t into smaller tests
t/client/*.t.

* subversion/bindings/swig/perl/native/Makefile.PL.in: Adjust the glob of
  tests to include t/*/*.t.


r863523 | nikclayton | 2007-02-21 11:48:09 +0000 (Wed, 21 Feb 2007)

Move the SVN::Client tests to t/client/3client.t

* subversion/bindings/swig/perl/native/t/3client.t: Move to
  subversion/bindings/swig/perl/native/t/client/3client.t.


r863524 | nikclayton | 2007-02-21 11:48:23 +0000 (Wed, 21 Feb 2007)

Fix ls() documentation -- it returns a hashref, not a hash.

* subversion/bindings/swig/perl/native/Client.pm: Update documentation
  for ls() to show a hashref being returned instead of a hash.


r863525 | nikclayton | 2007-02-21 11:48:41 +0000 (Wed, 21 Feb 2007)

Start separating SVN::Client tests in to smaller files.

[in subversion/bindings/swig/perl/native]

* t/lib/Test/SVN.pm: Implement functions that can be used by the automated
  tests to set up the testing environment, in particular, from a pre-existing
  repository dump file.

* t/repo.dump: A repository dump file.  r1 commits the greek tree.  Other
  revisions make specific changes to that tree that can be looked for in
  the automated tests.

* t/client/ls.t: Introduce 77 tests for SVN::Client::ls.


r863527 | nikclayton | 2007-02-21 16:29:09 +0000 (Wed, 21 Feb 2007)

Refactor the revprop_get() tests.

[in subversion/bindings/swig/perl/native/t/client]

* 3client.t, revprop_get.t: Refactor the tests for revprop_get(), remove
  them from 3client.t and put them in the new file revprop_get.t.


r863532 | nikclayton | 2007-02-21 21:32:12 +0000 (Wed, 21 Feb 2007)

Refactor the uuid_from_url() tests.

[in subversion/bindings/swig/perl/native/t/client]

* 3client.t, uuid_from_url.t: Refactor the tests for uuid_from_url(), remove
  them from 3client.t and put them in uuid_from_url.t.


r863558 | nikclayton | 2007-02-23 18:43:40 +0000 (Fri, 23 Feb 2007)

Check that _p_svn_dirent_t->size() returns 0 for directories.

[in subversion/bindings/swig/perl/native/t/client]

* ls.t: Make sure that size() returns 0 for directories.

* 3client.t: Remove the tests for ls(), they exist in ls.t now.


r863559 | nikclayton | 2007-02-23 18:44:16 +0000 (Fri, 23 Feb 2007)

Create syntactically valid Perl.

* subversion/bindings/swig/perl/native/gen_method_defs: Adjust the output
  template so that %method_defs is built up piecemeal, instead of in one
  go.  The previous method resulted in syntax errors, as you can't
  interleave POD with variable instantiation.


r863560 | nikclayton | 2007-02-23 18:44:28 +0000 (Fri, 23 Feb 2007)

Generate the $arg_* variable definitions.

* subversion/bindings/swig/perl/native/gen_method_defs: Adjust the template
  to generate definitions for the $arg_* variables that are referenced in
  the generated %method_defs variable.


r863561 | nikclayton | 2007-02-23 18:44:46 +0000 (Fri, 23 Feb 2007)

Include a wrapper for every function exported by the client API.

* subversion/bindings/swig/perl/native/Client.pm:  Add variables of the
  form $arg_<paramname> for every parameter used by the API.  At the
  moment most of these have no specific specification validation data,
  but they suffice to get named parameters working.

  Add a method definition for every function exported by the API.  These
  were generated automatically by gen_method_defs, and may not be correct
  (e.g., input parameters in the C API might be returned as hash refs
  in Perl).  These errors are confined to methods for which we don't have
  any tests, and so are hopefully inconsequential for the time being.
  They will be corrected as tests are added.

  Add documentation for every method.  For the methods that were previously
  unwrapped this is a stub that may suffer from the same argument errors
  mentioned previously.

  Remove the BEGIN block that uses and imports from SVN::Base, and place
  the relevant code after %method_defs is fully initialised.

  Remove the older code that wrapped the functions, as it's now
  superfluous.  Retain it's functionality for handling context objects,
  the special case for import(), and the special cases for propset()
  and url_from_path().


r863633 | nikclayton | 2007-03-03 09:06:17 +0000 (Sat, 03 Mar 2007)

Wrap svn_client_list() with the Perl bindings.

While in the vicinity, add Doxygen documentation for functions that were
undocumented.

* subversion/bindings/swig/include/svn_types.swg: Add a typemap for
  svn_client_list_func_t.

* subversion/bindings/swig/perl/libsvn_swig_perl/swigutil_pl.c:
  Add doxygen markup to the header.
  (_swig_perl_type_query): Add documentation.
  (convert_to_swig_type): Add documentation.
  (svn_swig_pl_callback_thunk): Remove comment, it's moved to swigutil_pl.h
  (svn_swig_pl_thunk_list_receiver): Add this function, which handles the
  callback arguments for svn_client_list.

* subversion/bindings/swig/perl/libsvn_swig_perl/swigutil_pl.h:
  Add doxygen markup to the header.
  perl_func_invoker_t: Add documentation.
  (svn_swig_pl_callback_thunk): Add documentation to this function,
  based on the comment removed from swigutil_pl.c
  (svn_swig_pl_thunk_list_receiver): Add the prototype for this function,
  and associated documentation.

* subversion/bindngs/swig/perl/native/Client.pm:
  (SVN::Client::list): Add documentation.
  (SVN::Client::ls): Correct the example.

* subversion/bindings/swig/perl/native/Core.pm: Make the SVN_DIRENT_*
  constants available from SVN::_Core.

* subversion/bindings/swig/perl/native/t/client/list.t: Add initial
  tests for SVN::Client::list.

* doc/doxygen.conf: Enable extraction of static functions (so their
  documentation is displayed), add the SWIG Perl bindings directory to the
  list of directories to use as input, and add *.c as a file pattern so
  that files that contain static functions are covered.


r863637 | nikclayton | 2007-03-04 22:16:12 +0000 (Sun, 04 Mar 2007)

Remove grocer's apostrophes.

* subversion/bindings/swig/perl/native/Client.pm: Remove two spurious
  apostrophes.


r863638 | nikclayton | 2007-03-04 22:16:58 +0000 (Sun, 04 Mar 2007)

Add tests and documentation for SVN::Client::ls2()
 
* subversion/bindings/swig/perl/native/Client.pm: Update the documentation
  for ls() and ls2(), and the definition for ls2().

* subversion/bindings/swig/perl/native/t/client/ls2.t: Add some basic tests
  for ls2().


r863643 | nikclayton | 2007-03-05 15:12:28 +0000 (Mon, 05 Mar 2007)

Wrap, document, and test SVN::Client::ls3().

* subversion/bindings/swig/perl/native/Client.pm: Adjust the method
  specification for ls3(), and add some documentation.  Correct the
  example for ls() and ls2() to show a hashref being returned.

* subversion/bindings/swig/perl/native/t/client/ls3.t: Add basic tests
  for SVN::Client::ls3().