You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@subversion.apache.org by Jens Frederich <jf...@gmail.com> on 2019/09/30 20:20:15 UTC

correct API to get current textual WC modifications, for parsing postprocessing

I try to get all line changes in the current changeset. Not sure what the
right API is.  I have created a delta tree with the following to see if it
is a file and textual modifications. How do I get the content?

  SVN_ERR(svn_fs_revision_root(&base_root, fs, base_rev, pool));
  SVN_ERR(svn_repos_node_editor(&editor, &edit_baton, repos, base_root,
root, pool, edit_pool)));
  SVN_ERR(svn_repos_replay2(root, "", SVN_INVALID_REVNUM, TRUE, editor,
edit_baton, NULL, NULL, edit_pool));
  *tree = svn_repos_node_from_baton(edit_baton);

Jens

Re: correct API to get current textual WC modifications, for parsing postprocessing

Posted by Branko Čibej <br...@apache.org>.
On 30.09.2019 22:20, Jens Frederich wrote:
> I try to get all line changes in the current changeset. Not sure what
> the right API is.  I have created a delta tree with the following to
> see if it is a file and textual modifications. How do I get the content?
>
>   SVN_ERR(svn_fs_revision_root(&base_root, fs, base_rev, pool));
>   SVN_ERR(svn_repos_node_editor(&editor, &edit_baton, repos,
> base_root, root, pool, edit_pool)));
>   SVN_ERR(svn_repos_replay2(root, "", SVN_INVALID_REVNUM, TRUE,
> editor, edit_baton, NULL, NULL, edit_pool));
>   *tree = svn_repos_node_from_baton(edit_baton);


You should be looking at the svn_client API, specifically, one of the
svn_client_diff variants. The functions you mentioned above are reading
data from the repository, not from the working copy.

-- Brane