mercurial/dispatch.py
changeset 34781 fe987d0b9e1e
parent 34638 021607b4ef49
child 34979 7384250eabd9
child 35166 25c543944bc0
equal deleted inserted replaced
34780:070ba789f4d0 34781:fe987d0b9e1e
    33     help,
    33     help,
    34     hg,
    34     hg,
    35     hook,
    35     hook,
    36     profiling,
    36     profiling,
    37     pycompat,
    37     pycompat,
       
    38     registrar,
    38     scmutil,
    39     scmutil,
    39     ui as uimod,
    40     ui as uimod,
    40     util,
    41     util,
    41 )
    42 )
       
    43 
       
    44 unrecoverablewrite = registrar.command.unrecoverablewrite
    42 
    45 
    43 class request(object):
    46 class request(object):
    44     def __init__(self, args, ui=None, repo=None, fin=None, fout=None,
    47     def __init__(self, args, ui=None, repo=None, fin=None, fout=None,
    45                  ferr=None, prereposetups=None):
    48                  ferr=None, prereposetups=None):
    46         self.args = args
    49         self.args = args
   493     def args(self):
   496     def args(self):
   494         args = pycompat.maplist(util.expandpath, self.givenargs)
   497         args = pycompat.maplist(util.expandpath, self.givenargs)
   495         return aliasargs(self.fn, args)
   498         return aliasargs(self.fn, args)
   496 
   499 
   497     def __getattr__(self, name):
   500     def __getattr__(self, name):
   498         adefaults = {r'norepo': True,
   501         adefaults = {r'norepo': True, r'cmdtype': unrecoverablewrite,
   499                      r'optionalrepo': False, r'inferrepo': False}
   502                      r'optionalrepo': False, r'inferrepo': False}
   500         if name not in adefaults:
   503         if name not in adefaults:
   501             raise AttributeError(name)
   504             raise AttributeError(name)
   502         if self.badalias or util.safehasattr(self, 'shell'):
   505         if self.badalias or util.safehasattr(self, 'shell'):
   503             return adefaults[name]
   506             return adefaults[name]