I am casting the char* to an svn_string_t*, which shouldnt be a problem I
dont think since I believe svn_string_t is just a typedef for char*
On 6/27/07, Jeremy Pereira <jeremyp@jeremyp.net> wrote:
>
>
> On 26 Jun 2007, at 22:14, Ryan McLelland wrote:
>
> > Hi,
> > I am building an svn client using the c/c++ apis and I am trying to
> > provide project-based version numbers for the users, (even though
> > all projects will be in one repository). I'm trying to do it by
> > setting properties of each projects folder in the repository, i.e.
> > set property "v1" to "rev1", then when they commit this project the
> > next time, set property "v2" to "revxx", with xx being whatever
> > revision the whole repository is at that point. I can then read
> > the properties and checkout the appropriate revision when they ask
> > for version x of their project. Anyway, I'm getting a segmentation
> > fault in the following line of code:
> >
> > long rev_set;
> > err = svn_client_revprop_set("latest_v",(svn_string_t*) ltoa
> > (current_revision).c_str(),
> > proj_url.c_str(), &rev,
> > (svn_revnum_t*) &rev_set, TRUE, ctx, pool);
>
> It's a long time since I've done any C++ and maybe the conversion is
> done automatically, but it looks to me like you are passing a char*
> as the second parameter and not an svn_string_t*.
>
>
> >
> >
> > the current_revision is taken from the commit_info struct of a
> > commit just before this call, and it is correct. The following is a
> > stack trace from my debugger:
> >
> > _memcpy, FP=fc374cf0
> > apr_file_write, FP=fc374cf0
> > apr_file_write_full, FP=fc374d70
> > svn_io_file_write_full, FP=fc374de0
> > create_temp_file, FP=fc374e60
> > ...pos__hooks_pre_revprop_change, FP=fc374f18
> > svn_repos_fs_change_rev_prop2, FP=fc374fa8
> > svn_ra_local__change_rev_prop, FP=fc375030
> > svn_ra_change_rev_prop, FP=fc3750a0
> > svn_client_revprop_set, FP=fc375130
> > C++ **My Function**, FP=fc37a428
> >
> > any help would be much appreciated.
> > Thanks,
> > -Ryan
> >
>
>
Received on Wed Jun 27 15:35:49 2007