Implementing hg log --graph --follow-first

Patrick Mézard patrick at mezard.eu
Sat Feb 25 15:15:19 UTC 2012


Hello,

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. 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.

--
Patrick Mézard



More information about the Mercurial-devel mailing list