##// END OF EJS Templates
dispatch: change cwd when loading local config...
dispatch: change cwd when loading local config Previously, the `_getlocal` function would not correctly load the repo config when given a relative `rpath` and an alternate cwd via the `wd` parameter. Normally when `--cwd` is specified, hg changes to the given directory before attempting to load the local config (and therefore does not specify a `wd`). The only time the function is called with `wd` set is when hg is running as a command server (e.g., with chg), in which case each forked worker process will attempt to configure itself via `_getlocal` before responding to the client. When given a relative repo path, the worker fails to load the repo config, detects a config mismatch with the client, and enters a redirect/respawn loop. To fix this, we can simply change to the desired working directory during config loading. (Note that simply concatenating `wd` and `rpath` won't work in all cases. The repo path could be something more complicated than a simple relative path, such as a `union:` repo.)

File last commit:

r50054:9d1e9689 merge default
r50317:3681a476 default
Show More
Cargo.toml
24 lines | 462 B | application/toml | TOMLLexer
[package]
name = "rhg"
version = "0.1.0"
authors = [
"Antoine Cezar <antoine.cezar@octobus.net>",
"Raphaël Gomès <raphael.gomes@octobus.net>",
]
edition = "2018"
[dependencies]
atty = "0.2.14"
hg-core = { path = "../hg-core"}
chrono = "0.4.19"
clap = "2.34.0"
derive_more = "0.99.17"
home = "0.5.3"
lazy_static = "1.4.0"
log = "0.4.14"
micro-timer = "0.4.0"
regex = "1.5.5"
env_logger = "0.9.0"
format-bytes = "0.3.0"
users = "0.11.0"
which = "4.2.5"