##// END OF EJS Templates
Moved --cwd handling in front of -R handling again. Shorter code for initial -R.
Thomas Arendsen Hein -
r1859:39c46510 default
parent child Browse files
Show More
@@ -2834,12 +2834,15 b' def dispatch(args):'
2834
2834
2835 try:
2835 try:
2836 try:
2836 try:
2837 path = options["repository"]
2837 if options['cwd']:
2838 if path:
2838 try:
2839 repo = hg.repository(u, path=path)
2839 os.chdir(options['cwd'])
2840 else:
2840 except OSError, inst:
2841 repo = None
2841 raise util.Abort('%s: %s' %
2842 path = ""
2842 (options['cwd'], inst.strerror))
2843
2844 path = options["repository"] or ""
2845 repo = path and hg.repository(u, path=path) or None
2843
2846
2844 if options['help']:
2847 if options['help']:
2845 help_(u, cmd, options['version'])
2848 help_(u, cmd, options['version'])
@@ -2851,13 +2854,6 b' def dispatch(args):'
2851 help_(u, 'shortlist')
2854 help_(u, 'shortlist')
2852 sys.exit(0)
2855 sys.exit(0)
2853
2856
2854 if options['cwd']:
2855 try:
2856 os.chdir(options['cwd'])
2857 except OSError, inst:
2858 raise util.Abort('%s: %s' %
2859 (options['cwd'], inst.strerror))
2860
2861 if cmd not in norepo.split():
2857 if cmd not in norepo.split():
2862 try:
2858 try:
2863 if not repo:
2859 if not repo:
General Comments 0
You need to be logged in to leave comments. Login now