Implementing hg log --graph --follow-first
mpm at selenic.com
Sat Feb 25 12:07:48 CST 2012
On Sat, 2012-02-25 at 16:15 +0100, Patrick Mézard wrote:
> commands.log() implements a --follow-first option:
> ('', 'follow-first', None,
> _('only follow the first parent of merge changesets (DEPRECATED)')),
> It was deprecated in:
> changeset: 15407:e4a17bb8472f
> parent: 15404:c1eb8398fe82
> user: Matt Mackall <mpm at selenic.com>
> date: Wed Nov 02 15:06:40 2011 -0500
> summary: log: hide some low-utility options
> which looks more like hiding than deprecating.
First note that 'deprecated' stopped meaning 'scheduled for removal' for
Mercurial a long ago. It now just means 'strongly discouraged'.
> My problem is to support this option in graphlog, meaning supporting
> it in revsets. follow() revset currently calls filectx.ancestors(), so
> it would mean adding an "onlyfirst=False" option to
> filectx.ancestors() and workingfilectx.ancestors(). I would rather
> know if we intend to really deprecated this option and emit a warning
> like "--follow-first is not longer supported, falling back to
> --follow" instead.
Probably the right way to do it is to hand-roll a hidden _followfirst
revset method that iterates on [f]ctx.p1(). Nothing else will ever want
Mathematics is the supreme nostalgia of our time.
More information about the Mercurial-devel