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).