Show More
@@ -190,13 +190,22 b' static void unlockcmdserver(struct cmdse' | |||||
190 | opts->lockfd = -1; |
|
190 | opts->lockfd = -1; | |
191 | } |
|
191 | } | |
192 |
|
192 | |||
|
193 | static const char *gethgcmd(void) | |||
|
194 | { | |||
|
195 | static const char *hgcmd = NULL; | |||
|
196 | if (!hgcmd) { | |||
|
197 | hgcmd = getenv("CHGHG"); | |||
|
198 | if (!hgcmd || hgcmd[0] == '\0') | |||
|
199 | hgcmd = getenv("HG"); | |||
|
200 | if (!hgcmd || hgcmd[0] == '\0') | |||
|
201 | hgcmd = "hg"; | |||
|
202 | } | |||
|
203 | return hgcmd; | |||
|
204 | } | |||
|
205 | ||||
193 | static void execcmdserver(const struct cmdserveropts *opts) |
|
206 | static void execcmdserver(const struct cmdserveropts *opts) | |
194 | { |
|
207 | { | |
195 |
const char *hgcmd = get |
|
208 | const char *hgcmd = gethgcmd(); | |
196 | if (!hgcmd || hgcmd[0] == '\0') |
|
|||
197 | hgcmd = getenv("HG"); |
|
|||
198 | if (!hgcmd || hgcmd[0] == '\0') |
|
|||
199 | hgcmd = "hg"; |
|
|||
200 |
|
209 | |||
201 | const char *baseargv[] = { |
|
210 | const char *baseargv[] = { | |
202 | hgcmd, |
|
211 | hgcmd, |
General Comments 0
You need to be logged in to leave comments.
Login now