comparison mercurial/dispatch.py @ 16683:525fdb738975

cleanup: eradicate long lines
author Brodie Rao <brodie@sf.io>
date Sat, 12 May 2012 15:54:54 +0200
parents d36a384bec87
children 67964cda8701
comparison
equal deleted inserted replaced
16676:654b9e1966f7 16683:525fdb738975
10 import util, commands, hg, fancyopts, extensions, hook, error 10 import util, commands, hg, fancyopts, extensions, hook, error
11 import cmdutil, encoding 11 import cmdutil, encoding
12 import ui as uimod 12 import ui as uimod
13 13
14 class request(object): 14 class request(object):
15 def __init__(self, args, ui=None, repo=None, fin=None, fout=None, ferr=None): 15 def __init__(self, args, ui=None, repo=None, fin=None, fout=None,
16 ferr=None):
16 self.args = args 17 self.args = args
17 self.ui = ui 18 self.ui = ui
18 self.repo = repo 19 self.repo = repo
19 20
20 # input/output/error streams 21 # input/output/error streams
530 cmd = aliases[0] 531 cmd = aliases[0]
531 fn = entry[0] 532 fn = entry[0]
532 533
533 if cmd and util.safehasattr(fn, 'shell'): 534 if cmd and util.safehasattr(fn, 'shell'):
534 d = lambda: fn(ui, *args[1:]) 535 d = lambda: fn(ui, *args[1:])
535 return lambda: runcommand(lui, None, cmd, args[:1], ui, options, d, [], {}) 536 return lambda: runcommand(lui, None, cmd, args[:1], ui, options, d,
537 [], {})
536 538
537 restorecommands() 539 restorecommands()
538 540
539 _loaded = set() 541 _loaded = set()
540 def _dispatch(req): 542 def _dispatch(req):
678 if guess and repos.count(guess) == len(repos): 680 if guess and repos.count(guess) == len(repos):
679 req.args = ['--repository', guess] + fullargs 681 req.args = ['--repository', guess] + fullargs
680 return _dispatch(req) 682 return _dispatch(req)
681 if not path: 683 if not path:
682 raise error.RepoError(_("no repository found in '%s'" 684 raise error.RepoError(_("no repository found in '%s'"
683 " (.hg not found)") % os.getcwd()) 685 " (.hg not found)")
686 % os.getcwd())
684 raise 687 raise
685 if repo: 688 if repo:
686 ui = repo.ui 689 ui = repo.ui
687 args.insert(0, repo) 690 args.insert(0, repo)
688 elif rpath: 691 elif rpath: