Mercurial > public > mercurial-scm > hg-stable
comparison mercurial/revlog.py @ 36275:f574cc00831a
node: make bin() be a wrapper instead of just an alias
This includes a full backout of 59affe7e and 30d0cb27. Per the review
of the former, we'd rather adapt the API to behave like it used to (at
least for now), and take a second run at it if it shows up in our
performance numbers. I ran perfrevlogindex with and without this
change and it didn't make a measurable difference, so maybe it's fine
(despite my intuition to the contrary).
Differential Revision: https://phab.mercurial-scm.org/D2279
author | Augie Fackler <augie@google.com> |
---|---|
date | Wed, 14 Feb 2018 21:34:12 -0500 |
parents | 9ba1d0c724e2 |
children | f659a407e5ee |
comparison
equal
deleted
inserted
replaced
36274:b39f0fdb0338 | 36275:f574cc00831a |
---|---|
11 and O(changes) merge between branches. | 11 and O(changes) merge between branches. |
12 """ | 12 """ |
13 | 13 |
14 from __future__ import absolute_import | 14 from __future__ import absolute_import |
15 | 15 |
16 import binascii | |
17 import collections | 16 import collections |
18 import contextlib | 17 import contextlib |
19 import errno | 18 import errno |
20 import hashlib | 19 import hashlib |
21 import heapq | 20 import heapq |
1428 raise LookupError(id, self.indexfile, | 1427 raise LookupError(id, self.indexfile, |
1429 _('ambiguous identifier')) | 1428 _('ambiguous identifier')) |
1430 if maybewdir: | 1429 if maybewdir: |
1431 raise error.WdirUnsupported | 1430 raise error.WdirUnsupported |
1432 return None | 1431 return None |
1433 except (TypeError, binascii.Error): | 1432 except TypeError: |
1434 pass | 1433 pass |
1435 | 1434 |
1436 def lookup(self, id): | 1435 def lookup(self, id): |
1437 """locate a node based on: | 1436 """locate a node based on: |
1438 - revision number or str(revision number) | 1437 - revision number or str(revision number) |