# HG changeset patch # User mpm@selenic.com # Date 2005-06-29 18:46:41 # Node ID 9b884be92af2b18ebec7cfe821b07a26ad40d260 # Parent 873228c2f6cf6b5bbfba153329fa026a710cabbd Add --repository option -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Add --repository option From: Goffredo Baroncelli manifest hash: 714316cb69ed5fcd981aa1bdb12de499e8348997 -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.0 (GNU/Linux) iD8DBQFCwuyRywK+sNU5EO8RAmh7AKCtUxqC0KFcMYmoh/voLAbh6BncpwCgrL42 zzSMZAiUg4KEO9BxxlJOcDs= =eUcM -----END PGP SIGNATURE----- diff --git a/mercurial/commands.py b/mercurial/commands.py --- a/mercurial/commands.py +++ b/mercurial/commands.py @@ -814,6 +814,7 @@ def dispatch(args): ('d', 'debug', None, 'debug'), ('q', 'quiet', None, 'quiet'), ('p', 'profile', None, 'profile'), + ('R', 'repository', "", 'repository root directory'), ('y', 'noninteractive', None, 'run non-interactively'), ('', 'version', None, 'output version information and exit'), ] @@ -852,7 +853,8 @@ def dispatch(args): try: if cmd not in norepo.split(): - repo = hg.repository(ui = u) + path = options["repository"] or "" + repo = hg.repository(ui=u, path=path) d = lambda: i[0](u, repo, *args, **cmdoptions) else: d = lambda: i[0](u, *args, **cmdoptions)