Comments
Patch
@@ -545,6 +545,7 @@
}
hgclient_t *hgc;
+ int retry = 0;
while (1) {
hgc = connectcmdserver(&opts);
if (!hgc)
@@ -553,6 +554,13 @@
const char **insts = hgc_validate(hgc, argv + 1, argc - 1);
if (insts == NULL)
break;
+ 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());
runinstructions(&opts, insts);
hgc_close(hgc);
free(insts);