D2059: hgsh: enable clang-format

2018-02-07 Thread durin42 (Augie Fackler)
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=5296

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_SHELLNULL
+#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 supp...@example.com for help."
+#define HG_HELP "please contact supp...@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", ) == 1) {
cmd = hg_init;
-   }
-   else if (sscanf(argv[2], "hg -R %as serve --stdio", ) == 1) {
+   } else if (sscanf(argv[2], "hg -R %as serve --stdio", ) == 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, yuja
Cc: mercurial-devel
___
Mercurial-devel mailing list
Mercurial-devel@mercurial-scm.org
https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel


D2059: hgsh: enable clang-format

2018-02-06 Thread durin42 (Augie Fackler)
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_SHELLNULL
+#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 supp...@example.com for help."
+#define HG_HELP "please contact supp...@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", ) == 1) {
cmd = hg_init;
-   }
-   else if (sscanf(argv[2], "hg -R %as serve --stdio", ) == 1) {
+   } else if (sscanf(argv[2], "hg -R %as serve --stdio", ) == 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
___
Mercurial-devel mailing list
Mercurial-devel@mercurial-scm.org
https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel