[prev in list] [next in list] [prev in thread] [next in thread]
List: subversion-cvs
Subject: svn commit: r8864 - in trunk/subversion/bindings/swig: . perl/t
From: breser () tigris ! org
Date: 2004-02-29 7:07:54
Message-ID: 200402290707.i1T77si02718 () svn ! collab ! net
[Download RAW message or body]
Author: breser
Date: Sun Feb 29 01:07:49 2004
New Revision: 8864
Modified:
trunk/subversion/bindings/swig/perl/t/3client.t
trunk/subversion/bindings/swig/svn_types.i
Log:
Fix bug in perl bindings where strings that contained revision numbers that
hadn't bee used in a IV context weren't accepted.
* subversion/bindings/swig/svn_types.i
Use looks_like_number instead of SvIOK, since SvIOK only returns true
if the conversion has already been done. While looks_like_number tells
you if it can be done.
* subversion/bindings/swig/perl/t/3client.t
Modify a test that uses a PV with a revision number in it and catches
the bug.
Modified: trunk/subversion/bindings/swig/perl/t/3client.t
==============================================================================
--- trunk/subversion/bindings/swig/perl/t/3client.t (original)
+++ trunk/subversion/bindings/swig/perl/t/3client.t Sun Feb 29 01:07:49 2004
@@ -311,7 +311,10 @@
'read the first line of the cat file');
ok(close(CAT),'close cat file');
-my ($dirents) = $ctx->ls($reposurl,'HEAD', 1);
+# the string around the $current_rev exists to expose a past
+# bug. In the past we did not accept values that simply
+# had not been converted to a number yet.
+my ($dirents) = $ctx->ls($reposurl,"$current_rev", 1);
isa_ok($dirents, 'HASH','ls returns a HASH');
isa_ok($dirents->{'dir1'},'_p_svn_dirent_t',
'hash value is a _p_svn_dirent_t');
Modified: trunk/subversion/bindings/swig/svn_types.i
==============================================================================
--- trunk/subversion/bindings/swig/svn_types.i (original)
+++ trunk/subversion/bindings/swig/svn_types.i Sun Feb 29 01:07:49 2004
@@ -358,7 +358,7 @@
else if (sv_isobject($input) && sv_derived_from($input, "_p_svn_opt_revision_t")) {
SWIG_ConvertPtr($input, (void **)&$1, $1_descriptor, 0);
}
- else if (SvIOK($input)) {
+ else if (looks_like_number($input)) {
rev.kind = svn_opt_revision_number;
rev.value.number = SvIV($input);
}
---------------------------------------------------------------------
To unsubscribe, e-mail: svn-unsubscribe@subversion.tigris.org
For additional commands, e-mail: svn-help@subversion.tigris.org
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic