comparison hgext/churn.py @ 26587:56b2bcea2529

error: get Abort from 'error' instead of 'util' The home of 'Abort' is 'error' not 'util' however, a lot of code seems to be confused about that and gives all the credit to 'util' instead of the hardworking 'error'. In a spirit of equity, we break the cycle of injustice and give back to 'error' the respect it deserves. And screw that 'util' poser. For great justice.
author Pierre-Yves David <pierre-yves.david@fb.com>
date Thu, 08 Oct 2015 12:55:45 -0700
parents 328739ea70c3
children 79fc627578ac
comparison
equal deleted inserted replaced
26586:d51c658d3f04 26587:56b2bcea2529
7 # GNU General Public License version 2 or any later version. 7 # GNU General Public License version 2 or any later version.
8 8
9 '''command to display statistics about repository history''' 9 '''command to display statistics about repository history'''
10 10
11 from mercurial.i18n import _ 11 from mercurial.i18n import _
12 from mercurial import patch, cmdutil, scmutil, util, commands 12 from mercurial import patch, cmdutil, scmutil, util, commands, error
13 from mercurial import encoding 13 from mercurial import encoding
14 import os 14 import os
15 import time, datetime 15 import time, datetime
16 16
17 cmdtable = {} 17 cmdtable = {}
25 def maketemplater(ui, repo, tmpl): 25 def maketemplater(ui, repo, tmpl):
26 try: 26 try:
27 t = cmdutil.changeset_templater(ui, repo, False, None, tmpl, 27 t = cmdutil.changeset_templater(ui, repo, False, None, tmpl,
28 None, False) 28 None, False)
29 except SyntaxError as inst: 29 except SyntaxError as inst:
30 raise util.Abort(inst.args[0]) 30 raise error.Abort(inst.args[0])
31 return t 31 return t
32 32
33 def changedlines(ui, repo, ctx1, ctx2, fns): 33 def changedlines(ui, repo, ctx1, ctx2, fns):
34 added, removed = 0, 0 34 added, removed = 0, 0
35 fmatch = scmutil.matchfiles(repo, fns) 35 fmatch = scmutil.matchfiles(repo, fns)