Thu, 01 Jun 2017 02:25:18 +0530 py3: implement __bytes__ for committablectx
Pulkit Goyal <7895pulkit@gmail.com> [Thu, 01 Jun 2017 02:25:18 +0530] rev 32666
py3: implement __bytes__ for committablectx Before this method, calling bytes on workingctx or memctx calls basectx.__bytes__ since the magic method was not defined for this class. When it calls the method from basectx class, it returns TypeError because None is passed into it. After this commit `hg update -C` works on Python 3 if eol is not enabled.
Fri, 02 Jun 2017 10:35:21 +0530 py3: convert exception to bytes to pass into ui.warn()
Pulkit Goyal <7895pulkit@gmail.com> [Fri, 02 Jun 2017 10:35:21 +0530] rev 32665
py3: convert exception to bytes to pass into ui.warn() Here encoding.strtolocal() is used because exc maybe an IOError which could contain a valid non-ascii unicode.
Thu, 01 Jun 2017 02:14:26 +0530 py3: convert bool variables to bytes before passing into ui.debug()
Pulkit Goyal <7895pulkit@gmail.com> [Thu, 01 Jun 2017 02:14:26 +0530] rev 32664
py3: convert bool variables to bytes before passing into ui.debug() We can't pass unicodes to ui.debug() and hence we need to convert things to bytes before passing them.
Thu, 01 Jun 2017 01:14:02 +0530 py3: use dict.update() instead of constructing lists and adding them
Pulkit Goyal <7895pulkit@gmail.com> [Thu, 01 Jun 2017 01:14:02 +0530] rev 32663
py3: use dict.update() instead of constructing lists and adding them dict.items() returned a list on Python 2 and whereas on Python 3 it returns a view object. So we required a work around. Using dict.update() is better then constructing lists as it should save us on gc churns.
Fri, 03 Feb 2017 15:02:27 +0100 patchbomb: add -B option to select a bookmark
David Demelier <demelier.david@gmail.com> [Fri, 03 Feb 2017 15:02:27 +0100] rev 32662
patchbomb: add -B option to select a bookmark Add the -B/--bookmark option to select a bookmark whose changesets and its ancestors will be selected unless a new bookmark/head is found. This is inspired by hg strip -B option.
Sat, 27 May 2017 22:27:56 +0200 test: add the mirror push race case for non-contiguous branch head
Pierre-Yves David <pierre-yves.david@octobus.net> [Sat, 27 May 2017 22:27:56 +0200] rev 32661
test: add the mirror push race case for non-contiguous branch head We check case where the raced push update that a head through another named branch while the racing push update that same head.
Sat, 27 May 2017 22:27:41 +0200 test: add a push race case where non-contiguous branch head are created
Pierre-Yves David <pierre-yves.david@octobus.net> [Sat, 27 May 2017 22:27:41 +0200] rev 32660
test: add a push race case where non-contiguous branch head are created We check case where the raced push an update to branch default head while the racing push update that same head but through another named branch.
Sat, 27 May 2017 22:27:09 +0200 test: add a push race case where the raced push touch multiple heads
Pierre-Yves David <pierre-yves.david@octobus.net> [Sat, 27 May 2017 22:27:09 +0200] rev 32659
test: add a push race case where the raced push touch multiple heads We check case where the raced push update all heads while the racing push update one of them.
Sat, 27 May 2017 22:26:51 +0200 test: add a push race case where racing push touches multiple heads
Pierre-Yves David <pierre-yves.david@octobus.net> [Sat, 27 May 2017 22:26:51 +0200] rev 32658
test: add a push race case where racing push touches multiple heads We check case where the raced push updates a head while the racing push update all of them.
Sat, 27 May 2017 22:26:35 +0200 test: add a push race case where racing push create a new named branch
Pierre-Yves David <pierre-yves.david@octobus.net> [Sat, 27 May 2017 22:26:35 +0200] rev 32657
test: add a push race case where racing push create a new named branch This is the mirror case from the previos one. We check case where the raced push update a head while the racing push create a new named branch as a children of that updated head.
Sat, 27 May 2017 22:26:16 +0200 test: add a push race case where raced push created a new named branch
Pierre-Yves David <pierre-yves.david@octobus.net> [Sat, 27 May 2017 22:26:16 +0200] rev 32656
test: add a push race case where raced push created a new named branch We check case where the raced push create a new branch on the same head updated by the racing push.
Sat, 27 May 2017 22:25:40 +0200 test: add a push race case where the racing client create a new head
Pierre-Yves David <pierre-yves.david@octobus.net> [Sat, 27 May 2017 22:25:40 +0200] rev 32655
test: add a push race case where the racing client create a new head We check case where the raced client push updates an existing head while the racing client push creates a new one.
Sat, 27 May 2017 22:25:20 +0200 test: add a push race case where each client replaces a different head
Pierre-Yves David <pierre-yves.david@octobus.net> [Sat, 27 May 2017 22:25:20 +0200] rev 32654
test: add a push race case where each client replaces a different head We check case where the raced push replace one head while the racing push replaces another unrelated one. That second test also make sure we synchronise all repositories to the same state between tests. That will help us when allowing some sort of concurrent pushes.
Sat, 27 May 2017 22:24:58 +0200 test: add a file dedicated to push race between clients
Pierre-Yves David <pierre-yves.david@octobus.net> [Sat, 27 May 2017 22:24:58 +0200] rev 32653
test: add a file dedicated to push race between clients There are very few tests around the detection of push race. This file will be dedicated to covering these cases more through fully. We start with a simple case. More complex cases get added in later changesets. My end goal here is to provide a way for server to accept concurrent push as long as they are not touching the same heads. However, I want to buff the test coverage of that code before touching anything.
Sat, 20 May 2017 16:19:59 +0200 strip: strip obsmarkers exclusive to the stripped changeset
Pierre-Yves David <pierre-yves.david@octobus.net> [Sat, 20 May 2017 16:19:59 +0200] rev 32652
strip: strip obsmarkers exclusive to the stripped changeset This is it, `hg strip --rev X` will now also remove obsolescence markers exclusive to X. Since a previous changeset, the obsmarkers has been backed up in the strip backup bundle, so it is possible to restore them. Note: stripping obsmarkers means the precursors of the stripped changeset might no longer be obsolete after the strip. Stripping changeset without obsmarkers can be useful when building test case. So It is possible to disable the stripping of obsmarkers using the 'devel.strip-obsmarkers' config option. Test change have been carefully validated.
Thu, 01 Jun 2017 12:08:49 +0200 strip: do not include obsolescence markers for the temporary bundle
Pierre-Yves David <pierre-yves.david@octobus.net> [Thu, 01 Jun 2017 12:08:49 +0200] rev 32651
strip: do not include obsolescence markers for the temporary bundle When stripping, we need to put all non-stripped revisions "above" the stripped ones in a "temporary-bundle" while we strip the targets revision. Then we reapply that bundle to restore these non-stripped revisions (with a new revision numbers). We skip the inclusion of obsolescence markers in that bundle. This is safe since all obsmarkers we plan to strip will be backed-up in the strip backup bundle. Including the markers would create issue in some case were we try to strip a prune markers that is "relevant" to a revision in the "temporary-bundle". (note: we do not strip obsmarkers yet)
Thu, 01 Jun 2017 08:44:01 +0200 exclusive-markers: update the dedicated test with list of exclusive markers
Pierre-Yves David <pierre-yves.david@octobus.net> [Thu, 01 Jun 2017 08:44:01 +0200] rev 32650
exclusive-markers: update the dedicated test with list of exclusive markers We now display data about the "exclusive markers" in the test dedicated to relevant and exclusive markers computation and usage. Each output have been carefully validated
Sat, 20 May 2017 15:02:30 +0200 obsolete: add a function to compute "exclusive-markers" for a set of nodes
Pierre-Yves David <pierre-yves.david@octobus.net> [Sat, 20 May 2017 15:02:30 +0200] rev 32649
obsolete: add a function to compute "exclusive-markers" for a set of nodes This set will be used to select the obsmarkers to be stripped alongside the stripped changesets. See the function docstring for details. More advanced testing is introduced in the next changesets to keep this one simpler. That extra testing provides more example.
Thu, 01 Jun 2017 08:32:24 +0200 test-obsolete-bundle-strip: check all changesets in the isolated prune case
Pierre-Yves David <pierre-yves.david@octobus.net> [Thu, 01 Jun 2017 08:32:24 +0200] rev 32648
test-obsolete-bundle-strip: check all changesets in the isolated prune case We also want to check the result of the various computations when both changesets are selected (the pruned changesets and its parents).
Fri, 26 May 2017 03:52:11 +0200 test-obsolete-bundle-strip: add testing of markers backup during strip
Pierre-Yves David <pierre-yves.david@octobus.net> [Fri, 26 May 2017 03:52:11 +0200] rev 32647
test-obsolete-bundle-strip: add testing of markers backup during strip When applicable, we strip the revision tested in the test and we check that the backup bundle contains the appropriate markers.
Sat, 20 May 2017 15:06:10 +0200 strip: also backup obsmarkers
Pierre-Yves David <pierre-yves.david@octobus.net> [Sat, 20 May 2017 15:06:10 +0200] rev 32646
strip: also backup obsmarkers We are about to give 'strip' the ability to remove obsmarkers. Before we start removing data we must make sure it is preserved somewhere. So the backup bundle created by 'strip' now contains obsmarkers.
Tue, 30 May 2017 20:48:43 -0400 tests: fix run-tests when there's a bad #if in a test
Augie Fackler <augie@google.com> [Tue, 30 May 2017 20:48:43 -0400] rev 32645
tests: fix run-tests when there's a bad #if in a test That has (and still does) caused the test to be skipped, but without this fix it was possible to exit this block of code without clearing the output channel, which poisoned the channel list for later test method runs. Fix this by always clearing the channel in a finally. The test for this is somewhat unfortunate. Sadly, I couldn't get a way to reproduce this with less than 2n+1 test cases, nor could I get it to reproduce reliably without the sleep statements. It's also crucial that the test with the broken #if be smaller (in terms of byte count) than the sleeping tests, so that it runs first and would poison the channel list prior to another test needing that entry from the list.
Tue, 30 May 2017 20:47:00 -0400 tests: make run-tests fail early if no channel is found
Augie Fackler <augie@google.com> [Tue, 30 May 2017 20:47:00 -0400] rev 32644
tests: make run-tests fail early if no channel is found I hit a weird corner case in run-tests where a test that caused an exception to be raised was breaking everything with an unbound variable error a few lines down because channel was never getting set in this for loop. By adding an `else` clause to this for loop, we can explode right away if we can't find a channel and give the developer a better chance at figuring out what's going on.
Sun, 28 May 2017 15:47:00 -0400 dispatch: convert exception payload to bytes more carefully
Augie Fackler <raf@durin42.com> [Sun, 28 May 2017 15:47:00 -0400] rev 32643
dispatch: convert exception payload to bytes more carefully We were previously depending on str() doing something reasonable here, and we can't depend on the objects in question supporting __bytes__, so we work around the lack of direct bytes formatting.
Sun, 28 May 2017 15:49:29 -0400 help: convert flag default to bytes portably
Augie Fackler <raf@durin42.com> [Sun, 28 May 2017 15:49:29 -0400] rev 32642
help: convert flag default to bytes portably We were relying on %s using repr on (for example) integer values. Work around that for Python 3 while preserving all the prior magic.
Thu, 01 Jun 2017 23:08:23 +0900 cmdutil: use isstdiofilename() where appropriate
Yuya Nishihara <yuya@tcha.org> [Thu, 01 Jun 2017 23:08:23 +0900] rev 32641
cmdutil: use isstdiofilename() where appropriate
Thu, 01 Jun 2017 23:05:29 +0900 py3: simply use b'%d\n' to format pid in server.py
Yuya Nishihara <yuya@tcha.org> [Thu, 01 Jun 2017 23:05:29 +0900] rev 32640
py3: simply use b'%d\n' to format pid in server.py Spotted by Martin, thanks.
Thu, 01 Jun 2017 22:43:24 +0900 py3: implement __bytes__() on most of our exception classes
Yuya Nishihara <yuya@tcha.org> [Thu, 01 Jun 2017 22:43:24 +0900] rev 32639
py3: implement __bytes__() on most of our exception classes We store bytes in exc.args, which should be translated to a byte string without encode/decode dance. IOError subclasses are unchanged for now. We'll need to decide how our IOErrors should be caught.
Thu, 01 Jun 2017 22:24:15 +0900 py3: convert __doc__ back to bytes in help.py
Yuya Nishihara <yuya@tcha.org> [Thu, 01 Jun 2017 22:24:15 +0900] rev 32638
py3: convert __doc__ back to bytes in help.py pycompat.getdoc() is pretty simple, but we wouldn't want to write handling of None inline.
Thu, 01 Jun 2017 01:41:34 +0530 py3: ensure that we don't concat bytes and str and the end result is bytes
Pulkit Goyal <7895pulkit@gmail.com> [Thu, 01 Jun 2017 01:41:34 +0530] rev 32637
py3: ensure that we don't concat bytes and str and the end result is bytes Here obj.__module__ and obj.__name__ are str. Either we can convert them to bytes or use an r'' and convert back to bytes when concat is done. I preferred the later one since we are encoding only once here.
Thu, 01 Jun 2017 00:00:10 +0530 py3: make sure we return strings from __str__ and __repr__
Pulkit Goyal <7895pulkit@gmail.com> [Thu, 01 Jun 2017 00:00:10 +0530] rev 32636
py3: make sure we return strings from __str__ and __repr__ On Python 3: >>> class abc: ... def __repr__(self): ... return b'abc' ... >>> abc() Traceback (most recent call last): File "<stdin>", line 1, in <module> TypeError: __repr__ returned non-string (type bytes) >>> class abc: ... def __str__(self): ... return b'abc' ... >>> str(abc()) Traceback (most recent call last): File "<stdin>", line 1, in <module> TypeError: __str__ returned non-string (type bytes) So the __str__ and __repr__ must return strings.
Wed, 31 May 2017 23:48:52 +0530 py3: replace None with -1 to sort an integer array
Pulkit Goyal <7895pulkit@gmail.com> [Wed, 31 May 2017 23:48:52 +0530] rev 32635
py3: replace None with -1 to sort an integer array In Python 2: >>> ls = [4, 2, None] >>> sorted(ls) [None, 2, 4] In Python 3: >>> ls = [4, 2, None] >>> sorted(ls) Traceback (most recent call last): File "<stdin>", line 1, in <module> TypeError: unorderable types: NoneType() < int() Therefore we replaced None with -1, and the safe part is that, None and -1 are only the keys which are used for sorting so we don't need to convert the -1's back to None.
(0) -30000 -10000 -3000 -1000 -300 -100 -50 -32 +32 +50 +100 +300 +1000 +3000 +10000 tip