Sat, 25 Feb 2017 17:29:30 +0900 pager: flush outputs before firing pager process
Yuya Nishihara <yuya@tcha.org> [Sat, 25 Feb 2017 17:29:30 +0900] rev 31497
pager: flush outputs before firing pager process So that buffered outputs are always sent to the console.
Sat, 25 Feb 2017 17:27:48 +0900 patchbomb: use modern pager to display -n/--test result (BC)
Yuya Nishihara <yuya@tcha.org> [Sat, 25 Feb 2017 17:27:48 +0900] rev 31496
patchbomb: use modern pager to display -n/--test result (BC) This should provide more consistent UX, but is a BC because the pager will no longer be fired up for each message.
Sat, 18 Mar 2017 16:02:14 +0900 httpconnection: make sure to clear progress of httpsendfile at EOF
Yuya Nishihara <yuya@tcha.org> [Sat, 18 Mar 2017 16:02:14 +0900] rev 31495
httpconnection: make sure to clear progress of httpsendfile at EOF read() should never raise EOFError. If it did, UnboundLocalError would occur due to unassigned 'ret' variable. This issue was originally reported to TortoiseHg: https://bitbucket.org/tortoisehg/thg/issues/4707/
Tue, 14 Mar 2017 18:23:59 +0900 py3: convert log opts to bytes-key dict
Yuya Nishihara <yuya@tcha.org> [Tue, 14 Mar 2017 18:23:59 +0900] rev 31494
py3: convert log opts to bytes-key dict Now simple log command works.
Tue, 14 Mar 2017 18:16:13 +0900 graphlog: pass function arguments without expansion
Yuya Nishihara <yuya@tcha.org> [Tue, 14 Mar 2017 18:16:13 +0900] rev 31493
graphlog: pass function arguments without expansion It's annoying on Python 3 because keys must be unicode type. Let's stop using **opts expansion when not necessary.
Fri, 17 Mar 2017 23:48:22 +0900 py3: call codecs.escape_decode() directly
Yuya Nishihara <yuya@tcha.org> [Fri, 17 Mar 2017 23:48:22 +0900] rev 31492
py3: call codecs.escape_decode() directly The same rule as 3b7a6941a6ef applies.
Fri, 17 Mar 2017 23:42:46 +0900 util: wrap s.decode('string_escape') calls for future py3 compatibility
Yuya Nishihara <yuya@tcha.org> [Fri, 17 Mar 2017 23:42:46 +0900] rev 31491
util: wrap s.decode('string_escape') calls for future py3 compatibility
Sat, 18 Mar 2017 12:27:52 -0400 merge with stable
Augie Fackler <augie@google.com> [Sat, 18 Mar 2017 12:27:52 -0400] rev 31490
merge with stable
Sun, 05 Mar 2017 22:22:32 -0500 hgwebdir: add support for explicit index files
Matt Harbison <matt_harbison@yahoo.com> [Sun, 05 Mar 2017 22:22:32 -0500] rev 31489
hgwebdir: add support for explicit index files This is useful for when repositories are nested in --web-conf, and in the future with hosted subrepositories. The previous behavior was only to render an index at each virtual directory. There is now an explicit 'index' child for each virtual directory. The name was suggested by Yuya, for consistency with the other method names. Additionally, there is now an explicit 'index' child for every repository directory with a nested repository somewhere below it. This seems more consistent with each virtual directory hosting an index, and more discoverable than to only have an index for a directory that directly hosts a nested repository. I couldn't figure out how to close the loop and provide one in each directory without a deeper nested repository, without blocking a committed 'index' file. Keeping that seems better than rendering an empty index.
Fri, 17 Mar 2017 09:19:56 -0700 ui: move configlist parser to config.py
Jun Wu <quark@fb.com> [Fri, 17 Mar 2017 09:19:56 -0700] rev 31488
ui: move configlist parser to config.py The list parser is complex and reusable without ui. Let's move it to config.py. This allows us to parse a list from a "pure" config object without going through ui. Like, we can make "_trustusers" calculated from raw configs, instead of making sure it's synchronized by calling "fixconfig"s.
Fri, 17 Mar 2017 09:58:49 -0700 tests: allow ModuleNotFoundError in addition to ImportError
Martin von Zweigbergk <martinvonz@google.com> [Fri, 17 Mar 2017 09:58:49 -0700] rev 31487
tests: allow ModuleNotFoundError in addition to ImportError My environment (Python version? PYTHONPATH? something else?) raises ModuleNotFoundError in test-check-py3-compat.t. This patch allows any "*Error". The error string contains "error importing", so it seems specific enough even after.
Wed, 15 Mar 2017 20:34:26 -0400 pager: skip running the pager if it's set to 'cat'
Augie Fackler <augie@google.com> [Wed, 15 Mar 2017 20:34:26 -0400] rev 31486
pager: skip running the pager if it's set to 'cat' Avoid useless uses of cat.
Wed, 15 Mar 2017 20:33:47 -0400 pager: avoid shell=True on subprocess.Popen for better errors (issue5491)
Augie Fackler <augie@google.com> [Wed, 15 Mar 2017 20:33:47 -0400] rev 31485
pager: avoid shell=True on subprocess.Popen for better errors (issue5491) man(1) behaves as poorly as Mercurial without this change. This cribs from git's run-command[0], which has a list of characters that imply a string that needs to be run using 'sh -c'. If none of those characters are present in the command string, we can use shell=False mode on subprocess and get significantly better error messages (see the test) when the pager process is invalid. With a complicated pager command (that contains one of the unsafe characters), we behave as we do today (which is no worse than git manages.) I briefly tried tapdancing in a thread to catch early pager exits, but it's just too perilous: you get races between fd duping operations and a bad pager exiting, and it's too hard to differentiate between a slow-bad-pager result and a fast-human-quit-pager-early result. I've observed some weird variation in exit code handling in the "bad experience" case in test-pager.t: on my Mac hg predictably exits nonzero, but on Linux hg always exits zero in that case. For now, we'll work around it with || true. :( 0: https://github.com/git/git/blob/cddbda4bc87b9d2c985b6749b1cf026b15e2d3e7/run-command.c#L201
Fri, 17 Mar 2017 19:12:22 +0530 py3: change explicit conversion of config value from str to pycompat.bytestr
Rishabh Madan <rishabhmadan96@gmail.com> [Fri, 17 Mar 2017 19:12:22 +0530] rev 31484
py3: change explicit conversion of config value from str to pycompat.bytestr
Mon, 13 Mar 2017 12:40:14 -0700 py3: add __bool__ to every class defining __nonzero__
Gregory Szorc <gregory.szorc@gmail.com> [Mon, 13 Mar 2017 12:40:14 -0700] rev 31483
py3: add __bool__ to every class defining __nonzero__ __nonzero__ was renamed to __bool__ in Python 3. This patch simply aliases __bool__ to __nonzero__ for every class implementing __nonzero__.
Mon, 13 Mar 2017 21:58:43 -0700 merge: also allow 'e' action with experimental.updatecheck=noconflict
Martin von Zweigbergk <martinvonz@google.com> [Mon, 13 Mar 2017 21:58:43 -0700] rev 31482
merge: also allow 'e' action with experimental.updatecheck=noconflict With experimental.updatecheck=noconflict set, if one checks out f3398f1f70a0 (tests: add execute bit and fix shbang line, 2015-12-22) and then try to check out its parent, hg will complain about conflicting changes, even though the working directory is clean. We need to also allow the 'e' action in merge.py. The 'e' action is used when moving to a commit where the only change to the file is to its executable flag, so it's just an optimized 'g' action. Doesn't seem to be worth writing a test for, since the existing setup in test-update-branches.t does not set any flags.
Sun, 12 Mar 2017 11:43:31 -0700 config: honour the trusted flag in ui.configbytes
Martijn Pieters <mjpieters@fb.com> [Sun, 12 Mar 2017 11:43:31 -0700] rev 31481
config: honour the trusted flag in ui.configbytes
Wed, 15 Mar 2017 20:43:12 -0700 osutil: fix potential wrong fd close
Jun Wu <quark@fb.com> [Wed, 15 Mar 2017 20:43:12 -0700] rev 31480
osutil: fix potential wrong fd close According to POSIX closedir [1]: If a file descriptor is used to implement type DIR, that file descriptor shall be closed. According to POSIX fdopendir [2]: Upon calling closedir() the file descriptor shall be closed. So we should avoid "close(dfd)" after "closedir(dir)". With threads, there could be a race where an innocent fd gets closed. But Python GIL seems to help hiding the issue well. [1]: http://pubs.opengroup.org/onlinepubs/009695399/functions/closedir.html [2]: http://pubs.opengroup.org/onlinepubs/9699919799/functions/fdopendir.html
Thu, 09 Mar 2017 12:09:31 -0800 parsers: use Python memory allocator for indexObject->offsets
Gregory Szorc <gregory.szorc@gmail.com> [Thu, 09 Mar 2017 12:09:31 -0800] rev 31479
parsers: use Python memory allocator for indexObject->offsets
Thu, 09 Mar 2017 12:02:59 -0800 parsers: use Python memory allocator in commonancestorsheads()
Gregory Szorc <gregory.szorc@gmail.com> [Thu, 09 Mar 2017 12:02:59 -0800] rev 31478
parsers: use Python memory allocator in commonancestorsheads()
Thu, 09 Mar 2017 11:56:47 -0800 osutil: use Python memory allocator in _listdir
Gregory Szorc <gregory.szorc@gmail.com> [Thu, 09 Mar 2017 11:56:47 -0800] rev 31477
osutil: use Python memory allocator in _listdir The Python memory allocator has performance advantages for small allocations.
Thu, 09 Mar 2017 11:54:25 -0800 bdiff: use Python memory allocator in fixws
Gregory Szorc <gregory.szorc@gmail.com> [Thu, 09 Mar 2017 11:54:25 -0800] rev 31476
bdiff: use Python memory allocator in fixws Python has its own memory allocation APIs. For allocations <= 512 bytes, it allocates memory from arenas. This means that average small allocations don't call the system allocator, which makes them faster. Also, arena allocations cut down on memory fragmentation, which can matter for performance in long-running processes. Another advantage of using the Python memory allocator is that allocations are tracked by Python. This is a bigger deal in Python 3, as modern versions of Python have some decent built-in tools for examining memory usage, leaks, etc. This patch converts a trivial malloc() + free() in the bdiff code to use the Python allocator APIs. Since the object being operated on is a line, chances are it will use an arena. So, this could have a net positive impact on performance (although I didn't measure it).
Thu, 16 Mar 2017 11:17:55 -0700 localrepo: fix deprecation warning version of wfile
Pierre-Yves David <pierre-yves.david@ens-lyon.org> [Thu, 16 Mar 2017 11:17:55 -0700] rev 31475
localrepo: fix deprecation warning version of wfile The patch lingered a bit too long in my local clone and I messed up when I updated the version number. Since nobody caught it, I'm fixing the version after the fact.
Wed, 15 Mar 2017 15:07:14 -0700 util: explicitly tests for None
Pierre-Yves David <pierre-yves.david@ens-lyon.org> [Wed, 15 Mar 2017 15:07:14 -0700] rev 31474
util: explicitly tests for None Changeset 8b6927eb7efd removed the mutable default value, but did not explicitly tested for None. Such implicit checking can introduce semantic and performance issue. We move to an explicit check for None as recommended by PEP8: https://www.python.org/dev/peps/pep-0008/#programming-recommendations
Wed, 15 Mar 2017 15:38:02 -0700 context: simplify call to icase matcher in 'match()'
Pierre-Yves David <pierre-yves.david@ens-lyon.org> [Wed, 15 Mar 2017 15:38:02 -0700] rev 31473
context: simplify call to icase matcher in 'match()' The two function takes the very same arguments. We make this clearer and less error prone by dispatching on the function only and having a single call point in the code.
Thu, 16 Mar 2017 09:13:13 +0530 py3: make sure using bytes status char rather than ascii values
Pulkit Goyal <7895pulkit@gmail.com> [Thu, 16 Mar 2017 09:13:13 +0530] rev 31472
py3: make sure using bytes status char rather than ascii values 'MAR!?IC' is converted to their ascii values when slicing through it. This patch uses pycompat.iterbytestr() to get bytes value.
Thu, 16 Mar 2017 14:27:41 -0700 shelve: get rid of ui.backupconfig
Jun Wu <quark@fb.com> [Thu, 16 Mar 2017 14:27:41 -0700] rev 31471
shelve: get rid of ui.backupconfig
Thu, 16 Mar 2017 14:40:34 -0700 rebase: get rid of ui.backupconfig
Jun Wu <quark@fb.com> [Thu, 16 Mar 2017 14:40:34 -0700] rev 31470
rebase: get rid of ui.backupconfig
Thu, 16 Mar 2017 14:39:18 -0700 mq: get rid of ui.backupconfig
Jun Wu <quark@fb.com> [Thu, 16 Mar 2017 14:39:18 -0700] rev 31469
mq: get rid of ui.backupconfig
Thu, 16 Mar 2017 14:36:35 -0700 histedit: get rid of ui.backupconfig
Jun Wu <quark@fb.com> [Thu, 16 Mar 2017 14:36:35 -0700] rev 31468
histedit: get rid of ui.backupconfig
Thu, 16 Mar 2017 14:34:35 -0700 record: get rid of ui.backupconfig
Jun Wu <quark@fb.com> [Thu, 16 Mar 2017 14:34:35 -0700] rev 31467
record: get rid of ui.backupconfig
Thu, 16 Mar 2017 14:23:49 -0700 import: get rid of ui.backupconfig
Jun Wu <quark@fb.com> [Thu, 16 Mar 2017 14:23:49 -0700] rev 31466
import: get rid of ui.backupconfig
Thu, 16 Mar 2017 14:18:50 -0700 clone: get rid of ui.backupconfig
Jun Wu <quark@fb.com> [Thu, 16 Mar 2017 14:18:50 -0700] rev 31465
clone: get rid of ui.backupconfig
Thu, 16 Mar 2017 14:15:20 -0700 commit: get rid of ui.backupconfig
Jun Wu <quark@fb.com> [Thu, 16 Mar 2017 14:15:20 -0700] rev 31464
commit: get rid of ui.backupconfig
Wed, 15 Mar 2017 15:48:57 -0700 branchmap: handle nullrev in setcachedata
Durham Goode <durham@fb.com> [Wed, 15 Mar 2017 15:48:57 -0700] rev 31463
branchmap: handle nullrev in setcachedata 906be86990 recently changed to switch from: self._rbcrevs[rbcrevidx:rbcrevidx + _rbcrecsize] = rec to pack_into(_rbcrecfmt, self._rbcrevs, rbcrevidx, node, branchidx) This causes an exception if rbcrevidx is -1 (i.e. the nullrev). The old code handled this because python handles out of bound sets to arrays gracefully. The new code throws because the self._rbcrevs buffer isn't long enough to write 8 bytes to. Normally it would've been resized by the immediately preceding line, but because the 0 length buffer is greater than the idx (-1) times the size, no resize happens. Setting the branch for the nullrev doesn't make sense anyway, so let's skip it. This was caught by external tests in the Facebook extensions repo, but I've added a test here that catches the issue.
Wed, 15 Mar 2017 23:28:39 +0900 py3: call codecs.escape_encode() directly
Yuya Nishihara <yuya@tcha.org> [Wed, 15 Mar 2017 23:28:39 +0900] rev 31462
py3: call codecs.escape_encode() directly string_escape doesn't exist on Python 3, but fortunately the undocumented codecs.escape_encode() function exists on CPython 2.6, 2.7, 3.5 and PyPy 5.6. So let's use it for now. http://stackoverflow.com/a/23151714
Wed, 15 Mar 2017 23:21:30 +0900 templatekw: make join() escape values of extras (BC) (issue5504)
Yuya Nishihara <yuya@tcha.org> [Wed, 15 Mar 2017 23:21:30 +0900] rev 31461
templatekw: make join() escape values of extras (BC) (issue5504) Since extras may contain blob, the default template escapes its values: 'extra': '{key}={value|stringescape}' join() should follow the output style of the default template.
Wed, 15 Mar 2017 23:06:50 +0900 util: wrap s.encode('string_escape') call for future py3 compatibility
Yuya Nishihara <yuya@tcha.org> [Wed, 15 Mar 2017 23:06:50 +0900] rev 31460
util: wrap s.encode('string_escape') call for future py3 compatibility
Mon, 13 Mar 2017 09:24:53 -0700 py3: prove hg tip works
Yuya Nishihara <yuya@tcha.org> [Mon, 13 Mar 2017 09:24:53 -0700] rev 31459
py3: prove hg tip works
Mon, 13 Mar 2017 09:19:07 -0700 py3: call strftime() with native str type
Yuya Nishihara <yuya@tcha.org> [Mon, 13 Mar 2017 09:19:07 -0700] rev 31458
py3: call strftime() with native str type Since strftime() may contain non-ascii character if locale set, we use strfrom/tolocal(). Now "hg tip" works.
Mon, 13 Mar 2017 09:12:56 -0700 encoding: add converter between native str and byte string
Yuya Nishihara <yuya@tcha.org> [Mon, 13 Mar 2017 09:12:56 -0700] rev 31457
encoding: add converter between native str and byte string This kind of encoding conversion is unavoidable on Python 3.
Mon, 13 Mar 2017 09:11:08 -0700 encoding: factor out unicode variants of from/tolocal()
Yuya Nishihara <yuya@tcha.org> [Mon, 13 Mar 2017 09:11:08 -0700] rev 31456
encoding: factor out unicode variants of from/tolocal() Unfortunately, these functions will be commonly used on Python 3.
Mon, 13 Mar 2017 08:53:31 -0700 py3: use next() to obtain next item from inner generator of generatorset
Yuya Nishihara <yuya@tcha.org> [Mon, 13 Mar 2017 08:53:31 -0700] rev 31455
py3: use next() to obtain next item from inner generator of generatorset .next attribute does not exist on Python 3. As this function seems to really care about the overhead of the Python interpreter, I follow the way of micro optimization.
Mon, 13 Mar 2017 08:44:57 -0700 py3: rewrite itervalues() as values() by importer
Yuya Nishihara <yuya@tcha.org> [Mon, 13 Mar 2017 08:44:57 -0700] rev 31454
py3: rewrite itervalues() as values() by importer I'm not a great fan of these importer magics, but this should be okay since "itervalues" seems as unique name as "iteritems".
Sun, 12 Mar 2017 17:20:42 -0700 py3: use portable way to stringify cache key of repoview
Yuya Nishihara <yuya@tcha.org> [Sun, 12 Mar 2017 17:20:42 -0700] rev 31453
py3: use portable way to stringify cache key of repoview
Mon, 13 Mar 2017 12:44:13 -0700 exewrapper: prefer HackableMercurial python if availbale
Kostia Balytskyi <ikostia@fb.com> [Mon, 13 Mar 2017 12:44:13 -0700] rev 31452
exewrapper: prefer HackableMercurial python if availbale Currently hg.exe will only try to load python27.dll from hg-python subdir if PYTHONHOME environment variable is not set. I think that it is better to check whether 'hg-python' subdir exists and load python from it in that case, regardless of environment. This allows for reliable approach of distributing Mercurial with its own Python.
Tue, 14 Mar 2017 23:07:08 -0700 import-checkers: split tests of the tool from running it on the source
Pierre-Yves David <pierre-yves.david@ens-lyon.org> [Tue, 14 Mar 2017 23:07:08 -0700] rev 31451
import-checkers: split tests of the tool from running it on the source We did such splits for other tools already. The 'test-check-*.t' performs the check of the source code while the regular tests verifies the tools works. One of the benefit is that is provides a simple file to reuse in third party extensions.
Thu, 16 Mar 2017 21:36:21 +0900 py3: use bytestr wrapper in revsetlang.tokenize()
Yuya Nishihara <yuya@tcha.org> [Thu, 16 Mar 2017 21:36:21 +0900] rev 31450
py3: use bytestr wrapper in revsetlang.tokenize() This backs out 77270ec0cdd9 and wraps program by bytestr() instead.
Thu, 16 Mar 2017 21:33:25 +0900 py3: use bytestr wrapper in revsetlang.formatspec()
Yuya Nishihara <yuya@tcha.org> [Thu, 16 Mar 2017 21:33:25 +0900] rev 31449
py3: use bytestr wrapper in revsetlang.formatspec() This backs out 1c48a8278b2f and wraps expr by bytestr() instead.
Wed, 08 Mar 2017 22:48:26 +0900 pycompat: add bytestr wrapper which mostly acts as a Python 2 str
Yuya Nishihara <yuya@tcha.org> [Wed, 08 Mar 2017 22:48:26 +0900] rev 31448
pycompat: add bytestr wrapper which mostly acts as a Python 2 str This allows us to handle bytes in mostly the same manner as Python 2 str, so we can get rid of ugly s[i:i + 1] hacks: s = bytestr(s) while i < len(s): c = s[i] ... This is the simpler version of the previous RFC patch which tried to preserve the bytestr type if possible. New version simply drops the bytestr wrapping so we aren't likely to pass a bytestr to a function that expects Python 3 bytes.
Wed, 08 Mar 2017 22:13:32 +0900 tests: allow running doctests selectively on Python 3
Yuya Nishihara <yuya@tcha.org> [Wed, 08 Mar 2017 22:13:32 +0900] rev 31447
tests: allow running doctests selectively on Python 3 Currently most doctests fail on Python 3, but I want to add some.
Wed, 15 Mar 2017 15:33:24 -0700 context: explicitly tests for None
Pierre-Yves David <pierre-yves.david@ens-lyon.org> [Wed, 15 Mar 2017 15:33:24 -0700] rev 31446
context: explicitly tests for None Changeset 9e57033fec0c removed the mutable default value, but did not explicitly tested for None. Such implicit testing can introduce semantic and performance issue. We move to an explicit testing for None as recommended by PEP8: https://www.python.org/dev/peps/pep-0008/#programming-recommendations
Wed, 15 Mar 2017 15:11:52 -0700 filemerge: explicitly tests for None
Pierre-Yves David <pierre-yves.david@ens-lyon.org> [Wed, 15 Mar 2017 15:11:52 -0700] rev 31445
filemerge: explicitly tests for None Changeset 758526333dec removed the mutable default value, but did not explicitly tested for None. Such implicit testing can introduce semantic and performance issue. We move to an explicit testing for None as recommended by PEP8: https://www.python.org/dev/peps/pep-0008/#programming-recommendations
Wed, 15 Mar 2017 15:11:04 -0700 hgweb: explicitly tests for None
Pierre-Yves David <pierre-yves.david@ens-lyon.org> [Wed, 15 Mar 2017 15:11:04 -0700] rev 31444
hgweb: explicitly tests for None Changeset 7dafa8d0e006 removed the mutable default value, but did not explicitly tested for None. Such implicit testing can introduce semantic and performance issue. We move to an explicit testing for None as recommended by PEP8: https://www.python.org/dev/peps/pep-0008/#programming-recommendations
Wed, 15 Mar 2017 15:10:09 -0700 hgweb: explicitly tests for None in webutil
Pierre-Yves David <pierre-yves.david@ens-lyon.org> [Wed, 15 Mar 2017 15:10:09 -0700] rev 31443
hgweb: explicitly tests for None in webutil Changeset d2878bec55bd removed the mutable default value, but did not explicitly tested for None. Such implicit testing can introduce semantic and performance issue. We move to an explicit testing for None as recommended by PEP8: https://www.python.org/dev/peps/pep-0008/#programming-recommendations
Wed, 15 Mar 2017 15:08:45 -0700 match: explicitly tests for None
Pierre-Yves David <pierre-yves.david@ens-lyon.org> [Wed, 15 Mar 2017 15:08:45 -0700] rev 31442
match: explicitly tests for None Changeset 6168d4b93634 removed the mutable default value, but did not explicitly tested for None. Such implicit testing can introduce semantic and performance issue. We move to an explicit testing for None as recommended by PEP8: https://www.python.org/dev/peps/pep-0008/#programming-recommendations
Wed, 15 Mar 2017 15:05:54 -0700 mq: explicitly tests for None
Pierre-Yves David <pierre-yves.david@ens-lyon.org> [Wed, 15 Mar 2017 15:05:54 -0700] rev 31441
mq: explicitly tests for None Changeset fd3d8eb7f545 removed the mutable default value, but did not explicitly tested for None. Such implicit testing can introduce semantic and performance issue. We move to an explicit testing for None as recommended by PEP8: https://www.python.org/dev/peps/pep-0008/#programming-recommendations
Wed, 15 Mar 2017 15:03:43 -0700 rebase: explicitly tests for None
Pierre-Yves David <pierre-yves.david@ens-lyon.org> [Wed, 15 Mar 2017 15:03:43 -0700] rev 31440
rebase: explicitly tests for None Changeset 361bccce566a removed the mutable default value, but did not explicitly tested for None. Such implicit checking can introduce semantic and performance issue. We move to an explicit check for None as recommended by PEP8: https://www.python.org/dev/peps/pep-0008/#programming-recommendations
Thu, 16 Mar 2017 04:53:23 +0530 py3: use iter() instead of iterkeys()
Rishabh Madan <rishabhmadan96@gmail.com> [Thu, 16 Mar 2017 04:53:23 +0530] rev 31439
py3: use iter() instead of iterkeys()
Fri, 05 Aug 2016 14:15:45 +0200 localrepo: deprecated '_link'
Pierre-Yves David <pierre-yves.david@ens-lyon.org> [Fri, 05 Aug 2016 14:15:45 +0200] rev 31438
localrepo: deprecated '_link' That method had a total on 1 internal user... G: changed mercurial/localrepo.py
Fri, 05 Aug 2016 14:19:31 +0200 localrepo: use self.wvfs.islink directly
Pierre-Yves David <pierre-yves.david@ens-lyon.org> [Fri, 05 Aug 2016 14:19:31 +0200] rev 31437
localrepo: use self.wvfs.islink directly We are about to deprecate the helper function.
Thu, 16 Mar 2017 10:10:00 +0530 py3: convert opts back to bytes for status
Pulkit Goyal <7895pulkit@gmail.com> [Thu, 16 Mar 2017 10:10:00 +0530] rev 31436
py3: convert opts back to bytes for status
Mon, 13 Mar 2017 17:49:13 -0700 parsers: handle refcounting of "parents" consistently
Gregory Szorc <gregory.szorc@gmail.com> [Mon, 13 Mar 2017 17:49:13 -0700] rev 31435
parsers: handle refcounting of "parents" consistently Py_None can be refcounted like any other Python object. So do that.
Wed, 15 Mar 2017 09:32:18 -0700 py3: make py3 compat.iterbytestr simpler and faster
Martin von Zweigbergk <martinvonz@google.com> [Wed, 15 Mar 2017 09:32:18 -0700] rev 31434
py3: make py3 compat.iterbytestr simpler and faster With Python 3.4.3, timit says 11.9 usec-> 6.44 usec. With Python 3.6.0, timeit says 14.1 usec -> 9.55 usec.
Wed, 15 Mar 2017 09:30:50 -0700 py3: optimize py3 compat.bytechr using Struct.pack
Martin von Zweigbergk <martinvonz@google.com> [Wed, 15 Mar 2017 09:30:50 -0700] rev 31433
py3: optimize py3 compat.bytechr using Struct.pack With Python 3.4.3, timeit says 0.437 usec -> 0.0685 usec. With Python 3.6, timeit says 0.157 usec -> 0.0907 usec. So it's faster on both versions, but the speedup varies a lot. Thanks to Gregory Szorc for the suggestion.
Wed, 15 Mar 2017 19:26:20 -0700 tests: properly drop back to root dir in test-status.t
Ryan McElroy <rmcelroy@fb.com> [Wed, 15 Mar 2017 19:26:20 -0700] rev 31432
tests: properly drop back to root dir in test-status.t
Thu, 16 Mar 2017 09:00:27 +0530 dirstate: use list comprehension to get a list of keys
Pulkit Goyal <7895pulkit@gmail.com> [Thu, 16 Mar 2017 09:00:27 +0530] rev 31431
dirstate: use list comprehension to get a list of keys We have used dict.keys() which returns a dict_keys() object instead of list on Python 3. So this patch replaces that with list comprehension which works both on Python 2 and 3.
Thu, 16 Mar 2017 08:03:51 +0530 match: slice over bytes to get the byteschr instead of ascii value
Pulkit Goyal <7895pulkit@gmail.com> [Thu, 16 Mar 2017 08:03:51 +0530] rev 31430
match: slice over bytes to get the byteschr instead of ascii value
Thu, 16 Mar 2017 07:52:47 +0530 match: make regular expression bytes to prevent TypeError
Pulkit Goyal <7895pulkit@gmail.com> [Thu, 16 Mar 2017 07:52:47 +0530] rev 31429
match: make regular expression bytes to prevent TypeError
Thu, 16 Mar 2017 06:32:33 +0530 scmutil: make function name bytes in class filecache
Pulkit Goyal <7895pulkit@gmail.com> [Thu, 16 Mar 2017 06:32:33 +0530] rev 31428
scmutil: make function name bytes in class filecache func.__name__ returns unicodes and this leads to keyerror when we try to do filecache[''] by passing bytes.
Wed, 15 Mar 2017 00:27:17 -0700 localrepo: deprecate 'wfile'
Pierre-Yves David <pierre-yves.david@ens-lyon.org> [Wed, 15 Mar 2017 00:27:17 -0700] rev 31427
localrepo: deprecate 'wfile' The method had very few users and the modern form is shorter. So let us deprecates another method of the localrepo class.
Wed, 15 Mar 2017 00:31:59 -0700 eol: use 'wvfs' instead of 'wfile'
Pierre-Yves David <pierre-yves.david@ens-lyon.org> [Wed, 15 Mar 2017 00:31:59 -0700] rev 31426
eol: use 'wvfs' instead of 'wfile' Method is about to be deprecated and the modern form is shorter.
Wed, 15 Mar 2017 00:29:09 -0700 localrepo: use 'wvfs' instead of 'wfile'
Pierre-Yves David <pierre-yves.david@ens-lyon.org> [Wed, 15 Mar 2017 00:29:09 -0700] rev 31425
localrepo: use 'wvfs' instead of 'wfile' Method is about to be deprecated and the modern form is shorter.
Wed, 15 Mar 2017 00:28:58 -0700 tagmerge: use 'wvfs' instead of 'wfile'
Pierre-Yves David <pierre-yves.david@ens-lyon.org> [Wed, 15 Mar 2017 00:28:58 -0700] rev 31424
tagmerge: use 'wvfs' instead of 'wfile' Method is about to be deprecated and the modern form is shorter.
Wed, 15 Mar 2017 00:28:21 -0700 gpg: use 'wvfs' instead of 'wfile'
Pierre-Yves David <pierre-yves.david@ens-lyon.org> [Wed, 15 Mar 2017 00:28:21 -0700] rev 31423
gpg: use 'wvfs' instead of 'wfile' Method is about to be deprecated and the modern form is shorter.
Wed, 28 Dec 2016 23:42:50 +0100 test: add a basic 'test-check-pylint.t'
Pierre-Yves David <pierre-yves.david@ens-lyon.org> [Wed, 28 Dec 2016 23:42:50 +0100] rev 31422
test: add a basic 'test-check-pylint.t' We add a minimal check using pylint for one case we knows we care about: "mutable default" argument. We'll likely extend this over time to cover other useful checks but this is a good starting point.
Tue, 14 Mar 2017 23:50:07 -0700 localrepo: don't use mutable default argument value
Pierre-Yves David <pierre-yves.david@ens-lyon.org> [Tue, 14 Mar 2017 23:50:07 -0700] rev 31421
localrepo: don't use mutable default argument value Caught by pylint.
Tue, 14 Mar 2017 23:49:25 -0700 httpclient: don't use mutable default argument value
Pierre-Yves David <pierre-yves.david@ens-lyon.org> [Tue, 14 Mar 2017 23:49:25 -0700] rev 31420
httpclient: don't use mutable default argument value Caught by pylint.
Tue, 14 Mar 2017 23:49:10 -0700 largefiles: don't use mutable default argument value
Pierre-Yves David <pierre-yves.david@ens-lyon.org> [Tue, 14 Mar 2017 23:49:10 -0700] rev 31419
largefiles: don't use mutable default argument value Caught by pylint.
Tue, 14 Mar 2017 23:48:25 -0700 hgk: don't use mutable default argument value
Pierre-Yves David <pierre-yves.david@ens-lyon.org> [Tue, 14 Mar 2017 23:48:25 -0700] rev 31418
hgk: don't use mutable default argument value Caught by pylint.
Tue, 14 Mar 2017 23:48:08 -0700 convert: don't use mutable default argument value
Pierre-Yves David <pierre-yves.david@ens-lyon.org> [Tue, 14 Mar 2017 23:48:08 -0700] rev 31417
convert: don't use mutable default argument value Caught by pylint.
Tue, 14 Mar 2017 23:46:48 -0700 mq: don't use mutable default argument value
Pierre-Yves David <pierre-yves.david@ens-lyon.org> [Tue, 14 Mar 2017 23:46:48 -0700] rev 31416
mq: don't use mutable default argument value Caught by pylint.
Mon, 13 Mar 2017 21:43:17 -0700 pager: if old pager extensions is enabled, respect pager.attend
Martin von Zweigbergk <martinvonz@google.com> [Mon, 13 Mar 2017 21:43:17 -0700] rev 31415
pager: if old pager extensions is enabled, respect pager.attend This patch makes us respect pager.attend again if the extension is enabled. It also brings back the default attend list, so e.g. summary is not paged by default, just like it used to be before pager was moved into core.
Mon, 13 Mar 2017 21:42:59 -0700 tests: duplicate test for pager for old extension and for in-core pager
Martin von Zweigbergk <martinvonz@google.com> [Mon, 13 Mar 2017 21:42:59 -0700] rev 31414
tests: duplicate test for pager for old extension and for in-core pager When the old pager extension is enabled, I think we should try to be as BC as reasonable. To help with that, this patch brings back test-pager.t as of 65a3b4d67a65 (pager: add a test of --pager=no functionality, 2017-02-06), but under the name test-pager-legacy.t However, since the behavior has changed in a few cases (notably by no longer respecting pager.attend), the file is modified to work with the current version. We will recover some lost BC in coming patches. Also, to make sure the in-core pager does not depend on the pager extension being enabled, this patch disables the extension in test-pager.t. It turns out that pager.attend-$cmd was only supported when the pager extension was enabled, so the tests are updated to reflect that. We will need to decide what to do with these.
Tue, 14 Mar 2017 08:51:35 -0700 util: make strdate's defaults default value a dict
Gregory Szorc <gregory.szorc@gmail.com> [Tue, 14 Mar 2017 08:51:35 -0700] rev 31413
util: make strdate's defaults default value a dict It was specified to be an empty list in c6adf2be6069 in 2007. It was correct at the time. But when the function was refactored in 91bc001a592f (2010), it started expecting a dict. I guess this code path is untested? Thanks to Yuya for spotting this.
Wed, 15 Mar 2017 14:51:18 +0530 py3: open file in rb mode
Rishabh Madan <rishabhmadan96@gmail.com> [Wed, 15 Mar 2017 14:51:18 +0530] rev 31412
py3: open file in rb mode
Tue, 14 Mar 2017 13:10:30 -0700 debuglabelcomplete: fix to call debugnamecomplete in new location
Kyle Lippincott <spectral@google.com> [Tue, 14 Mar 2017 13:10:30 -0700] rev 31411
debuglabelcomplete: fix to call debugnamecomplete in new location debugnamecomplete was moved in a9aa67ba from commands to debugcommands, but debuglabelcomplete was not modified to call it in its new location.
Mon, 13 Mar 2017 13:06:37 -0700 tests: prove that `hg init` works with Python 3
Gregory Szorc <gregory.szorc@gmail.com> [Mon, 13 Mar 2017 13:06:37 -0700] rev 31410
tests: prove that `hg init` works with Python 3 The previous patch made `hg init` work!
Mon, 13 Mar 2017 12:16:47 -0700 pycompat: custom implementation of urllib.parse.quote()
Gregory Szorc <gregory.szorc@gmail.com> [Mon, 13 Mar 2017 12:16:47 -0700] rev 31409
pycompat: custom implementation of urllib.parse.quote() urllib.parse.quote() accepts either str or bytes and returns str. There exists a urllib.parse.quote_from_bytes() which only accepts bytes. We should probably use that to retain strong typing and avoid surprises. In addition, since nearly all strings in Mercurial are bytes, we probably don't want quote() returning unicode. So, this patch implements a custom quote() that only accepts bytes and returns bytes. The quoted URL should only contain URL safe characters which is a strict subset of ASCII. So `.encode('ascii', 'strict')` should be safe.
Mon, 13 Mar 2017 12:14:17 -0700 pycompat: alias urllib symbols directly
Gregory Szorc <gregory.szorc@gmail.com> [Mon, 13 Mar 2017 12:14:17 -0700] rev 31408
pycompat: alias urllib symbols directly urllib.request imports a bunch of symbols from other urllib modules. We should map to the original symbols not the re-exported ones because this is more correct. Also, it will prevent an import of urllib.request if only one of the lower-level symbols/modules is needed.
Mon, 13 Mar 2017 13:08:11 -0700 tests: clean up bad extension
Gregory Szorc <gregory.szorc@gmail.com> [Mon, 13 Mar 2017 13:08:11 -0700] rev 31407
tests: clean up bad extension The presence of the "babar" extension breaks subsequent tests. So delete the file and create an empty one to return the config to sanity.
Mon, 13 Mar 2017 18:16:42 -0700 perf: perform a garbage collection before each iteration
Gregory Szorc <gregory.szorc@gmail.com> [Mon, 13 Mar 2017 18:16:42 -0700] rev 31406
perf: perform a garbage collection before each iteration Currently, no explicit garbage collection is performed when running the microbenchmarks in `hg perf`. I think this is wrong because garbage collection can have a significant impact on execution times. And, if gc is triggered via the default heuristics, it will fire effectively randomly during subsequent benchmark iterations due to variable amount of garbage left over from previous runs. Running a gc before invoking the measured function will help ensure state is more consistent across all iterations.
Mon, 13 Mar 2017 18:31:29 -0700 formatter: support json formatting of long type
Gregory Szorc <gregory.szorc@gmail.com> [Mon, 13 Mar 2017 18:31:29 -0700] rev 31405
formatter: support json formatting of long type By luck, we appear to not pass any long instances into the JSON formatter. I suspect this will change with all the Python 3 porting work. Plus I have another series that will convert some ints to longs that triggers this.
Sun, 12 Mar 2017 21:56:39 -0700 rebase: don't use mutable default argument value
Gregory Szorc <gregory.szorc@gmail.com> [Sun, 12 Mar 2017 21:56:39 -0700] rev 31404
rebase: don't use mutable default argument value
Sun, 12 Mar 2017 21:55:46 -0700 mq: don't use mutable default argument value
Gregory Szorc <gregory.szorc@gmail.com> [Sun, 12 Mar 2017 21:55:46 -0700] rev 31403
mq: don't use mutable default argument value
Sun, 12 Mar 2017 21:54:32 -0700 util: don't use mutable default argument value
Gregory Szorc <gregory.szorc@gmail.com> [Sun, 12 Mar 2017 21:54:32 -0700] rev 31402
util: don't use mutable default argument value I don't think this is any tight loops and we'd need to worry about PyObject creation overhead. Also, I'm pretty sure strptime() will be much slower than PyObject creation (date parsing is surprisingly slow).
Sun, 12 Mar 2017 21:53:03 -0700 match: don't use mutable default argument value
Gregory Szorc <gregory.szorc@gmail.com> [Sun, 12 Mar 2017 21:53:03 -0700] rev 31401
match: don't use mutable default argument value There shouldn't be a big perf hit creating a new object because this function is complicated and does things that dwarf the cost of creating a new PyObject.
Sun, 12 Mar 2017 21:52:17 -0700 hgweb: don't use mutable default argument value
Gregory Szorc <gregory.szorc@gmail.com> [Sun, 12 Mar 2017 21:52:17 -0700] rev 31400
hgweb: don't use mutable default argument value
Mon, 26 Dec 2016 16:55:47 -0700 hgweb: don't use mutable default argument value
Gregory Szorc <gregory.szorc@gmail.com> [Mon, 26 Dec 2016 16:55:47 -0700] rev 31399
hgweb: don't use mutable default argument value
Mon, 26 Dec 2016 16:54:33 -0700 filemerge: don't use mutable default argument value
Gregory Szorc <gregory.szorc@gmail.com> [Mon, 26 Dec 2016 16:54:33 -0700] rev 31398
filemerge: don't use mutable default argument value
Sun, 12 Mar 2017 21:50:42 -0700 context: don't use mutable default argument value
Gregory Szorc <gregory.szorc@gmail.com> [Sun, 12 Mar 2017 21:50:42 -0700] rev 31397
context: don't use mutable default argument value Mutable default argument values are a Python gotcha and can represent subtle, hard-to-find bugs. Lets rid our code base of them.
Mon, 13 Mar 2017 11:19:24 -0700 heads: enable pager
Martin von Zweigbergk <martinvonz@google.com> [Mon, 13 Mar 2017 11:19:24 -0700] rev 31396
heads: enable pager
Mon, 13 Mar 2017 11:03:59 -0700 branches: enable pager
Martin von Zweigbergk <martinvonz@google.com> [Mon, 13 Mar 2017 11:03:59 -0700] rev 31395
branches: enable pager
Sun, 12 Mar 2017 17:16:43 -0700 py3: fix slicing of bytes in revset.formatspec()
Yuya Nishihara <yuya@tcha.org> [Sun, 12 Mar 2017 17:16:43 -0700] rev 31394
py3: fix slicing of bytes in revset.formatspec()
Sun, 12 Mar 2017 17:13:54 -0700 py3: make set of revset operators and quotes in bytes
Yuya Nishihara <yuya@tcha.org> [Sun, 12 Mar 2017 17:13:54 -0700] rev 31393
py3: make set of revset operators and quotes in bytes
Sun, 12 Mar 2017 17:10:14 -0700 py3: convert set of revset initial symbols back to bytes
Yuya Nishihara <yuya@tcha.org> [Sun, 12 Mar 2017 17:10:14 -0700] rev 31392
py3: convert set of revset initial symbols back to bytes Otherwise tokenize() would fail due to comparison between unicode and bytes.
Sun, 12 Mar 2017 17:04:45 -0700 pycompat: add helper to iterate each char in bytes
Yuya Nishihara <yuya@tcha.org> [Sun, 12 Mar 2017 17:04:45 -0700] rev 31391
pycompat: add helper to iterate each char in bytes
Sun, 12 Mar 2017 19:47:51 -0400 branchmap: fix python 2.6 by using util.buffer() instead of passing bytearray
Augie Fackler <augie@google.com> [Sun, 12 Mar 2017 19:47:51 -0400] rev 31390
branchmap: fix python 2.6 by using util.buffer() instead of passing bytearray
Sun, 12 Mar 2017 16:44:01 -0700 rebase: allow rebasing children of wd to wd if a new branch has been set (BC)
Mads Kiilerich <mads@kiilerich.com> [Sun, 12 Mar 2017 16:44:01 -0700] rev 31389
rebase: allow rebasing children of wd to wd if a new branch has been set (BC) The named branch of the leaf changeset can be changed by updating to it, setting the branch, and amending. But previously, there was no good way to *just* change the branch of several linear changes. If rebasing changes with another parent to '.', it would pick up a pending branch change up. But when rebasing changes that have the same parent, it would fail with 'nothing to rebase', even when the branch name was set differently. To fix this, allow rebasing to same parent when a branch has been set.
Sun, 12 Mar 2017 16:41:46 -0700 merge: check current wc branch for 'nothing to merge', not its p1
Mads Kiilerich <mads@kiilerich.com> [Sun, 12 Mar 2017 16:41:46 -0700] rev 31388
merge: check current wc branch for 'nothing to merge', not its p1 The working directory will usually be clean or very clean, and wc will usually have the same branch as its parent. This change will thus usually not make any difference and is done as a separate change to show that. It will be used in a later change.
Sun, 12 Mar 2017 16:26:34 -0700 lock: do not encode result of gethostname on Python 2
Yuya Nishihara <yuya@tcha.org> [Sun, 12 Mar 2017 16:26:34 -0700] rev 31387
lock: do not encode result of gethostname on Python 2 If a hostname contained non-ascii character, str.encode() would first try to decode it to a unicode and raise UnicodeDecodeError.
Sun, 12 Mar 2017 03:33:38 -0400 py3: prove `hg files --rev` works
Augie Fackler <augie@google.com> [Sun, 12 Mar 2017 03:33:38 -0400] rev 31386
py3: prove `hg files --rev` works
Sun, 12 Mar 2017 03:37:45 -0400 tests: make a variable for hg binary location in test-check-py3-commands
Augie Fackler <augie@google.com> [Sun, 12 Mar 2017 03:37:45 -0400] rev 31385
tests: make a variable for hg binary location in test-check-py3-commands The number of which calls in here is starting to get silly.
Sun, 12 Mar 2017 03:28:50 -0400 lock: encode result of gethostname into a bytestring
Augie Fackler <augie@google.com> [Sun, 12 Mar 2017 03:28:50 -0400] rev 31384
lock: encode result of gethostname into a bytestring
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.
Sun, 12 Mar 2017 03:32:21 -0400 py3: use bytearray() instead of array('c', ...) constructions
Augie Fackler <augie@google.com> [Sun, 12 Mar 2017 03:32:21 -0400] rev 31355
py3: use bytearray() instead of array('c', ...) constructions Portable from 2.6-3.6.
Sat, 11 Mar 2017 20:58:26 -0500 summary: don't explicitly str() something we're about to %s
Augie Fackler <augie@google.com> [Sat, 11 Mar 2017 20:58:26 -0500] rev 31354
summary: don't explicitly str() something we're about to %s str() is wrong on Python 3 here, and %s implicitly calls str() anyway, so this was just extra dancing for no reason.
Sat, 11 Mar 2017 20:57:40 -0500 context: implement both __bytes__ and __str__ for Python 3
Augie Fackler <augie@google.com> [Sat, 11 Mar 2017 20:57:40 -0500] rev 31353
context: implement both __bytes__ and __str__ for Python 3 They're very similar, for obvious reasons.
Sat, 11 Mar 2017 20:57:04 -0500 context: work around `long` not existing on Python 3
Augie Fackler <augie@google.com> [Sat, 11 Mar 2017 20:57:04 -0500] rev 31352
context: work around `long` not existing on Python 3 I can't figure out what this branch is even trying to accomplish, and it was introduced in ac89a23ca814 which doesn't really shed any insight into why longs are treated differently from ints.
Sat, 11 Mar 2017 20:53:20 -0500 phases: explicitly evaluate list returned by map
Augie Fackler <augie@google.com> [Sat, 11 Mar 2017 20:53:20 -0500] rev 31351
phases: explicitly evaluate list returned by map On Python 3 map() returns a generator, which bool()s to true even if it had an empty input set. Work around this by using list() on the map() result.
Sat, 11 Mar 2017 20:51:09 -0500 ui: check for --debugger in sys.argv using r-string to avoid bytes on py3
Augie Fackler <augie@google.com> [Sat, 11 Mar 2017 20:51:09 -0500] rev 31350
ui: check for --debugger in sys.argv using r-string to avoid bytes on py3 Our source loader was errantly turning this --debugger into a bytes, which was then causing me to still get a pager when I was using the debugger on py3. That made life hard.
Sun, 12 Mar 2017 22:46:57 +0530 minirst: use bytes.strip instead of str.strip
Pulkit Goyal <7895pulkit@gmail.com> [Sun, 12 Mar 2017 22:46:57 +0530] rev 31349
minirst: use bytes.strip instead of str.strip bytes.strip exists in Python 2.6 and Python 2.7 also.
Sun, 12 Mar 2017 22:27:53 +0530 smcposix: pass unicode as first argument to array.array
Pulkit Goyal <7895pulkit@gmail.com> [Sun, 12 Mar 2017 22:27:53 +0530] rev 31348
smcposix: pass unicode as first argument to array.array This is an instance where we can safely convert the first argument, rest are the cases except one where we are using 'c' which is not there in Python 3. So that needs to be handled differently. This will help in making `hg help` run on Python 3.
Sun, 12 Mar 2017 07:35:13 +0530 util: pass encoding.[encoding|encodingmode] as unicodes
Pulkit Goyal <7895pulkit@gmail.com> [Sun, 12 Mar 2017 07:35:13 +0530] rev 31347
util: pass encoding.[encoding|encodingmode] as unicodes We need to pass str to encode() and decode().
Wed, 08 Mar 2017 16:52:57 -0800 win32text: directly use repo.vfs.join
Pierre-Yves David <pierre-yves.david@ens-lyon.org> [Wed, 08 Mar 2017 16:52:57 -0800] rev 31346
win32text: directly use repo.vfs.join The 'repo.join' method is about to be deprecated.
Wed, 08 Mar 2017 16:52:49 -0800 transplant: directly use repo.vfs.join
Pierre-Yves David <pierre-yves.david@ens-lyon.org> [Wed, 08 Mar 2017 16:52:49 -0800] rev 31345
transplant: directly use repo.vfs.join The 'repo.join' method is about to be deprecated.
Wed, 08 Mar 2017 16:52:42 -0800 shelve: directly use repo.vfs.join
Pierre-Yves David <pierre-yves.david@ens-lyon.org> [Wed, 08 Mar 2017 16:52:42 -0800] rev 31344
shelve: directly use repo.vfs.join The 'repo.join' method is about to be deprecated.
Wed, 08 Mar 2017 16:52:30 -0800 share: directly use repo.vfs.join
Pierre-Yves David <pierre-yves.david@ens-lyon.org> [Wed, 08 Mar 2017 16:52:30 -0800] rev 31343
share: directly use repo.vfs.join The 'repo.join' method is about to be deprecated.
Wed, 08 Mar 2017 16:52:16 -0800 mq: directly use repo.vfs.join
Pierre-Yves David <pierre-yves.david@ens-lyon.org> [Wed, 08 Mar 2017 16:52:16 -0800] rev 31342
mq: directly use repo.vfs.join The 'repo.join' method is about to be deprecated.
Wed, 08 Mar 2017 16:52:06 -0800 largefiles: directly use repo.vfs.join
Pierre-Yves David <pierre-yves.david@ens-lyon.org> [Wed, 08 Mar 2017 16:52:06 -0800] rev 31341
largefiles: directly use repo.vfs.join The 'repo.join' method is about to be deprecated.
Wed, 08 Mar 2017 16:51:57 -0800 keyword: directly use repo.vfs.join
Pierre-Yves David <pierre-yves.david@ens-lyon.org> [Wed, 08 Mar 2017 16:51:57 -0800] rev 31340
keyword: directly use repo.vfs.join The 'repo.join' method is about to be deprecated.
Wed, 08 Mar 2017 16:51:49 -0800 journal: directly use repo.vfs.join
Pierre-Yves David <pierre-yves.david@ens-lyon.org> [Wed, 08 Mar 2017 16:51:49 -0800] rev 31339
journal: directly use repo.vfs.join The 'repo.join' method is about to be deprecated.
Wed, 08 Mar 2017 16:51:43 -0800 histedit: directly use repo.vfs.join
Pierre-Yves David <pierre-yves.david@ens-lyon.org> [Wed, 08 Mar 2017 16:51:43 -0800] rev 31338
histedit: directly use repo.vfs.join The 'repo.join' method is about to be deprecated.
Wed, 08 Mar 2017 16:51:36 -0800 eol: directly use repo.vfs.join
Pierre-Yves David <pierre-yves.david@ens-lyon.org> [Wed, 08 Mar 2017 16:51:36 -0800] rev 31337
eol: directly use repo.vfs.join The 'repo.join' method is about to be deprecated.
Wed, 08 Mar 2017 16:51:25 -0800 convert: directly use repo.vfs.join
Pierre-Yves David <pierre-yves.david@ens-lyon.org> [Wed, 08 Mar 2017 16:51:25 -0800] rev 31336
convert: directly use repo.vfs.join The 'repo.join' method is about to be deprecated.
Wed, 08 Mar 2017 16:53:55 -0800 test-bundle2-remote-changegroup: directly use repo.vfs.join
Pierre-Yves David <pierre-yves.david@ens-lyon.org> [Wed, 08 Mar 2017 16:53:55 -0800] rev 31335
test-bundle2-remote-changegroup: directly use repo.vfs.join The 'repo.join' method is about to be deprecated.
Wed, 08 Mar 2017 16:53:47 -0800 subrepo: directly use repo.vfs.join
Pierre-Yves David <pierre-yves.david@ens-lyon.org> [Wed, 08 Mar 2017 16:53:47 -0800] rev 31334
subrepo: directly use repo.vfs.join The 'repo.join' method is about to be deprecated.
Wed, 08 Mar 2017 16:53:39 -0800 repair: directly use repo.vfs.join
Pierre-Yves David <pierre-yves.david@ens-lyon.org> [Wed, 08 Mar 2017 16:53:39 -0800] rev 31333
repair: directly use repo.vfs.join The 'repo.join' method is about to be deprecated.
Wed, 08 Mar 2017 16:53:32 -0800 merge: directly use repo.vfs.join
Pierre-Yves David <pierre-yves.david@ens-lyon.org> [Wed, 08 Mar 2017 16:53:32 -0800] rev 31332
merge: directly use repo.vfs.join The 'repo.join' method is about to be deprecated.
Wed, 08 Mar 2017 16:53:24 -0800 hg-mod: directly use repo.vfs.join
Pierre-Yves David <pierre-yves.david@ens-lyon.org> [Wed, 08 Mar 2017 16:53:24 -0800] rev 31331
hg-mod: directly use repo.vfs.join The 'repo.join' method is about to be deprecated.
Wed, 08 Mar 2017 16:53:17 -0800 commands: directly use repo.vfs.join
Pierre-Yves David <pierre-yves.david@ens-lyon.org> [Wed, 08 Mar 2017 16:53:17 -0800] rev 31330
commands: directly use repo.vfs.join The 'repo.join' method is about to be deprecated.
Wed, 08 Mar 2017 16:53:09 -0800 cmdutil: directly use repo.vfs.join
Pierre-Yves David <pierre-yves.david@ens-lyon.org> [Wed, 08 Mar 2017 16:53:09 -0800] rev 31329
cmdutil: directly use repo.vfs.join The 'repo.join' method is about to be deprecated.
Fri, 05 Aug 2016 14:29:22 +0200 localrepo: directly use repo.vfs.join
Pierre-Yves David <pierre-yves.david@ens-lyon.org> [Fri, 05 Aug 2016 14:29:22 +0200] rev 31328
localrepo: directly use repo.vfs.join The 'repo.join' method is about to be deprecated.
Sun, 12 Mar 2017 07:09:18 +0530 minirst: make encoding.encoding unicodes to pass into encode() and decode()
Pulkit Goyal <7895pulkit@gmail.com> [Sun, 12 Mar 2017 07:09:18 +0530] rev 31327
minirst: make encoding.encoding unicodes to pass into encode() and decode()
Sun, 12 Mar 2017 06:59:37 +0530 minirst: make regular expressions bytes
Pulkit Goyal <7895pulkit@gmail.com> [Sun, 12 Mar 2017 06:59:37 +0530] rev 31326
minirst: make regular expressions bytes
Sat, 11 Mar 2017 17:14:02 -0800 setup: convert setupversion to unicode
Gregory Szorc <gregory.szorc@gmail.com> [Sat, 11 Mar 2017 17:14:02 -0800] rev 31325
setup: convert setupversion to unicode Something deep in the bowels of distutils expects "version" passed to setup() to be a str/unicode. So, convert the type. This still works on Python 2 because the string is ascii and an implicit coercion back to str/bytes should work without issue. If it does cause problems, we can always make the unicode conversion dependent on running Python 3. This change makes `python3.5 setup.py install` work.
Wed, 14 Jan 2015 01:15:26 +0100 util: add debugstacktrace depth limit
Mads Kiilerich <madski@unity3d.com> [Wed, 14 Jan 2015 01:15:26 +0100] rev 31324
util: add debugstacktrace depth limit Useful when you don't care about the start of the stack, but only want to see the last entries.
Fri, 16 Jan 2015 04:26:40 +0100 util: strip trailing newline from debugstacktrace message
Mads Kiilerich <madski@unity3d.com> [Fri, 16 Jan 2015 04:26:40 +0100] rev 31323
util: strip trailing newline from debugstacktrace message This makes the function more convenient to use as drop-in replacement for ui.write & co.
Fri, 16 Jan 2015 04:26:40 +0100 tests: rework util.debugstacktrace tests
Mads Kiilerich <madski@unity3d.com> [Fri, 16 Jan 2015 04:26:40 +0100] rev 31322
tests: rework util.debugstacktrace tests Prepare for adding another test.
Sat, 11 Mar 2017 11:04:14 -0800 vfs: use repo.vfs.rename
Mads Kiilerich <mads@kiilerich.com> [Sat, 11 Mar 2017 11:04:14 -0800] rev 31321
vfs: use repo.vfs.rename
Sat, 11 Mar 2017 11:02:25 -0800 vfs: use repo.vfs.unlinkpath
Mads Kiilerich <mads@kiilerich.com> [Sat, 11 Mar 2017 11:02:25 -0800] rev 31320
vfs: use repo.vfs.unlinkpath
Wed, 14 Jan 2015 01:15:26 +0100 merge: use repo.wvfs.unlinkpath
Mads Kiilerich <madski@unity3d.com> [Wed, 14 Jan 2015 01:15:26 +0100] rev 31319
merge: use repo.wvfs.unlinkpath
Wed, 14 Jan 2015 01:15:26 +0100 vfs: use repo.wvfs.unlinkpath
Mads Kiilerich <madski@unity3d.com> [Wed, 14 Jan 2015 01:15:26 +0100] rev 31318
vfs: use repo.wvfs.unlinkpath
Wed, 08 Mar 2017 18:11:41 -0500 policy: try and always have a bytes for module policy
Augie Fackler <raf@durin42.com> [Wed, 08 Mar 2017 18:11:41 -0500] rev 31317
policy: try and always have a bytes for module policy debuginstall now runs cleanly in Python 3.
Wed, 08 Mar 2017 18:11:19 -0500 init: zstd is already python3-ready, so don't run it through our importer
Augie Fackler <raf@durin42.com> [Wed, 08 Mar 2017 18:11:19 -0500] rev 31316
init: zstd is already python3-ready, so don't run it through our importer
Fri, 03 Mar 2017 14:42:56 -0500 config: guard against setconfig specifying unicode values on py3
Augie Fackler <raf@durin42.com> [Fri, 03 Mar 2017 14:42:56 -0500] rev 31315
config: guard against setconfig specifying unicode values on py3 This was leading to some difficult to trace problems because the values were set in one place, but then blew up much later in the program. Exploding violently with an assertion seems reasonable here.
Fri, 03 Mar 2017 14:43:27 -0500 dispatch: enforce bytes when converting boolean flags to config items
Augie Fackler <raf@durin42.com> [Fri, 03 Mar 2017 14:43:27 -0500] rev 31314
dispatch: enforce bytes when converting boolean flags to config items This fixes --verbose on Python 3.
Fri, 03 Mar 2017 13:52:08 -0500 py3: add a test that proves %include and missing-extension code works
Augie Fackler <raf@durin42.com> [Fri, 03 Mar 2017 13:52:08 -0500] rev 31313
py3: add a test that proves %include and missing-extension code works
Fri, 03 Mar 2017 14:08:02 -0500 extensions: tapdance to get reasonable import error formatting
Augie Fackler <raf@durin42.com> [Fri, 03 Mar 2017 14:08:02 -0500] rev 31312
extensions: tapdance to get reasonable import error formatting I'm not thrilled with this, but it seems to work.
Sat, 11 Mar 2017 10:35:44 -0800 rebase: abort if *any* commit in rebase set is public
Martin von Zweigbergk <martinvonz@google.com> [Sat, 11 Mar 2017 10:35:44 -0800] rev 31311
rebase: abort if *any* commit in rebase set is public
Sat, 11 Mar 2017 13:53:14 -0500 merge with stable
Augie Fackler <augie@google.com> [Sat, 11 Mar 2017 13:53:14 -0500] rev 31310
merge with stable
Thu, 09 Mar 2017 20:53:14 -0800 httpconnection: rename config to groups
Gregory Szorc <gregory.szorc@gmail.com> [Thu, 09 Mar 2017 20:53:14 -0800] rev 31309
httpconnection: rename config to groups Because that is what it is.
Thu, 09 Mar 2017 20:51:57 -0800 httpconnection: don't use dict()
Gregory Szorc <gregory.szorc@gmail.com> [Thu, 09 Mar 2017 20:51:57 -0800] rev 31308
httpconnection: don't use dict() Not sure the history here. But we don't do this elsewhere.
Thu, 09 Mar 2017 15:38:00 -0800 formatter: set _first on formatter, not ui
Martin von Zweigbergk <martinvonz@google.com> [Thu, 09 Mar 2017 15:38:00 -0800] rev 31307
formatter: set _first on formatter, not ui The _first field is used for tracking when to emit a separator between items. It seems like it's clearly formatter state, not ui state, so let's move it there.
Fri, 10 Mar 2017 23:07:20 -0800 rebase: unhide original working directory node as well (issue5219)
Martin von Zweigbergk <martinvonz@google.com> [Fri, 10 Mar 2017 23:07:20 -0800] rev 31306
rebase: unhide original working directory node as well (issue5219) By including the working directory revision at the start of rebase in the repo._rebaseset, we make sure it's not hidden when we update back to it at the end of the rebase. This feels like abusing the set a bit given its name (_rebaseset), but I couldn't think of another name that's clearly better.
(0) -30000 -10000 -3000 -1000 -192 +192 +1000 +3000 +10000 tip