[PATCH] chg: just forward --time to command server

Yuya Nishihara yuya at tcha.org
Sat Oct 7 13:19:33 UTC 2017


# HG changeset patch
# User Yuya Nishihara <yuya at tcha.org>
# Date 1507381630 -32400
#      Sat Oct 07 22:07:10 2017 +0900
# Node ID f2a8ec9a8d9bd7c85e3d605543766c756d898d8f
# Parent  5584116d8f7136476f2ea835277568c372f0c866
chg: just forward --time to command server

Since we've removed the use of atexit in de5c9d0e02ea, --time just works.

diff --git a/contrib/chg/chg.c b/contrib/chg/chg.c
--- a/contrib/chg/chg.c
+++ b/contrib/chg/chg.c
@@ -369,7 +369,6 @@ static int isunsupported(int argc, const
 		SERVE = 1,
 		DAEMON = 2,
 		SERVEDAEMON = SERVE | DAEMON,
-		TIME = 4,
 	};
 	unsigned int state = 0;
 	int i;
@@ -381,11 +380,8 @@ static int isunsupported(int argc, const
 		else if (strcmp("-d", argv[i]) == 0 ||
 			 strcmp("--daemon", argv[i]) == 0)
 			state |= DAEMON;
-		else if (strcmp("--time", argv[i]) == 0)
-			state |= TIME;
 	}
-	return (state & TIME) == TIME ||
-	       (state & SERVEDAEMON) == SERVEDAEMON;
+	return (state & SERVEDAEMON) == SERVEDAEMON;
 }
 
 static void execoriginalhg(const char *argv[])


More information about the Mercurial-devel mailing list