Sun, 12 Mar 2017 12:56:12 -0700 config: avoid using a mutable default
Martijn Pieters <mjpieters@fb.com> [Sun, 12 Mar 2017 12:56:12 -0700] rev 31383
config: avoid using a mutable default Nothing *currently* mutates this list, but the moment something does it'll be shared between all config instances. Avoid this eventuality.
Fri, 05 Aug 2016 14:09:04 +0200 localrepo: deprecate 'repo.join' in favor of 'repo.vfs.join'
Pierre-Yves David <pierre-yves.david@ens-lyon.org> [Fri, 05 Aug 2016 14:09:04 +0200] rev 31382
localrepo: deprecate 'repo.join' in favor of 'repo.vfs.join' localrepo have an insane amount of method. Accessing the feature through the vfs is not really harder and allow us to schedule that method for removal.
Sun, 12 Mar 2017 12:54:11 -0700 pycompat: move imports of cStringIO/io to where they are used
Yuya Nishihara <yuya@tcha.org> [Sun, 12 Mar 2017 12:54:11 -0700] rev 31381
pycompat: move imports of cStringIO/io to where they are used There's no point to import cStringIO as io since we have to select StringIO or BytesIO conditionally.
Sun, 12 Mar 2017 12:17:30 -0700 rbc: empty (and invalid) rbc-names file should give an empty name list
Mads Kiilerich <mads@kiilerich.com> [Sun, 12 Mar 2017 12:17:30 -0700] rev 31380
rbc: empty (and invalid) rbc-names file should give an empty name list An empty file (if it somehow should exist) used to give a list with an empty name. That didn't do any harm, but it was "wrong". Fix that.
Wed, 19 Oct 2016 02:46:35 +0200 rbc: use struct unpack_from and pack_into instead of unpack and pack
Mads Kiilerich <madski@unity3d.com> [Wed, 19 Oct 2016 02:46:35 +0200] rev 31379
rbc: use struct unpack_from and pack_into instead of unpack and pack These functions were introduced in Python 2.5 and are faster and simpler than the old ones ... mainly because we can avoid intermediate buffers: $ python -m timeit -s "_rbcrecfmt='>4sI'" -s 's = "x"*10000' -s 'from struct import unpack' 'unpack(_rbcrecfmt, buffer(s, 16, 8))' 1000000 loops, best of 3: 0.543 usec per loop $ python -m timeit -s "_rbcrecfmt='>4sI'" -s 's = "x"*10000' -s 'from struct import unpack_from' 'unpack_from(_rbcrecfmt, s, 16)' 1000000 loops, best of 3: 0.323 usec per loop $ python -m timeit -s "from array import array" -s "_rbcrecfmt='>4sI'" -s "s = array('c')" -s 's.fromstring("x"*10000)' -s 'from struct import pack' -s "rec = array('c')" 'rec.fromstring(pack(_rbcrecfmt, "asdf", 7))' 1000000 loops, best of 3: 0.364 usec per loop $ python -m timeit -s "from array import array" -s "_rbcrecfmt='>4sI'" -s "s = array('c')" -s 's.fromstring("x"*10000)' -s 'from struct import pack_into' -s "rec = array('c')" -s 'rec.fromstring("x"*100)' 'pack_into(_rbcrecfmt, rec, 0, "asdf", 7)' 1000000 loops, best of 3: 0.229 usec per loop
Sun, 12 Mar 2017 15:27:02 -0400 revlog: use bytes() instead of str() to get data from memoryview
Augie Fackler <augie@google.com> [Sun, 12 Mar 2017 15:27:02 -0400] rev 31378
revlog: use bytes() instead of str() to get data from memoryview Fixes `files -v` on Python 3.
Sun, 12 Mar 2017 03:33:22 -0400 util: teach url object about __bytes__
Augie Fackler <augie@google.com> [Sun, 12 Mar 2017 03:33:22 -0400] rev 31377
util: teach url object about __bytes__ __str__ tries to do something reasonable, but someone else more familiar with encoding bugs should check my work.
Sun, 12 Mar 2017 03:31:54 -0400 manifest: ensure paths are bytes (not str) in pure parser
Augie Fackler <augie@google.com> [Sun, 12 Mar 2017 03:31:54 -0400] rev 31376
manifest: ensure paths are bytes (not str) in pure parser
Sun, 12 Mar 2017 03:30:15 -0400 manifest: now that node.bin is available, use it directly
Augie Fackler <augie@google.com> [Sun, 12 Mar 2017 03:30:15 -0400] rev 31375
manifest: now that node.bin is available, use it directly Previously we were getting it through revlog, which is a little unusual.
Sun, 12 Mar 2017 03:29:48 -0400 manifest: use node.bin instead of .decode('hex')
Augie Fackler <augie@google.com> [Sun, 12 Mar 2017 03:29:48 -0400] rev 31374
manifest: use node.bin instead of .decode('hex') The latter doesn't work in Python 3.
Sun, 12 Mar 2017 00:43:20 -0500 manifest: add __next__ methods for Python 3
Augie Fackler <augie@google.com> [Sun, 12 Mar 2017 00:43:20 -0500] rev 31373
manifest: add __next__ methods for Python 3 Python 3 renamed .next() in the iterator protocol to __next__().
Sun, 12 Mar 2017 00:51:00 -0500 files: use native string type to load rev opt from dict
Augie Fackler <augie@google.com> [Sun, 12 Mar 2017 00:51:00 -0500] rev 31372
files: use native string type to load rev opt from dict
Sun, 12 Mar 2017 00:50:44 -0500 store: fix many single-byte ops to use slicing in _auxencode
Augie Fackler <augie@google.com> [Sun, 12 Mar 2017 00:50:44 -0500] rev 31371
store: fix many single-byte ops to use slicing in _auxencode
Mon, 13 Mar 2017 04:06:36 +0900 py3: add "b" prefix to string literals related to module policy
FUJIWARA Katsunori <foozy@lares.dti.ne.jp> [Mon, 13 Mar 2017 04:06:36 +0900] rev 31370
py3: add "b" prefix to string literals related to module policy String literals without explicit prefix in __init__.py and policy.py are treated as unicode object on Python3, because these modules are loaded before setup of our specific code transformation (the later module is imported at the beginning of __init__.py). BTW, "modulepolicy" in __init__.py is initialized by "policy.policy". This causes issues below; - checking "policy" value in other modules causes unintentional result For example, "b'py' not in (u'c', u'py')" returns True unintentionally on Python3. - writing "policy" out fails at conversion from unicode to bytes 62939e0148f1 fixed this issue for default code path, but "policy" can be overridden by HGMODULEPOLICY environment variable (it should be rare case for developer using Python3, though). This patch does: - add "b" prefix to all string literals, which are related to module policy, in modules above. - check existence of HGMODULEPOLICY, and overwrite "policy" only if it exists For simplicity, this patch omits checking "supports_bytes_environ", switching os.environ/os.environb, and so on (Yuya agreed this in personal talking)
Sun, 12 Mar 2017 11:47:02 -0700 py3: drop unused aliases to array.array which are replaced with bytearray
Yuya Nishihara <yuya@tcha.org> [Sun, 12 Mar 2017 11:47:02 -0700] rev 31369
py3: drop unused aliases to array.array which are replaced with bytearray
Mon, 13 Mar 2017 00:55:14 +0530 pycompat: default to BytesIO instead of StringIO
Pulkit Goyal <7895pulkit@gmail.com> [Mon, 13 Mar 2017 00:55:14 +0530] rev 31368
pycompat: default to BytesIO instead of StringIO
Sun, 12 Mar 2017 00:48:06 -0500 repoview: specify setattr values as native strings
Augie Fackler <augie@google.com> [Sun, 12 Mar 2017 00:48:06 -0500] rev 31367
repoview: specify setattr values as native strings
Sun, 12 Mar 2017 03:32:38 -0400 revlog: use bytes() to ensure text from _chunks is a reasonable type
Augie Fackler <augie@google.com> [Sun, 12 Mar 2017 03:32:38 -0400] rev 31366
revlog: use bytes() to ensure text from _chunks is a reasonable type
Sun, 12 Mar 2017 00:49:49 -0500 revlog: extract first byte of revlog with a slice so it's portable
Augie Fackler <augie@google.com> [Sun, 12 Mar 2017 00:49:49 -0500] rev 31365
revlog: extract first byte of revlog with a slice so it's portable
Sun, 12 Mar 2017 00:46:59 -0500 revsetlang: slice out single bytes instead of indexing
Augie Fackler <augie@google.com> [Sun, 12 Mar 2017 00:46:59 -0500] rev 31364
revsetlang: slice out single bytes instead of indexing For portability with Python 3.
Sun, 12 Mar 2017 03:29:04 -0400 lock: use %d to format integer into a bytestring
Augie Fackler <augie@google.com> [Sun, 12 Mar 2017 03:29:04 -0400] rev 31363
lock: use %d to format integer into a bytestring
Sun, 12 Mar 2017 00:44:59 -0500 parser: use %d instead of %s for interpolating error position
Augie Fackler <augie@google.com> [Sun, 12 Mar 2017 00:44:59 -0500] rev 31362
parser: use %d instead of %s for interpolating error position Error position is an int, so we should use %d instead of %s. Fixes failures on Python 3.
Sun, 12 Mar 2017 00:44:21 -0500 manifest: unbreak pure-python manifest parsing on Python 3
Augie Fackler <augie@google.com> [Sun, 12 Mar 2017 00:44:21 -0500] rev 31361
manifest: unbreak pure-python manifest parsing on Python 3
Sun, 12 Mar 2017 00:43:47 -0500 context: use portable construction to verify int parsing
Augie Fackler <augie@google.com> [Sun, 12 Mar 2017 00:43:47 -0500] rev 31360
context: use portable construction to verify int parsing
Sun, 12 Mar 2017 01:59:23 -0500 ui: portably bytestring-ify url object
Augie Fackler <augie@google.com> [Sun, 12 Mar 2017 01:59:23 -0500] rev 31359
ui: portably bytestring-ify url object
Sun, 12 Mar 2017 00:47:39 -0500 scmutil: fix key generation to portably bytestringify integer
Augie Fackler <augie@google.com> [Sun, 12 Mar 2017 00:47:39 -0500] rev 31358
scmutil: fix key generation to portably bytestringify integer
Sun, 12 Mar 2017 00:42:46 -0500 branchmap: stringify int in a portable way
Augie Fackler <augie@google.com> [Sun, 12 Mar 2017 00:42:46 -0500] rev 31357
branchmap: stringify int in a portable way We actually need a bytes in Python 3, and thanks to our nasty source loader this will portably do the right thing.
Sun, 12 Mar 2017 00:49:19 -0500 branchmap: don't use buffer() on Python 3
Augie Fackler <augie@google.com> [Sun, 12 Mar 2017 00:49:19 -0500] rev 31356
branchmap: don't use buffer() on Python 3 This is certainly slower than the Python 2 code, but it works, and we can revisit it later if it's a problem.
(0) -30000 -10000 -3000 -1000 -300 -100 -50 -28 +28 +50 +100 +300 +1000 +3000 +10000 tip