You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@subversion.apache.org by "Miller, Eric" <Er...@amd.com> on 2007/08/16 16:08:25 UTC

Looking for help writing meta data with swig bindings

Could someone show me an example of using the swig bindings to write
directly to the .svn/entries file?

I think I want to use svn_wc__entries_write but I can't figure out how
to call that from the swig bindings (I'm using the perl bindings atm).

Does anyone have a ready example of reading/modifying/writing the
entries data directly using the swig bindings?

Eric


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


Re: Looking for help writing meta data with swig bindings

Posted by "C. Michael Pilato" <cm...@collab.net>.
Miller, Eric wrote:
> Yep, running into a couple of cases where the client api's just aren't
> robust enough in our crazy working copies.  I was trying to avoid
> writing a parser (didn't want to get bit by another format switch) but I
> suppose it wouldn't be the end of the world.

For 1.4 working copies, it's one bit of info per line, with individual
entries separated by formfeed characters.  Stupid simple.  I don't even have
to know you to have faith that you can pull this off.  :-)

-- 
C. Michael Pilato <cm...@collab.net>
CollabNet   <>   www.collab.net   <>   Distributed Development On Demand


RE: Looking for help writing meta data with swig bindings

Posted by "Miller, Eric" <Er...@amd.com>.
> Functions with double underscores (svn_wc*__*entries_write) are not
public
> API functions, and therefore are not exposed through our language
bindings
> interfaces.

Yeah.. that's what I figured.
 
> > Does anyone have a ready example of reading/modifying/writing the
> > entries data directly using the swig bindings?
>
> This is strongly discouraged.  But inevitably folks will find a need
for
> directly editing the .entries files.  Fortunately, the 1.4 entries
format
> is super-simple to parse and write -- if you can read and understand
> libsvn_wc/entries.c:write_entry() and read_entry(), you're golden.

Yep, running into a couple of cases where the client api's just aren't
robust enough in our crazy working copies.  I was trying to avoid
writing a parser (didn't want to get bit by another format switch) but I
suppose it wouldn't be the end of the world.

Thanks for the comments.

Eric


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


Re: Looking for help writing meta data with swig bindings

Posted by "C. Michael Pilato" <cm...@collab.net>.
Miller, Eric wrote:
> Could someone show me an example of using the swig bindings to write
> directly to the .svn/entries file?
> 
> I think I want to use svn_wc__entries_write but I can't figure out how
> to call that from the swig bindings (I'm using the perl bindings atm).

Functions with double underscores (svn_wc*__*entries_write) are not public
API functions, and therefore are not exposed through our language bindings
interfaces.

> Does anyone have a ready example of reading/modifying/writing the
> entries data directly using the swig bindings?

This is strongly discouraged.  But inevitably folks will find a need for
directly editing the .entries files.  Fortunately, the 1.4 entries format is
super-simple to parse and write -- if you can read and understand
libsvn_wc/entries.c:write_entry() and read_entry(), you're golden.

-- 
C. Michael Pilato <cm...@collab.net>
CollabNet   <>   www.collab.net   <>   Distributed Development On Demand