Mercurial > public > mercurial-scm > hg
comparison mercurial/config.py @ 36304:6d6bc544467a
py3: use "%d" for integers instead of "%s"
Differential Revision: https://phab.mercurial-scm.org/D2335
author | Pulkit Goyal <7895pulkit@gmail.com> |
---|---|
date | Mon, 19 Feb 2018 00:14:33 +0530 |
parents | e5a2cfc524d4 |
children | 48378d0e9479 |
comparison
equal
deleted
inserted
replaced
36303:ed95758addf3 | 36304:6d6bc544467a |
---|---|
152 break | 152 break |
153 except IOError as inst: | 153 except IOError as inst: |
154 if inst.errno != errno.ENOENT: | 154 if inst.errno != errno.ENOENT: |
155 raise error.ParseError(_("cannot include %s (%s)") | 155 raise error.ParseError(_("cannot include %s (%s)") |
156 % (inc, inst.strerror), | 156 % (inc, inst.strerror), |
157 "%s:%s" % (src, line)) | 157 "%s:%d" % (src, line)) |
158 continue | 158 continue |
159 if emptyre.match(l): | 159 if emptyre.match(l): |
160 continue | 160 continue |
161 m = sectionre.match(l) | 161 m = sectionre.match(l) |
162 if m: | 162 if m: |
183 self._data[section] = self._data[section].preparewrite() | 183 self._data[section] = self._data[section].preparewrite() |
184 del self._data[section][name] | 184 del self._data[section][name] |
185 self._unset.append((section, name)) | 185 self._unset.append((section, name)) |
186 continue | 186 continue |
187 | 187 |
188 raise error.ParseError(l.rstrip(), ("%s:%s" % (src, line))) | 188 raise error.ParseError(l.rstrip(), ("%s:%d" % (src, line))) |
189 | 189 |
190 def read(self, path, fp=None, sections=None, remap=None): | 190 def read(self, path, fp=None, sections=None, remap=None): |
191 if not fp: | 191 if not fp: |
192 fp = util.posixfile(path, 'rb') | 192 fp = util.posixfile(path, 'rb') |
193 assert getattr(fp, 'mode', r'rb') == r'rb', ( | 193 assert getattr(fp, 'mode', r'rb') == r'rb', ( |