D2059: hgsh: enable clang-format
durin42 (Augie Fackler)
phabricator at mercurial-scm.org
Tue Feb 6 10:26:01 UTC 2018
durin42 created this revision.
Herald added a subscriber: mercurial-devel.
Herald added a reviewer: hg-reviewers.
REVISION SUMMARY
Nothing looks awful, so we can just turn it on.
REPOSITORY
rHG Mercurial
REVISION DETAIL
https://phab.mercurial-scm.org/D2059
AFFECTED FILES
contrib/clang-format-blacklist
contrib/hgsh/hgsh.c
CHANGE DETAILS
diff --git a/contrib/hgsh/hgsh.c b/contrib/hgsh/hgsh.c
--- a/contrib/hgsh/hgsh.c
+++ b/contrib/hgsh/hgsh.c
@@ -48,65 +48,65 @@
* have such machine, set to NULL.
*/
#ifndef HG_GATEWAY
-#define HG_GATEWAY "gateway"
+#define HG_GATEWAY "gateway"
#endif
/*
* HG_HOST: hostname of mercurial server. if any machine is allowed, set to
* NULL.
*/
#ifndef HG_HOST
-#define HG_HOST "mercurial"
+#define HG_HOST "mercurial"
#endif
/*
* HG_USER: username to log in from HG_GATEWAY to HG_HOST. if gateway and
* host username are same, set to NULL.
*/
#ifndef HG_USER
-#define HG_USER "hg"
+#define HG_USER "hg"
#endif
/*
* HG_ROOT: root of tree full of mercurial repos. if you do not want to
* validate location of repo when someone is try to access, set to NULL.
*/
#ifndef HG_ROOT
-#define HG_ROOT "/home/hg/repos"
+#define HG_ROOT "/home/hg/repos"
#endif
/*
* HG: path to the mercurial executable to run.
*/
#ifndef HG
-#define HG "/home/hg/bin/hg"
+#define HG "/home/hg/bin/hg"
#endif
/*
* HG_SHELL: shell to use for actions like "sudo" and "su" access to
* mercurial user, and cron jobs. if you want to make these things
* impossible, set to NULL.
*/
#ifndef HG_SHELL
-#define HG_SHELL NULL
+#define HG_SHELL NULL
/* #define HG_SHELL "/bin/bash" */
#endif
/*
* HG_HELP: some way for users to get support if they have problem. if they
* should not get helpful message, set to NULL.
*/
#ifndef HG_HELP
-#define HG_HELP "please contact support at example.com for help."
+#define HG_HELP "please contact support at example.com for help."
#endif
/*
* SSH: path to ssh executable to run, if forwarding from HG_GATEWAY to
* HG_HOST. if you want to use rsh instead (why?), you need to modify
* arguments it is called with. see forward_through_gateway.
*/
#ifndef SSH
-#define SSH "/usr/bin/ssh"
+#define SSH "/usr/bin/ssh"
#endif
/*
@@ -249,7 +249,6 @@
hg_serve,
};
-
/*
* attempt to verify that a directory is really a hg repo, by testing
* for the existence of a subdirectory.
@@ -310,8 +309,7 @@
if (sscanf(argv[2], "hg init %as", &repo) == 1) {
cmd = hg_init;
- }
- else if (sscanf(argv[2], "hg -R %as serve --stdio", &repo) == 1) {
+ } else if (sscanf(argv[2], "hg -R %as serve --stdio", &repo) == 1) {
cmd = hg_serve;
} else {
goto badargs;
diff --git a/contrib/clang-format-blacklist b/contrib/clang-format-blacklist
--- a/contrib/clang-format-blacklist
+++ b/contrib/clang-format-blacklist
@@ -1,6 +1,5 @@
# Files that just need to be migrated to the formatter.
# Do not add new files here!
-contrib/hgsh/hgsh.c
mercurial/cext/base85.c
mercurial/cext/bdiff.c
mercurial/cext/charencode.c
To: durin42, #hg-reviewers
Cc: mercurial-devel
More information about the Mercurial-devel
mailing list