You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@subversion.apache.org by Jelmer Vernooij <je...@samba.org> on 2006/06/23 12:51:50 UTC

[PATCH] Fix Python bindings to svn.wc.crawl_revisions2()

Hi,

[[[
Fix Python bindings to svn.wc.crawl_revisions2().

[in subversion/bindings/swig]

 * svn_ra.i: Add Python typemap for svn_ra_reporter2_t.

 * svn_wc.i: Add Python typemap for svn_wc_notify_func2_t.

 * tests/wc.py 
   (setUp): Open working copy subdirectories.
   (test_crawl_revisions2): Add test for svn.wc.crawl_revisions2() and
svn_ra_reporter2_t implementations.

 * python/libsvn_swig_py/swigutil_py.c
   (make_ob_wc_notify): Add function.
   (svn_swig_py_notify_func2): Add Python wrapper for
svn_wc_notify_func2_t.
   (reporter_set_path): Add function.
   (reporter_delete_path): Add function.
   (reporter_link_path): Add function.
   (reporter_abort_report): Add function.
   (reporter_finish_report): Add function.
   (swig_py_ra_reporter2): Add Python wrapper for svn_ra_reporter2_t.
 
 * python/libsvn_swig_py/swigutil_py.h
   (swig_py_ra_reporter2): Add extern.
   (svn_swig_py_notify_func2): Add prototype.
]]]

Cheers,

Jelmer
   
-- 
Jelmer Vernooij <je...@samba.org> - http://samba.org/~jelmer/

Re: [PATCH] Fix Python bindings to svn.wc.crawl_revisions2()

Posted by David James <dj...@collab.net>.
> > +  def test_craw_revisions2(self):
> > Did you mean test_crawl_revisions2()?
> Oops.
>
> > +      wc.crawl_revisions2(self.path, self.wc, MyReporter(self),
> > +              False, True, False, notify, info)
> > Shouldn't the second line be indented to be below the self.path parameter?
> > +      self.assert_(self._finished_report)
> > I think we should have _finished_report as part of the MyReporter object,
> > rather than add one more member to the test suite class.
> Makes sense. Fixed.

Thanks Jelmer! Overall, the patch looks great. I added a few extra
test cases and committed in 20230.

