equal
deleted
inserted
replaced
2842 if options['debugger']: |
2842 if options['debugger']: |
2843 pdb.set_trace() |
2843 pdb.set_trace() |
2844 |
2844 |
2845 try: |
2845 try: |
2846 try: |
2846 try: |
|
2847 path = options["repository"] |
|
2848 if path: |
|
2849 repo = hg.repository(u, path=path) |
|
2850 else: |
|
2851 repo = None |
|
2852 path = "" |
|
2853 |
2847 if options['help']: |
2854 if options['help']: |
2848 help_(u, cmd, options['version']) |
2855 help_(u, cmd, options['version']) |
2849 sys.exit(0) |
2856 sys.exit(0) |
2850 elif options['version']: |
2857 elif options['version']: |
2851 show_version(u) |
2858 show_version(u) |
2860 except OSError, inst: |
2867 except OSError, inst: |
2861 raise util.Abort('%s: %s' % |
2868 raise util.Abort('%s: %s' % |
2862 (options['cwd'], inst.strerror)) |
2869 (options['cwd'], inst.strerror)) |
2863 |
2870 |
2864 if cmd not in norepo.split(): |
2871 if cmd not in norepo.split(): |
2865 path = options["repository"] or "" |
2872 if not repo: |
2866 repo = hg.repository(u, path=path) |
2873 repo = hg.repository(u, path=path) |
2867 u = repo.ui |
2874 u = repo.ui |
2868 for x in external: |
2875 for x in external: |
2869 if hasattr(x, 'reposetup'): |
2876 if hasattr(x, 'reposetup'): |
2870 x.reposetup(u, repo) |
2877 x.reposetup(u, repo) |
2871 d = lambda: func(u, repo, *args, **cmdoptions) |
2878 d = lambda: func(u, repo, *args, **cmdoptions) |