Augie Fackler <augie@google.com> [Sun, 12 Mar 2017 03:28:50 -0400] rev 31375
lock: encode result of gethostname into a bytestring
Martijn Pieters <mjpieters@fb.com> [Sun, 12 Mar 2017 12:56:12 -0700] rev 31374
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.
Pierre-Yves David <pierre-yves.david@ens-lyon.org> [Fri, 05 Aug 2016 14:09:04 +0200] rev 31373
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.
Yuya Nishihara <yuya@tcha.org> [Sun, 12 Mar 2017 12:54:11 -0700] rev 31372
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.
Mads Kiilerich <mads@kiilerich.com> [Sun, 12 Mar 2017 12:17:30 -0700] rev 31371
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.
Mads Kiilerich <madski@unity3d.com> [Wed, 19 Oct 2016 02:46:35 +0200] rev 31370
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
Augie Fackler <augie@google.com> [Sun, 12 Mar 2017 15:27:02 -0400] rev 31369
revlog: use bytes() instead of str() to get data from memoryview
Fixes `files -v` on Python 3.
Augie Fackler <augie@google.com> [Sun, 12 Mar 2017 03:33:22 -0400] rev 31368
util: teach url object about __bytes__
__str__ tries to do something reasonable, but someone else more
familiar with encoding bugs should check my work.
Augie Fackler <augie@google.com> [Sun, 12 Mar 2017 03:31:54 -0400] rev 31367
manifest: ensure paths are bytes (not str) in pure parser
Augie Fackler <augie@google.com> [Sun, 12 Mar 2017 03:30:15 -0400] rev 31366
manifest: now that node.bin is available, use it directly
Previously we were getting it through revlog, which is a little unusual.
Augie Fackler <augie@google.com> [Sun, 12 Mar 2017 03:29:48 -0400] rev 31365
manifest: use node.bin instead of .decode('hex')
The latter doesn't work in Python 3.
Augie Fackler <augie@google.com> [Sun, 12 Mar 2017 00:43:20 -0500] rev 31364
manifest: add __next__ methods for Python 3
Python 3 renamed .next() in the iterator protocol to __next__().