mirror of
https://github.com/facebook/sapling.git
synced 2024-10-06 06:47:41 +03:00
pycliparser: do not hardcode globalopts in parsecommand
Summary: The only callsite in dispatch.py actually provide the global flags. So there is no need to append the global flags again. This makes `parsecommand` more flexible. Reviewed By: danielocfb Differential Revision: D33489536 fbshipit-source-id: 05d623a3ec51d585d9307cb5660d841d6d222bc2
This commit is contained in:
parent
2ec38bb655
commit
b0cb9bc5a8
@ -119,8 +119,7 @@ fn parse_command(
|
||||
args: Vec<String>,
|
||||
definitions: Vec<FlagDef>,
|
||||
) -> PyResult<(Vec<Str>, HashMap<Str, Value>)> {
|
||||
let mut flags: Vec<Flag> = definitions.into_iter().map(Into::into).collect();
|
||||
flags.extend(HgGlobalOpts::flags());
|
||||
let flags: Vec<Flag> = definitions.into_iter().map(Into::into).collect();
|
||||
|
||||
let result = ParseOptions::new()
|
||||
.flag_alias("repo", "repository")
|
||||
|
Loading…
Reference in New Issue
Block a user