Mercurial > hg
diff contrib/chg/chg.c @ 28769:222f482930c8
chg: make connect debug message less repetitive
Before this patch, "connect to" debug message is printed repeatedly because
a previous patch changed how the chg client decides the server is ready to be
connected.
This patch revises the places we print connect debug messages so they are less
repetitive without losing useful information.
author | Jun Wu <quark@fb.com> |
---|---|
date | Mon, 04 Apr 2016 02:36:05 +0100 |
parents | baa073200ba2 |
children | ea86cdcd9b50 |
line wrap: on
line diff
--- a/contrib/chg/chg.c Mon Apr 04 03:17:59 2016 +0100 +++ b/contrib/chg/chg.c Mon Apr 04 02:36:05 2016 +0100 @@ -236,6 +236,7 @@ static const struct timespec sleepreq = {0, 10 * 1000000}; int pst = 0; + debugmsg("try connect to %s repeatedly", opts->sockname); for (unsigned int i = 0; i < 10 * 100; i++) { hgclient_t *hgc = hgc_open(opts->sockname); if (hgc) @@ -271,6 +272,7 @@ { const char *sockname = opts->redirectsockname[0] ? opts->redirectsockname : opts->sockname; + debugmsg("try connect to %s", sockname); hgclient_t *hgc = hgc_open(sockname); if (hgc) return hgc;