This is an archive of the discontinued Mercurial Phabricator instance.

fix: correct the clang-format example hgrc so that it actually works
ClosedPublic

Authored by spectral on Dec 12 2019, 5:42 PM.

Details

Summary

There are three changes here:

  • Remove -i from command, it causes fix to eat your file and empty it out
  • Add set: to pattern, otherwise this is interpreted as just a glob
  • Switch listfile: to include:; listfile: is relative to the current working directory, while include: is relative to the repo root. This makes it so that you don't receive errors when running outside of the repo root about being unable to find the file.

Diff Detail

Repository
rHG Mercurial
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

spectral created this revision.Dec 12 2019, 5:42 PM
spectral updated this revision to Diff 18660.Dec 12 2019, 7:34 PM
pulkit accepted this revision.Dec 20 2019, 7:24 AM
pulkit added a subscriber: pulkit.

Remove -i from command, it causes fix to eat your file and empty it out

We should add a prompt/warning in hg fix when it empties the file.

This revision is now accepted and ready to land.Dec 20 2019, 7:24 AM