Submitter | Jun Wu |
---|---|
Date | March 4, 2016, 1:28 p.m. |
Message ID | <02c370d356044409c1ec.1457098138@x1c> |
Download | mbox | patch |
Permalink | /patch/13593/ |
State | Superseded |
Commit | ffd3ac07b1d79dda7f57bd826208fdaf92a76717 |
Delegated to: | Yuya Nishihara |
Headers | show |
Comments
Patch
diff --git a/contrib/chg/chg.c b/contrib/chg/chg.c --- a/contrib/chg/chg.c +++ b/contrib/chg/chg.c @@ -557,6 +557,7 @@ } hgclient_t *hgc; + size_t retry = 0; while (1) { hgc = connectcmdserver(&opts); if (!hgc) @@ -567,6 +568,13 @@ break; runinstructions(hgc, &opts, instsize); hgc_close(hgc); + if (++retry > 10) + abortmsg("too many redirections.\n" + "Please make sure %s is not a wrapper which " + "changes sensitive environment variables " + "before executing hg. If you have to use a " + "wrapper, wrap chg instead of hg.", + gethgcmd()); } setupsignalhandler(hgc_peerpid(hgc));