[Bug 5336] New: Add a --future option to blame/annotate to find future changes to lines in a file

bugzilla at mercurial-scm.org bugzilla at mercurial-scm.org
Fri Aug 19 07:58:56 UTC 2016


https://bz.mercurial-scm.org/show_bug.cgi?id=5336

            Bug ID: 5336
           Summary: Add a --future option to blame/annotate to find future
                    changes to lines in a file
           Product: Mercurial
           Version: 3.7.3
          Hardware: PC
                OS: Windows
            Status: UNCONFIRMED
          Severity: feature
          Priority: wish
         Component: Mercurial
          Assignee: bugzilla at selenic.com
          Reporter: maxgrenderjones at gmail.com
                CC: mercurial-devel at selenic.com

hg annotate/blame is used to answer the common question:

'Whenever/whoever added/changed this line broke my build - when/who was it'?

I often have a similar, related question:

'Whenever this line changed from what it was as of revision xyz broke my build
- when/who was it'?

i.e. I want a command that does just what hg annotate does, only instead of
listing the revision that made the line what it was, it shows the next revision
that changes the line from what it currently is. Paging through all the
revisions to a file to find the first one where a particular line of interest
changes can be very painful and error prone. Doing a diff between the current
version of the file and some version far in the future requires you to then do
a binary search to find when the change was made, and can be even harder if the
change was to remove the line entirely (in which case `hg annotate` from the
the file in the future can't help you).

It would appear that I'm not the only one with this issue, which is currently
answered with workarounds at best on stackoverflow:
http://stackoverflow.com/questions/13549555/mercurial-how-to-see-history-for-specific-line-of-code

I can imagine there might be technical challenges - which branch do you follow
if that file branches in the future, but hopefully some sensible defaults could
be devised (e.g. force the user to pick branches to follow or simply fail if
that file is branched in the future)

Perhaps there's already a neat way of doing this - if so, please post it on
stackoverflow!

-- 
You are receiving this mail because:
You are on the CC list for the bug.


More information about the Mercurial-devel mailing list