SVN plugin: Let annotate use merge history

pfee at talk21.com pfee at talk21.com
Wed Jun 19 12:37:57 UTC 2013


Hello all,

I'm using the annotation feature of the SVN VCS plugin.  It doesn't set the "include_merged_revisions" flag when calling svn_client_blame, hence annotation information often indicates who merged changes to a branch, rather than who wrote the original code.

On the command line, this is equivalent to "svn annotate" without the -g/--use-merge-history option.

Looking at the source code for kdevplatform, I see:

plugins/subversion/kdevsvncpp/client_annotate.cpp
==========
error = svn_client_blame(
              path.c_str(),
              revisionStart.revision(),
              revisionEnd.revision(),
              annotateReceiver,
              entries,
              *m_context, // client ctx
              pool);
==========

Looking at libsvn_client code, I see that as of SVN 1.5 a richer API is available:
http://subversion.apache.org/docs/api/1.7/group__Blame.html
http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_client/blame.c?annotate=1493583

=================
svn_error_t* svn_client_blame5  (       const char *    path_or_url,
                const svn_opt_revision_t *      peg_revision,
                const svn_opt_revision_t *      start,
                const svn_opt_revision_t *      end,
                const svn_diff_file_options_t *         diff_options,
                svn_boolean_t   ignore_mime_type,
                svn_boolean_t   include_merged_revisions,
                svn_client_blame_receiver3_t    receiver,
                void *          receiver_baton,
                svn_client_ctx_t *      ctx,
                apr_pool_t *    pool 
        ) 
=================

If kdevplatform's code called svn_client_blame5 with include_merged_revisions set, then the annotations should report the code author rather than the user than merged the code.

Problems I can envisage:
* What version of libsvn_client is available?  Build system would need to test for availability of svn_client_blame4/5.
* Should include_merged_revisions be set always or should user be given configuration option to decide?  A config option requires additional effort to implement and makes kdevelop more complex to use.  I'd suggest setting include_merged_revisions on platforms that support it, without asking the user.

Is this mailing list the best place to suggest/request an enhancement, should I raise a request on bugs.kde.org?

Thanks,
Paul
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kdevelop-devel/attachments/20130619/f31510f3/attachment.html>


More information about the KDevelop-devel mailing list