Edgewall Software
Modify

Opened 3 years ago

Last modified 3 years ago

#12549 new enhancement

Provide option for blame to use merged history

Reported by: Ryan J Ollos Owned by:
Priority: normal Milestone: next-major-releases
Component: version control Version:
Severity: normal Keywords: svn
Cc: Branch:
Release Notes:
API Changes:

Description

svn blame has the -g option:

  -g [--use-merge-history] : use/display additional information from merge
                             history

This can be useful for finding the changeset in which a line was changed, which is often more useful than the line in which the change was merged.

For example, line 47 of browser/trunk/trac/core.py shows [13672], however that's a merge changeset and [13671] may be more interesting.

svn blame -g trac/core.py on the trunk yields:

G  13671    rjollos         super(TracError, self).__init__(message)

while svn blame trac/core.py yields:

 13672    rjollos         super(TracError, self).__init__(message)

It looks like we could use blame4 or blame5 of svn.client, rather than blame2:

    svn_client_blame4(*args)
        svn_client_blame4(char const * path_or_url, svn_opt_revision_t peg_revision, svn_opt_revision_t start, 
            svn_opt_revision_t end, svn_diff_file_options_t const * diff_options, svn_boolean_t ignore_mime_type, 
            svn_boolean_t include_merged_revisions, svn_client_blame_receiver2_t receiver, 
            void * receiver_baton, svn_client_ctx_t ctx, 
            apr_pool_t pool) -> svn_error_t
    
    svn_client_blame5(*args)
        svn_client_blame5(char const * path_or_url, svn_opt_revision_t peg_revision, svn_opt_revision_t start, 
            svn_opt_revision_t end, svn_diff_file_options_t const * 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) -> svn_error_t

Btw, I wonder if it would be useful to have a blame TracLink, or extend the browser TracLink to allow blame to be specified.

Attachments (0)

Change History (0)

Modify Ticket

Change Properties
Set your email in Preferences
Action
as new The ticket will remain with no owner.
The ticket will be disowned. Next status will be 'new'.
as The resolution will be set. Next status will be 'closed'.
The owner will be changed from (none) to anonymous. Next status will be 'assigned'.

Add Comment


E-mail address and name can be saved in the Preferences .
 
Note: See TracTickets for help on using tickets.