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

Re: svn:externals parser API

From: Stefan Sperling <stsp_at_elego.de>
Date: Wed, 22 Feb 2012 00:08:35 +0100

On Tue, Feb 21, 2012 at 11:50:54PM +0100, Stefan Sperling wrote:
> I think svn_wc_parse_externals_description3() should do what you need.
> Does this help you?
> The function is mapped in the python bindings:
> >>> import svn.wc
> >>> svn.wc.svn_wc_parse_externals_description3
> <function svn_wc_parse_externals_description3 at 0x20779a758>

Hmmm... my suggestion probably won't work.
The function doesn't seem to be usable.

>>> svn.wc.svn_wc_parse_externals_description3("/tmp", "^/branch/gamma foo", 0)
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/local/lib/python2.7/site-packages/libsvn/wc.py", line 398, in svn_w
    return apply(_wc.svn_wc_parse_externals_description3, args)
ValueError: svn_wc_parse_externals_description3 is not implemented yet

But the 1.4 version of this function is working:

>>> e = svn.wc.svn_wc_parse_externals_description("/tmp", "^/branch/gamma foo")
>>> e
{'foo': <libsvn.wc.svn_wc_external_item_t; proxy of <Swig Object of type 'svn_wc
_external_item_t *' at 0x2083e50c0> >}
>>> e['foo']
<libsvn.wc.svn_wc_external_item_t; proxy of <Swig Object of type 'svn_wc_externa
l_item_t *' at 0x2083e50c0> >
>>> e['foo'].target_dir
>>> e['foo'].url
>>> e['foo'].revision
<libsvn.core.svn_opt_revision_t; proxy of <Swig Object of type 'svn_opt_revision_t *' at 0x2043d90d0> >

But that doesn't provide you with the enhancements of the 1.5 syntax,
e.g. peg-revision support.

I am not a bindings expert so I don't know what we'd need to do to make
the newer variants of this function work from the bindings.
Received on 2012-02-22 00:09:14 CET

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

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