[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

[PATCH] perl bindings: better handling of svn_revision_t

From: Ben Reser <ben_at_reser.org>
Date: 2003-12-23 05:55:38 CET

Notes:

Yes this uses the unadvertised svn_parse_date. I'd use
svn_opt_parse_revision but it wants to work on two revisions not just
one. Which makes sense from a command line end but not from the perl
bindings end. I can't use parse_one_rev because it's a static function.
So doing it this way seems to be the only way to achieve this
functionality in the bindings.

WORKING could be WORK but I'm staying with the names used in the enum
for the revision kind with the exception of PREV. I accept PREV in
order to stay compatable with the command line client keywords.

Other than that it is fairly straightforward.

[[[

Support the revision keywords that the command line client does, provide
a way to reference the working copy revision, and accept all the dates
that the command line client does.

* subversion/bindings/swig/svn_types.i
  In the perl bindings for svn_revision_t:
    Really accept undef as svn_opt_unspecified.
    Accept the string 'WORKING' as svn_opt_revision_working.
    Accept the string 'COMMITTED' as svn_opt_revision_committed.
    Accept the string 'PREV' as svn_opt_revision_previous.
    Accept strings wrapped in {} as dates.
    Check to make sure it's a string before trying to
      convert it to a string.
    Fail if we fall out the bottom.
    Clean up indentation.

]]]

-- 
Ben Reser <ben@reser.org>
http://ben.reser.org
"Conscience is the inner voice which warns us somebody may be looking."
- H.L. Mencken


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Received on Tue Dec 23 05:56:14 2003

This is an archived mail posted to the Subversion Dev mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.