> %typemap(in) (const svn_ra_reporter2_t *reporter, void *report_baton)
> {
>   $1 = &swig_py_ra_reporter2;

GCC reports a warning here unless you cast to (svn_ra_reporter2_t *).
I fixed this before committing.

Cheers,

David

-- 
David James -- http://www.cs.toronto.edu/~james

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

Re: [PATCH] Fix Python bindings to svn.wc.crawl_revisions2()

Posted by Jelmer Vernooij <je...@samba.org>.
On Sat, 2006-06-24 at 03:54 +0530, Madan U Sreenivasan wrote:
> On Fri, 23 Jun 2006 20:27:14 +0530, Jelmer Vernooij <je...@samba.org>  
> wrote:
> 
> > On Fri, 2006-06-23 at 10:55 -0400, Garrett Rooney wrote:
> >> On 6/23/06, Jelmer Vernooij <je...@samba.org> wrote:
> >> > Hi,
> >> >
> >> > [[[
> >> > Fix Python bindings to svn.wc.crawl_revisions2().
> 
> +  def test_craw_revisions2(self):
> Did you mean test_crawl_revisions2()?
Oops.

> +      wc.crawl_revisions2(self.path, self.wc, MyReporter(self),
> +              False, True, False, notify, info)
> Shouldn't the second line be indented to be below the self.path parameter?
> +      self.assert_(self._finished_report)
> I think we should have _finished_report as part of the MyReporter object,  
> rather than add one more member to the test suite class.
Makes sense. Fixed.

Cheers,

Jelmer
-- 
Jelmer Vernooij <je...@samba.org> - http://samba.org/~jelmer/

Re: [PATCH] Fix Python bindings to svn.wc.crawl_revisions2()

Posted by Madan U Sreenivasan <ma...@collab.net>.
On Fri, 23 Jun 2006 20:27:14 +0530, Jelmer Vernooij <je...@samba.org>  
wrote:

> On Fri, 2006-06-23 at 10:55 -0400, Garrett Rooney wrote:
>> On 6/23/06, Jelmer Vernooij <je...@samba.org> wrote:
>> > Hi,
>> >
>> > [[[
>> > Fix Python bindings to svn.wc.crawl_revisions2().

+  def test_craw_revisions2(self):
Did you mean test_crawl_revisions2()?

+      wc.crawl_revisions2(self.path, self.wc, MyReporter(self),
+              False, True, False, notify, info)

Shouldn't the second line be indented to be below the self.path parameter?

+      self.assert_(self._finished_report)

I think we should have _finished_report as part of the MyReporter object,  
rather than add one more member to the test suite class.

Regards,
Madan U S
www.symonds.net/~madan

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

Re: [PATCH] Fix Python bindings to svn.wc.crawl_revisions2()

Posted by Jelmer Vernooij <je...@samba.org>.
On Fri, 2006-06-23 at 10:55 -0400, Garrett Rooney wrote:
> On 6/23/06, Jelmer Vernooij <je...@samba.org> wrote:
> > Hi,
> >
> > [[[
> > Fix Python bindings to svn.wc.crawl_revisions2().
> >
> > [in subversion/bindings/swig]
> >
> >  * svn_ra.i: Add Python typemap for svn_ra_reporter2_t.
> >
> >  * svn_wc.i: Add Python typemap for svn_wc_notify_func2_t.
> >
> >  * tests/wc.py
> >    (setUp): Open working copy subdirectories.
> >    (test_crawl_revisions2): Add test for svn.wc.crawl_revisions2() and
> > svn_ra_reporter2_t implementations.
> >
> >  * python/libsvn_swig_py/swigutil_py.c
> >    (make_ob_wc_notify): Add function.
> >    (svn_swig_py_notify_func2): Add Python wrapper for
> > svn_wc_notify_func2_t.
> >    (reporter_set_path): Add function.
> >    (reporter_delete_path): Add function.
> >    (reporter_link_path): Add function.
> >    (reporter_abort_report): Add function.
> >    (reporter_finish_report): Add function.
> >    (swig_py_ra_reporter2): Add Python wrapper for svn_ra_reporter2_t.
> >
> >  * python/libsvn_swig_py/swigutil_py.h
> >    (swig_py_ra_reporter2): Add extern.
> >    (svn_swig_py_notify_func2): Add prototype.
> > ]]]
> 
> I'm totally unqualified to evaluate this patch, but I do notice that
> it's full of tabs, and appears to have been written assuming that tab
> == 4 spaces, which totally screws up the indenting in 'svn diff'
> output, that'll have to be fixed before it can be applied.
Oops - Fixed in the attached version.

Cheers,

Jelmer
-- 
Jelmer Vernooij <je...@samba.org> - http://samba.org/~jelmer/

Re: [PATCH] Fix Python bindings to svn.wc.crawl_revisions2()

Posted by Garrett Rooney <ro...@electricjellyfish.net>.
On 6/23/06, Jelmer Vernooij <je...@samba.org> wrote:
> Hi,
>
> [[[
> Fix Python bindings to svn.wc.crawl_revisions2().
>
> [in subversion/bindings/swig]
>
>  * svn_ra.i: Add Python typemap for svn_ra_reporter2_t.
>
>  * svn_wc.i: Add Python typemap for svn_wc_notify_func2_t.
>
>  * tests/wc.py
>    (setUp): Open working copy subdirectories.
>    (test_crawl_revisions2): Add test for svn.wc.crawl_revisions2() and
> svn_ra_reporter2_t implementations.
>
>  * python/libsvn_swig_py/swigutil_py.c
>    (make_ob_wc_notify): Add function.
>    (svn_swig_py_notify_func2): Add Python wrapper for
> svn_wc_notify_func2_t.
>    (reporter_set_path): Add function.
>    (reporter_delete_path): Add function.
>    (reporter_link_path): Add function.
>    (reporter_abort_report): Add function.
>    (reporter_finish_report): Add function.
>    (swig_py_ra_reporter2): Add Python wrapper for svn_ra_reporter2_t.
>
>  * python/libsvn_swig_py/swigutil_py.h
>    (swig_py_ra_reporter2): Add extern.
>    (svn_swig_py_notify_func2): Add prototype.
> ]]]

I'm totally unqualified to evaluate this patch, but I do notice that
it's full of tabs, and appears to have been written assuming that tab
== 4 spaces, which totally screws up the indenting in 'svn diff'
output, that'll have to be fixed before it can be applied.

-garrett

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