Improve clang-format hg hook support by using an hg extension
Categories
(Developer Infrastructure :: Lint and Formatting, enhancement)
Tracking
(Not tracked)
People
(Reporter: Sylvestre, Assigned: Sylvestre)
References
(Blocks 1 open bug)
Details
Attachments
(6 files)
We want to update the content of the pending changes.
And this isn't as trivial I was expecting with hg.
Assignee | ||
Comment 1•6 years ago
|
||
Assignee | ||
Comment 2•6 years ago
|
||
Assignee | ||
Updated•6 years ago
|
Assignee | ||
Comment 3•6 years ago
|
||
Depends on D18882
Assignee | ||
Comment 4•6 years ago
|
||
Depends on D19588
Updated•6 years ago
|
Updated•6 years ago
|
Updated•6 years ago
|
Updated•6 years ago
|
Pushed by cosheehan@mozilla.com:
https://hg.mozilla.org/hgcustom/version-control-tools/rev/b5bd6cdbb737
hgext: Add a new hg extension to run clang-format at the commit step r=sheehan
https://hg.mozilla.org/hgcustom/version-control-tools/rev/79d0d5b4b4a0
hgext: Add clang-format to the bootstrap process r=sheehan
https://hg.mozilla.org/hgcustom/version-control-tools/rev/148d671f1adf
hgext: Add a test for the clang-format extension r=sheehan
https://hg.mozilla.org/hgcustom/version-control-tools/rev/c277b6bd2680
hgext: Ride along: rename pull/push to wrappedpull/wrappedpush r=sheehan
Assignee | ||
Updated•6 years ago
|
Comment 6•6 years ago
|
||
This will allow us to use the logic again in a child commit.
Comment 7•6 years ago
|
||
This commit adds support for hg commit --amend
to the clang-format
extension. cmdutil.amend
is wrapped and some of the basic logic
(such as building the matcher object and creating the list of files
to be amended) is pulled into the wrapper function to determine if
clang-format should be applied.
cmdutil.amend
should be safe to wrap here since it is only called
from within the amend
code branch of the commit
command.
While we add the --amend
test to test-clang-format.t
, we also
add some spacing to other lines in the test to improve readability.
Assignee | ||
Updated•6 years ago
|
Updated•2 years ago
|
Description
•