[PATCH 3 of 3 V2] chg: wrap line at 80 chars

Jun Wu quark at fb.com
Tue Apr 5 12:47:56 EDT 2016


# HG changeset patch
# User Jun Wu <quark at fb.com>
# Date 1459874582 -3600
#      Tue Apr 05 17:43:02 2016 +0100
# Node ID d0f3199d741c6fbd5a1e023632fc9a70afae4d93
# Parent  94d4bd939733ded7d2c97c4b89b889775e565f11
chg: wrap line at 80 chars

This is a style fix. I was using tabstop=4 for some early patches, although
I realized we use tabstop=8 later but these early style issues remains. Let's
fix them.

diff --git a/contrib/chg/chg.c b/contrib/chg/chg.c
--- a/contrib/chg/chg.c
+++ b/contrib/chg/chg.c
@@ -72,11 +72,14 @@
 		size_t len = strlen(flags[i].name);
 		size_t narg = flags[i].narg;
 		if (memcmp(arg, flags[i].name, len) == 0) {
-			if (arg[len] == '\0') {  /* --flag (value) */
+			if (arg[len] == '\0') {
+				/* --flag (value) */
 				return narg + 1;
-			} else if (arg[len] == '=' && narg > 0) {  /* --flag=value */
+			} else if (arg[len] == '=' && narg > 0) {
+				/* --flag=value */
 				return 1;
-			} else if (flags[i].name[1] != '-') {  /* short flag */
+			} else if (flags[i].name[1] != '-') {
+				/* short flag */
 				return 1;
 			}
 		}
@@ -163,7 +166,8 @@
 static void lockcmdserver(struct cmdserveropts *opts)
 {
 	if (opts->lockfd == -1) {
-		opts->lockfd = open(opts->lockfile, O_RDWR | O_CREAT | O_NOFOLLOW, 0600);
+		opts->lockfd = open(opts->lockfile,
+				    O_RDWR | O_CREAT | O_NOFOLLOW, 0600);
 		if (opts->lockfd == -1)
 			abortmsgerrno("cannot create lock file %s",
 				      opts->lockfile);


More information about the Mercurial-devel mailing list