Patchwork D2059: hgsh: enable clang-format

login
register
mail settings
Submitter phabricator
Date Feb. 7, 2018, 1:38 p.m.
Message ID <e2af2647bc515fdd8ce2492ee5f2fbd5@localhost.localdomain>
Download mbox | patch
Permalink /patch/27429/
State Not Applicable
Headers show

Comments

phabricator - Feb. 7, 2018, 1:38 p.m.
This revision was automatically updated to reflect the committed changes.
Closed by commit rHG580f7b1b88c7: hgsh: enable clang-format (authored by durin42, committed by ).

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST UPDATE
  https://phab.mercurial-scm.org/D2059?vs=5240&id=5296

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

AFFECTED FILES
  contrib/clang-format-blacklist
  contrib/hgsh/hgsh.c

CHANGE DETAILS




To: durin42, #hg-reviewers, yuja
Cc: mercurial-devel

Patch

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@example.com for help."
+#define HG_HELP "please contact support@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