Fri, 26 Feb 2016 15:22:46 +0000 chgserver: make _renewui load repo and command line configs
Jun Wu <quark@fb.com> [Fri, 26 Feb 2016 15:22:46 +0000] rev 28264
chgserver: make _renewui load repo and command line configs Before this patch, there is no way to load repo config in chgserver. This patch revised _renewui to let it load repo config and take command line flags passed into consideration. The _renewui logic is not ideal at present because it's very tricky to know what should copy and what should not from the old ui object to the new one. This is partially because the current ui and config object design is not ideal. In the future, we may want to avoid all ui or config copies.
Fri, 26 Feb 2016 15:07:58 +0000 dispatch: add wd parameter to _getlocal
Jun Wu <quark@fb.com> [Fri, 26 Feb 2016 15:07:58 +0000] rev 28263
dispatch: add wd parameter to _getlocal Before this patch, _getlocal uses os.getcwd() to locate repo in current dir. chgserver needs it to load repo config and has to do chdir twice: the first is to set current directory and the second is to redo the side effect (in case hg --cwd some/relative/path, chdir will be called again in dispatch later), which is not pretty. This patch adds an optional wd parameter to make it possible to specify wd without chdir (and its side effect).
Fri, 26 Feb 2016 14:50:04 +0000 chgserver: add utilities to calculate confighash
Jun Wu <quark@fb.com> [Fri, 26 Feb 2016 14:50:04 +0000] rev 28262
chgserver: add utilities to calculate confighash confighash is the hash of sensitive config items like [extensions], and sensitive environment variables like HG*, LD_*, etc. The config items can come from global, user, repo config, and command line flags. For chgserver, it is designed that once confighash changes, the server is not qualified to serve its client and should redirect the client to a new server. The server does not need to exit in this case, since it can still be valid (have a matched confighash) to serve other chg clients.
(0) -10000 -3000 -1000 -300 -100 -30 -10 -3 +3 +10 +30 +100 +300 +1000 +3000 +10000 tip