Mercurial > public > mercurial-scm > hg
comparison mercurial/hgweb/hgwebdir_mod.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 | 4b0fc75f9403 |
children | c8cbef073645 |
comparison
equal
deleted
inserted
replaced
26586:d51c658d3f04 | 26587:56b2bcea2529 |
---|---|
116 u.setconfig('progress', 'disable', 'true', 'hgweb') | 116 u.setconfig('progress', 'disable', 'true', 'hgweb') |
117 | 117 |
118 if not isinstance(self.conf, (dict, list, tuple)): | 118 if not isinstance(self.conf, (dict, list, tuple)): |
119 map = {'paths': 'hgweb-paths'} | 119 map = {'paths': 'hgweb-paths'} |
120 if not os.path.exists(self.conf): | 120 if not os.path.exists(self.conf): |
121 raise util.Abort(_('config file %s not found!') % self.conf) | 121 raise error.Abort(_('config file %s not found!') % self.conf) |
122 u.readconfig(self.conf, remap=map, trust=True) | 122 u.readconfig(self.conf, remap=map, trust=True) |
123 paths = [] | 123 paths = [] |
124 for name, ignored in u.configitems('hgweb-paths'): | 124 for name, ignored in u.configitems('hgweb-paths'): |
125 for path in u.configlist('hgweb-paths', name): | 125 for path in u.configlist('hgweb-paths', name): |
126 paths.append((name, path)) | 126 paths.append((name, path)) |