Patchwork D10011: blackbox: Remove misleading quotes in config example

login
register
mail settings
Submitter phabricator
Date Feb. 17, 2021, 12:59 p.m.
Message ID <differential-rev-PHID-DREV-bros5sflpoxfwsgqzmg2-req@mercurial-scm.org>
Download mbox | patch
Permalink /patch/48324/
State Superseded
Headers show

Comments

phabricator - Feb. 17, 2021, 12:59 p.m.
SimonSapin created this revision.
Herald added a reviewer: hg-reviewers.
Herald added a subscriber: mercurial-patches.

REVISION SUMMARY
  This example previously looked like quotes were part of configuration file
  syntax, and the parsed `date-format` value was the part inside of them.
  This is not the case: config syntax only parses quotes in list values.
  Instead using that config would result in literal quotes being written to
  `.hg/blackbox.log` as part of the date format.
  
  This changes the example to what was probably intended.

REPOSITORY
  rHG Mercurial

BRANCH
  default

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

AFFECTED FILES
  hgext/blackbox.py

CHANGE DETAILS




To: SimonSapin, #hg-reviewers
Cc: mercurial-patches, mercurial-devel

Patch

diff --git a/hgext/blackbox.py b/hgext/blackbox.py
--- a/hgext/blackbox.py
+++ b/hgext/blackbox.py
@@ -38,7 +38,7 @@ 
   [blackbox]
   # Include nanoseconds in log entries with %f (see Python function
   # datetime.datetime.strftime)
-  date-format = '%Y-%m-%d @ %H:%M:%S.%f'
+  date-format = %Y-%m-%d @ %H:%M:%S.%f
 
 """