# HG changeset patch
# User Boris Feld <boris.f...@octobus.net>
# Date 1547462137 -3600
#      Mon Jan 14 11:35:37 2019 +0100
# Node ID 1b6f196b7e094278f9956a479e10e02cd1108a12
# Parent  8d0d695fc7910665452b81052d1bbc55b3829b14
# EXP-Topic format-source
# Available At https://bitbucket.org/octobus/mercurial-devel/
#              hg pull https://bitbucket.org/octobus/mercurial-devel/ -r 
1b6f196b7e09
formatting: apply clang-format using the format-source extension

This applies formatting on the source code, similar to what `make format-c`
does.

(This catch a lack of formatting in one of our file).

Using the format source extension means this transformation is tracked in the
history and can be reused during merges. This smooth the consequence of
formatting changes between branches (and for in-progress works).


In theory, the initial formatting is done through format-source. However,
doing it after the fact is still beneficial as it will track the configuration
changes.

We have two main motivations to do this. First, we want to have format-source
used and testing in a wider range of real-world use case. This will help the
extension to mature before we submit it for upstream inclusion. Second, we got
impacted by formatting change during the 4.9 cycle, having format-source
enabled will help us in the future.

This formatting has been performed with format-source version 3.3.

We also plan to use format-source for rust formatting (and python formatting
once a tool has been picked).

diff --git a/.hg-format-source b/.hg-format-source
new file mode 100644
--- /dev/null
+++ b/.hg-format-source
@@ -0,0 +1,1 @@
+{"configpaths": [".clang-format", "contrib/clang-format-ignorelist"], 
"pattern": "set:(**.c or **.cc or **.h) and not 
\"listfile:contrib/clang-format-ignorelist\"", "tool": "clang-format"}
diff --git a/mercurial/cext/revlog.c b/mercurial/cext/revlog.c
--- a/mercurial/cext/revlog.c
+++ b/mercurial/cext/revlog.c
@@ -995,8 +995,8 @@ static inline int index_baserev(indexObj
        if (result < -1) {
                PyErr_Format(
                    PyExc_ValueError,
-                   "corrupted revlog, revision base out of range: %d, %d",
-                   rev, result);
+                   "corrupted revlog, revision base out of range: %d, %d", rev,
+                   result);
                return -2;
        }
        return result;
_______________________________________________
Mercurial-devel mailing list
Mercurial-devel@mercurial-scm.org
https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel

Reply via email to