Mercurial > hg > mercurial-crew-with-dirclash
comparison mercurial/commands.py @ 517:9b884be92af2
Add --repository option
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Add --repository option
From: Goffredo Baroncelli <kreijack@libero.it>
manifest hash: 714316cb69ed5fcd981aa1bdb12de499e8348997
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.0 (GNU/Linux)
iD8DBQFCwuyRywK+sNU5EO8RAmh7AKCtUxqC0KFcMYmoh/voLAbh6BncpwCgrL42
zzSMZAiUg4KEO9BxxlJOcDs=
=eUcM
-----END PGP SIGNATURE-----
author | mpm@selenic.com |
---|---|
date | Wed, 29 Jun 2005 10:46:41 -0800 |
parents | 873228c2f6cf |
children | b0187336843c |
comparison
equal
deleted
inserted
replaced
516:873228c2f6cf | 517:9b884be92af2 |
---|---|
812 options = {} | 812 options = {} |
813 opts = [('v', 'verbose', None, 'verbose'), | 813 opts = [('v', 'verbose', None, 'verbose'), |
814 ('d', 'debug', None, 'debug'), | 814 ('d', 'debug', None, 'debug'), |
815 ('q', 'quiet', None, 'quiet'), | 815 ('q', 'quiet', None, 'quiet'), |
816 ('p', 'profile', None, 'profile'), | 816 ('p', 'profile', None, 'profile'), |
817 ('R', 'repository', "", 'repository root directory'), | |
817 ('y', 'noninteractive', None, 'run non-interactively'), | 818 ('y', 'noninteractive', None, 'run non-interactively'), |
818 ('', 'version', None, 'output version information and exit'), | 819 ('', 'version', None, 'output version information and exit'), |
819 ] | 820 ] |
820 | 821 |
821 args = fancyopts.fancyopts(args, opts, options, | 822 args = fancyopts.fancyopts(args, opts, options, |
850 help(u, cmd) | 851 help(u, cmd) |
851 sys.exit(-1) | 852 sys.exit(-1) |
852 | 853 |
853 try: | 854 try: |
854 if cmd not in norepo.split(): | 855 if cmd not in norepo.split(): |
855 repo = hg.repository(ui = u) | 856 path = options["repository"] or "" |
857 repo = hg.repository(ui=u, path=path) | |
856 d = lambda: i[0](u, repo, *args, **cmdoptions) | 858 d = lambda: i[0](u, repo, *args, **cmdoptions) |
857 else: | 859 else: |
858 d = lambda: i[0](u, *args, **cmdoptions) | 860 d = lambda: i[0](u, *args, **cmdoptions) |
859 | 861 |
860 if options['profile']: | 862 if options['profile']: |