Show More
@@ -837,11 +837,11 b' def diffordiffstat(ui, repo, diffopts, n' | |||||
837 | class changeset_printer(object): |
|
837 | class changeset_printer(object): | |
838 | '''show changeset information when templating not requested.''' |
|
838 | '''show changeset information when templating not requested.''' | |
839 |
|
839 | |||
840 |
def __init__(self, ui, repo, |
|
840 | def __init__(self, ui, repo, matchfn, diffopts, buffered): | |
841 | self.ui = ui |
|
841 | self.ui = ui | |
842 | self.repo = repo |
|
842 | self.repo = repo | |
843 | self.buffered = buffered |
|
843 | self.buffered = buffered | |
844 |
self. |
|
844 | self.matchfn = matchfn | |
845 | self.diffopts = diffopts |
|
845 | self.diffopts = diffopts | |
846 | self.header = {} |
|
846 | self.header = {} | |
847 | self.hunk = {} |
|
847 | self.hunk = {} | |
@@ -980,7 +980,7 b' class changeset_printer(object):' | |||||
980 |
|
980 | |||
981 | def showpatch(self, node, matchfn): |
|
981 | def showpatch(self, node, matchfn): | |
982 | if not matchfn: |
|
982 | if not matchfn: | |
983 |
matchfn = self. |
|
983 | matchfn = self.matchfn | |
984 | if matchfn: |
|
984 | if matchfn: | |
985 | stat = self.diffopts.get('stat') |
|
985 | stat = self.diffopts.get('stat') | |
986 | diff = self.diffopts.get('patch') |
|
986 | diff = self.diffopts.get('patch') | |
@@ -1015,8 +1015,8 b' class changeset_printer(object):' | |||||
1015 | class changeset_templater(changeset_printer): |
|
1015 | class changeset_templater(changeset_printer): | |
1016 | '''format changeset information.''' |
|
1016 | '''format changeset information.''' | |
1017 |
|
1017 | |||
1018 |
def __init__(self, ui, repo, |
|
1018 | def __init__(self, ui, repo, matchfn, diffopts, tmpl, mapfile, buffered): | |
1019 |
changeset_printer.__init__(self, ui, repo, |
|
1019 | changeset_printer.__init__(self, ui, repo, matchfn, diffopts, buffered) | |
1020 | formatnode = ui.debugflag and (lambda x: x) or (lambda x: x[:12]) |
|
1020 | formatnode = ui.debugflag and (lambda x: x) or (lambda x: x[:12]) | |
1021 | defaulttempl = { |
|
1021 | defaulttempl = { | |
1022 | 'parent': '{rev}:{node|formatnode} ', |
|
1022 | 'parent': '{rev}:{node|formatnode} ', | |
@@ -1189,17 +1189,18 b' def show_changeset(ui, repo, opts, buffe' | |||||
1189 | regular display via changeset_printer() is done. |
|
1189 | regular display via changeset_printer() is done. | |
1190 | """ |
|
1190 | """ | |
1191 | # options |
|
1191 | # options | |
1192 |
|
|
1192 | matchfn = None | |
1193 | if opts.get('patch') or opts.get('stat'): |
|
1193 | if opts.get('patch') or opts.get('stat'): | |
1194 |
|
|
1194 | matchfn = scmutil.matchall(repo) | |
1195 |
|
1195 | |||
1196 | tmpl, mapfile = gettemplate(ui, opts.get('template'), opts.get('style')) |
|
1196 | tmpl, mapfile = gettemplate(ui, opts.get('template'), opts.get('style')) | |
1197 |
|
1197 | |||
1198 | if not tmpl and not mapfile: |
|
1198 | if not tmpl and not mapfile: | |
1199 |
return changeset_printer(ui, repo, |
|
1199 | return changeset_printer(ui, repo, matchfn, opts, buffered) | |
1200 |
|
1200 | |||
1201 | try: |
|
1201 | try: | |
1202 |
t = changeset_templater(ui, repo, |
|
1202 | t = changeset_templater(ui, repo, matchfn, opts, tmpl, mapfile, | |
|
1203 | buffered) | |||
1203 | except SyntaxError, inst: |
|
1204 | except SyntaxError, inst: | |
1204 | raise util.Abort(inst.args[0]) |
|
1205 | raise util.Abort(inst.args[0]) | |
1205 | return t |
|
1206 | return t |
General Comments 0
You need to be logged in to leave comments.
Login now