Patchwork [2,of,5,BLACKGNAROK] formatting: remove the data-ogre from the config example

login
register
mail settings
Submitter Pierre-Yves David
Date Oct. 7, 2019, 4:15 p.m.
Message ID <99946ed8e49657d06784.1570464910@nodosa.octobus.net>
Download mbox | patch
Permalink /patch/42064/
State Accepted
Headers show

Comments

Pierre-Yves David - Oct. 7, 2019, 4:15 p.m.
# HG changeset patch
# User Pierre-Yves David <pierre-yves.david@octobus.net>
# Date 1570463314 14400
#      Mon Oct 07 11:48:34 2019 -0400
# Node ID 99946ed8e49657d0678426b9fda3958bd102ed67
# Parent  f243703025e2ba5a53feb6f8ca8f029b6e186194
# EXP-Topic blackgnarok-bytemageddon
# Available At https://bitbucket.org/octobus/mercurial-devel/
#              hg pull https://bitbucket.org/octobus/mercurial-devel/ -r 99946ed8e496
formatting: remove the data-ogre from the config example

Without he final `-`, black ignore the stdin and just looks at file provided as
command line argument.

Since `hg fix` feeds the file content through stdin and does not pass file
argument, this meant black happily exited successful (all files passed as
argument were formatted) without any output. Fix picked this "no output" as the
new file content, deleting all previous content.

I appreciate the fact this effectively removed all buggy code in any files
processing that way, but this also ate all my data.

The example config is now fixed in that regards.

Patch

diff --git a/contrib/examples/fix.hgrc b/contrib/examples/fix.hgrc
--- a/contrib/examples/fix.hgrc
+++ b/contrib/examples/fix.hgrc
@@ -11,5 +11,5 @@  rustfmt:pattern = set:**.rs
 # git+https://github.com/python/black/@d9e71a75ccfefa3d9156a64c03313a0d4ad981e5
 # to have the dependencies for grey.
 #
-# black:command = python3.7 contrib/grey.py --skip-string-normalization
+# black:command = python3.7 contrib/grey.py --skip-string-normalization -
 # black:pattern = set:**.py - hgext/fsmonitor/pywatchman/** - mercurial/thirdparty/** - "contrib/python-zstandard/**"