On 9/13/06, Geoff Richards <firstname.lastname@example.org> wrote:
> On Wed, Sep 13, 2006 at 05:37:33AM +0100, Geoff Richards wrote:
> > Warning: this patch is untested. The modified file does compile without
> > any additional warnings, but I can't currently compile or test the Perl
> > bindings as a whole. Someone who knows how this stuff works needs to
> > give it a spin, but I think it should work.
> > This should fix the passing of binary values for properties between C
> > and Perl. Currently Perl delta editors receive truncated values for
> > properties which contain null bytes.
> OK, I've tested the patch and it seems to work fine. I've added a test
> which fails without it, but passes with the fix added. This also
> includes some other new testing code for SVN::Fs and SVN::Ra which I
> was working on anyway. These two test files all pass as of r21492.
> So, new version of the patch attached. The C code changes are the same
> as last time.
Great patch, Geoff! I almost committed your first patch, but I wanted
to see some tests first.
Thanks a lot for submitting these tests as they will be very helpful
in the long run. In combination with the extra documentation you
submitted yesterday, this should be a big boost for the Perl bindings.
I have one request for you. In future, could you include a log message
with your patches? This log message should include the names of the
functions which you modify, and a description of what you changed in
each function. I've included an example log message (for this patch)
below to help explain.
Upgrade the SWIG/perl bindings to support binary properties, including
null bytes. In swigutil_pl.c, we no longer treat "svn_string_t" objects
as null-terminated strings; instead, we look at the length parameter of
the string to determine its length.
[ In subversion/bindings/swig/perl ]
(svn_swig_pl_callback_thunk): Add 't' format code for svn_string_t
(thunk_change_dir_prop, thunk_change_file_prop): Use 't' format code
for svn_string_t objects.
(thunk_get_wc_prop): Don't treat the return value of get_wc_prop as a
null-terminated string when we convert it into an svn_string_t;
instead, look at its length field.
* native/t/6ra.t, native/t/2fs.t:
Add a bunch of tests for binary properties. Add additional checks
throughout. Fix a few spots where the indentation was off. Some of
the new tests are skipped on Windows because they are dependent
on a pre-revprop-change hook. The pre-revprop-change hook is a bit
trickier to setup on Windows and Mac OS X, so I've punted on that for
now by skipping the tests.
I committed your patch with the above log message in r21494. Let me
know if I missed anything.
Thanks for contributing to Subversion!
To unsubscribe, e-mail: email@example.com
For additional commands, e-mail: firstname.lastname@example.org
Received on Thu Sep 14 08:04:59 2006