32 # be specifying the version(s) of Mercurial they are tested with, or |
31 # be specifying the version(s) of Mercurial they are tested with, or |
33 # leave the attribute unspecified. |
32 # leave the attribute unspecified. |
34 testedwith = 'internal' |
33 testedwith = 'internal' |
35 |
34 |
36 def maketemplater(ui, repo, tmpl): |
35 def maketemplater(ui, repo, tmpl): |
37 try: |
36 return cmdutil.changeset_templater(ui, repo, False, None, tmpl, None, False) |
38 t = cmdutil.changeset_templater(ui, repo, False, None, tmpl, |
|
39 None, False) |
|
40 except SyntaxError as inst: |
|
41 raise error.Abort(inst.args[0]) |
|
42 return t |
|
43 |
37 |
44 def changedlines(ui, repo, ctx1, ctx2, fns): |
38 def changedlines(ui, repo, ctx1, ctx2, fns): |
45 added, removed = 0, 0 |
39 added, removed = 0, 0 |
46 fmatch = scmutil.matchfiles(repo, fns) |
40 fmatch = scmutil.matchfiles(repo, fns) |
47 diff = ''.join(patch.diff(repo, ctx1.node(), ctx2.node(), fmatch)) |
41 diff = ''.join(patch.diff(repo, ctx1.node(), ctx2.node(), fmatch)) |