##// END OF EJS Templates
logcmdutil: make default parameters of changesetprinters consistent
Yuya Nishihara -
r35971:64f4a680 default
parent child Browse files
Show More
@@ -122,12 +122,12 b' def changesetlabels(ctx):'
122 class changesetprinter(object):
122 class changesetprinter(object):
123 '''show changeset information when templating not requested.'''
123 '''show changeset information when templating not requested.'''
124
124
125 def __init__(self, ui, repo, matchfn, diffopts, buffered):
125 def __init__(self, ui, repo, matchfn=None, diffopts=None, buffered=False):
126 self.ui = ui
126 self.ui = ui
127 self.repo = repo
127 self.repo = repo
128 self.buffered = buffered
128 self.buffered = buffered
129 self.matchfn = matchfn
129 self.matchfn = matchfn
130 self.diffopts = diffopts
130 self.diffopts = diffopts or {}
131 self.header = {}
131 self.header = {}
132 self.hunk = {}
132 self.hunk = {}
133 self.lastheader = None
133 self.lastheader = None
@@ -290,7 +290,7 b' class changesetprinter(object):'
290 class jsonchangeset(changesetprinter):
290 class jsonchangeset(changesetprinter):
291 '''format changeset information.'''
291 '''format changeset information.'''
292
292
293 def __init__(self, ui, repo, matchfn, diffopts, buffered):
293 def __init__(self, ui, repo, matchfn=None, diffopts=None, buffered=False):
294 changesetprinter.__init__(self, ui, repo, matchfn, diffopts, buffered)
294 changesetprinter.__init__(self, ui, repo, matchfn, diffopts, buffered)
295 self.cache = {}
295 self.cache = {}
296 self._first = True
296 self._first = True
@@ -399,8 +399,6 b' class changesettemplater(changesetprinte'
399 # adding/removing arguments before "buffered" to not break callers.
399 # adding/removing arguments before "buffered" to not break callers.
400 def __init__(self, ui, repo, tmplspec, matchfn=None, diffopts=None,
400 def __init__(self, ui, repo, tmplspec, matchfn=None, diffopts=None,
401 buffered=False):
401 buffered=False):
402 diffopts = diffopts or {}
403
404 changesetprinter.__init__(self, ui, repo, matchfn, diffopts, buffered)
402 changesetprinter.__init__(self, ui, repo, matchfn, diffopts, buffered)
405 tres = formatter.templateresources(ui, repo)
403 tres = formatter.templateresources(ui, repo)
406 self.t = formatter.loadtemplater(ui, tmplspec,
404 self.t = formatter.loadtemplater(ui, tmplspec,
General Comments 0
You need to be logged in to leave comments. Login now