Mercurial > public > mercurial-scm > hg-stable
diff mercurial/dispatch.py @ 17773:434e5bd615fc
commands: don't infer repo for commands like update (issue2748)
Maintain a whitelist of commands to infer the repo for instead. The whitelist
contains those commands that take file(s) in the working dir as arguments.
author | Siddharth Agarwal <sid0@fb.com> |
---|---|
date | Tue, 16 Oct 2012 11:43:15 -0700 |
parents | e51d4aedace9 |
children | 0f9013112eba |
line wrap: on
line diff
--- a/mercurial/dispatch.py Mon Oct 15 09:43:34 2012 -0700 +++ b/mercurial/dispatch.py Tue Oct 16 11:43:15 2012 -0700 @@ -715,7 +715,8 @@ raise except error.RepoError: if cmd not in commands.optionalrepo.split(): - if args and not path: # try to infer -R from command args + if (cmd in commands.inferrepo.split() and + args and not path): # try to infer -R from command args repos = map(cmdutil.findrepo, args) guess = repos[0] if guess and repos.count(guess) == len(repos):