D6167: fix: allow fixer tools to return metadata in addition to the file content

hooper (Danny Hooper) phabricator at mercurial-scm.org
Tue Apr 23 16:51:53 EDT 2019


hooper added inline comments.

INLINE COMMENTS

> martinvonz wrote in fix.py:559-570
> Would the thing that processes this metadata usually not care to aggregate per fixer? If they did, it seems they would now have to look for a `fixer-applied='my-fixer'` entry and then take the metadata from the preceding entry. Did you consider instead making this function return an entry like `{fixername: metadatajson}` (and leave `metadatajson` as None if `not fixer.shouldoutputmetadata()`)?

I think we had some other possibilities in mind, but after trying it, I think your idea is cleaner for expected use cases. I don't think it makes anything harder, but it makes some things easier. The diff is pretty small.

REPOSITORY
  rHG Mercurial

REVISION DETAIL
  https://phab.mercurial-scm.org/D6167

To: hooper, #hg-reviewers, durin42
Cc: martinvonz, lothiraldan, durin42, indygreg, mercurial-devel


More information about the Mercurial-devel mailing list