Wed, 31 Oct 2018 22:03:07 +0900 commandserver: remove redundant "if True" block
Yuya Nishihara <yuya@tcha.org> [Wed, 31 Oct 2018 22:03:07 +0900] rev 40895
commandserver: remove redundant "if True" block
Wed, 31 Oct 2018 22:02:38 +0900 commandserver: extract handler of new socket connection
Yuya Nishihara <yuya@tcha.org> [Wed, 31 Oct 2018 22:02:38 +0900] rev 40894
commandserver: extract handler of new socket connection This prepares for adding an IPC socket.
Wed, 31 Oct 2018 21:57:11 +0900 commandserver: pass around option to hook repo instance creation
Yuya Nishihara <yuya@tcha.org> [Wed, 31 Oct 2018 21:57:11 +0900] rev 40893
commandserver: pass around option to hook repo instance creation This is necessary to wrap a repo instance so the master process will be notified on repo.close().
Sun, 09 Dec 2018 19:40:54 -0500 py3: stop subscripting socket.error
Matt Harbison <matt_harbison@yahoo.com> [Sun, 09 Dec 2018 19:40:54 -0500] rev 40892
py3: stop subscripting socket.error In 3.3 and later, this is now an alias for OSError. I hacked up the server code enough that I was able to trigger the exception handler in server.py from test-http-bundle1.t. Other instances of this either subscript through the `args` member, or reference the errno or strerror attributes. Note that on Windows, the errno value seems to reflect the Winsock error, so the various tests for EPIPE seem like they would always fail. But that seems to be the case in py2 as well.
Sun, 09 Dec 2018 16:49:55 +0100 test: update test-logtoprocess.t to not requires less
Boris Feld <boris.feld@octobus.net> [Sun, 09 Dec 2018 16:49:55 +0100] rev 40891
test: update test-logtoprocess.t to not requires less The test previously assumed that a working pager was present in the test environment. Update it to use the fakepager instead. Differential Revision: https://phab.mercurial-scm.org/D5399
Sun, 09 Dec 2018 21:23:34 -0500 py3: quote several instances of $PYTHON for Windows
Matt Harbison <matt_harbison@yahoo.com> [Sun, 09 Dec 2018 21:23:34 -0500] rev 40890
py3: quote several instances of $PYTHON for Windows Python3 lives in Program Files by default. The last remaining unquoted instance is in test-hghave.t. I can't figure out how to quote that, as it either complains: 'c:\\Program' is not recognized as an internal or external command, operable program or batch file. or $TESTTMP.sh: line 22: "C:/Program Files/Python37/python.exe": $ENOENT$
Sun, 09 Dec 2018 18:35:35 -0500 py3: adapt test-largefiles-wireproto.t to python3
Matt Harbison <matt_harbison@yahoo.com> [Sun, 09 Dec 2018 18:35:35 -0500] rev 40889
py3: adapt test-largefiles-wireproto.t to python3
Sun, 09 Dec 2018 13:53:08 -0500 py3: byteify test-push-race.t
Matt Harbison <matt_harbison@yahoo.com> [Sun, 09 Dec 2018 13:53:08 -0500] rev 40888
py3: byteify test-push-race.t
Sun, 09 Dec 2018 13:33:36 -0500 py3: convert filename to bytes in test-hardlinks.t
Matt Harbison <matt_harbison@yahoo.com> [Sun, 09 Dec 2018 13:33:36 -0500] rev 40887
py3: convert filename to bytes in test-hardlinks.t Windows was complaining about passing str to CreateFileA() in win32.py.
Sat, 08 Dec 2018 23:41:54 -0800 narrow: keep bookmarks temporarily stripped for as long as commits are
Martin von Zweigbergk <martinvonz@google.com> [Sat, 08 Dec 2018 23:41:54 -0800] rev 40886
narrow: keep bookmarks temporarily stripped for as long as commits are The narrow extension also has support for shallowness and for inserting older commits on pull. It works by temporarily stripping newer commits, adding the older commits, then re-applying the stripped bundle. The regular Mercurial server uses that when you widen, although it shouldn't be necessary there. Our Google-internal server does it when the user requests an older commit. Our Google-internal tests fail since 7caf632e30c3 (filecache: unimplement __set__() and __delete__() (API), 2018-10-20). I haven't quite understood the problem, but it's related to the way we temporarily hide bookmarks while the commits they point to are stripped. When a transaction is started, Mercurial tries to read various things from the repo for the transaction summary. That leads to computation of hidden commits, which leads to an attempt to find commits pinned by bookmarks. This is the reason we temporarily hide the bookmarks. I think the aforementioned commit makes the restored bookmarks visible earlier than before (which seems like an improvement), so we can no longer incorrectly rely on the repo._bookmarks field being cached too long (IIUC). This patch makes it so we restore the temporarily hidden bookmarks only after the temporary bundle has been re-applied. It also adapts the code to update the repo.__bookmarks field using the pattern described in the aforementioned commit instead of writing directly to the fiels. I have spent many hours trying to understand what was going on here, but I still don't know if this can also happen without our custom server. So this patch unfortunately does not add any tests; I have only been able to test the fix using our Google-internal tests. Differential Revision: https://phab.mercurial-scm.org/D5398
Sat, 08 Dec 2018 23:04:11 -0800 narrow: drop obsolete support for old Mercurial
Martin von Zweigbergk <martinvonz@google.com> [Sat, 08 Dec 2018 23:04:11 -0800] rev 40885
narrow: drop obsolete support for old Mercurial Not needed since narrow is shipped with core. Differential Revision: https://phab.mercurial-scm.org/D5397
Thu, 06 Dec 2018 10:15:41 -0800 tests: test that narrow preserves bookmarks on widen
Martin von Zweigbergk <martinvonz@google.com> [Thu, 06 Dec 2018 10:15:41 -0800] rev 40884
tests: test that narrow preserves bookmarks on widen When widening inserts older commits in the changelog, we have to preserve bookmarks so they are not removed by the call to repair.strip() we temporarily do. We didn't have any tests for that before. Differential Revision: https://phab.mercurial-scm.org/D5396
Fri, 07 Dec 2018 14:23:17 -0800 rebase: clarify that commits that become empty are skipped
Martin von Zweigbergk <martinvonz@google.com> [Fri, 07 Dec 2018 14:23:17 -0800] rev 40883
rebase: clarify that commits that become empty are skipped Our message just said that it created no changes, but we didn't explicitly say that that meant that the the commit was not rebased. It also wasn't clear why it created no changes, so this patch also clarifies that that was because the changes were already in the destination. Differential Revision: https://phab.mercurial-scm.org/D5395
Fri, 07 Dec 2018 14:17:09 -0800 rebase: format commit in usual way when explaining that it became empty
Martin von Zweigbergk <martinvonz@google.com> [Fri, 07 Dec 2018 14:17:09 -0800] rev 40882
rebase: format commit in usual way when explaining that it became empty We use the _ctxdesc() for other similar messages, so it seems we should use it here too. Differential Revision: https://phab.mercurial-scm.org/D5394
Mon, 29 Oct 2018 21:50:53 +0900 rust: propagate error of index_get_parents() properly
Yuya Nishihara <yuya@tcha.org> [Mon, 29 Oct 2018 21:50:53 +0900] rev 40881
rust: propagate error of index_get_parents() properly Before, rustla_contains() would return 0 on error, and the exception would be cleared or noticed somewhere else. We need to propagate the error from AncestorsIterator up to the FFI surface.
Sun, 02 Dec 2018 22:20:38 +0900 rust: look up HgRevlogIndex_GetParents() from symbol table
Yuya Nishihara <yuya@tcha.org> [Sun, 02 Dec 2018 22:20:38 +0900] rev 40880
rust: look up HgRevlogIndex_GetParents() from symbol table And removes the unused index_get_parents_checked() function. I expect the Index struct will be turned into a pyobject type, though I haven't written any PoC-level patches yet.
Sun, 02 Dec 2018 22:10:37 +0900 revlog: add public CPython function to get parent revisions
Yuya Nishihara <yuya@tcha.org> [Sun, 02 Dec 2018 22:10:37 +0900] rev 40879
revlog: add public CPython function to get parent revisions Since this is a public function, it validates the input revision, and supports nullrev. index_get_parents_checked() will be replaced by this function.
Sun, 02 Dec 2018 21:41:24 +0900 revlog: rename indexType to HgRevlogIndex_Type as it's a global symbol
Yuya Nishihara <yuya@tcha.org> [Sun, 02 Dec 2018 21:41:24 +0900] rev 40878
revlog: rename indexType to HgRevlogIndex_Type as it's a global symbol It follows the CPython naming convention, but uses Hg instead of Py.
Sun, 02 Dec 2018 21:37:42 +0900 revlog: export symbol of indexType
Yuya Nishihara <yuya@tcha.org> [Sun, 02 Dec 2018 21:37:42 +0900] rev 40877
revlog: export symbol of indexType The idea is to wrap the index object with rust-cpython. I haven't tried it, but it should be doable. We'll probably need a better interface than raw function pointers to do more in Rust.
Sun, 02 Dec 2018 21:33:43 +0900 setup: fix path of rust source dependencies
Yuya Nishihara <yuya@tcha.org> [Sun, 02 Dec 2018 21:33:43 +0900] rev 40876
setup: fix path of rust source dependencies Appears that they were screwed up while moving the source files around. Since rust-direct-ffi sources are automatically added to the depends list, we only need to list hg-core sources.
Sun, 04 Mar 2018 08:50:12 -0800 rebase: remove now-unnecessary arguments to _abort()
Martin von Zweigbergk <martinvonz@google.com> [Sun, 04 Mar 2018 08:50:12 -0800] rev 40875
rebase: remove now-unnecessary arguments to _abort() Since _abort() is now an instance method, we don't need to pass state that's available on "self". Differential Revision: https://phab.mercurial-scm.org/D5393
Sun, 04 Mar 2018 08:41:29 -0800 rebase: move abort() onto rebaseruntime
Martin von Zweigbergk <martinvonz@google.com> [Sun, 04 Mar 2018 08:41:29 -0800] rev 40874
rebase: move abort() onto rebaseruntime The function depends on a lot of the state of rebaseruntime, so it makes sense for it to be an instance method. This will let us remove many of the arguments to the method. That will be done in a later patch. Differential Revision: https://phab.mercurial-scm.org/D5392
Wed, 21 Mar 2018 16:46:28 -0700 cleanupnodes: trust caller when "moves" is not None
Martin von Zweigbergk <martinvonz@google.com> [Wed, 21 Mar 2018 16:46:28 -0700] rev 40873
cleanupnodes: trust caller when "moves" is not None If "moves" (indicating how to move bookmarks) is None, we fill it out based on "replacements" (indicating which obsmarkers to add). If "moves" is not None, we would still add items based on "replacements". This makes it impossible to pass "moves={}" and not move bookmarks, which surprised me. The only caller that currently passes a value for "moves" was the rebase extension and there we were already adding bookmark moves corresponding to obsmarker additions, so it should not be impacted. Differential Revision: https://phab.mercurial-scm.org/D5391
Wed, 05 Dec 2018 14:17:15 -0800 shelve: change transaction description from "commit" to "shelve"
Martin von Zweigbergk <martinvonz@google.com> [Wed, 05 Dec 2018 14:17:15 -0800] rev 40872
shelve: change transaction description from "commit" to "shelve" "commit" was probably a copy&paste mistake. Differential Revision: https://phab.mercurial-scm.org/D5390
Wed, 05 Dec 2018 14:08:01 -0800 shelve: drop unnecessary backup of dirstate for phase-based case
Martin von Zweigbergk <martinvonz@google.com> [Wed, 05 Dec 2018 14:08:01 -0800] rev 40871
shelve: drop unnecessary backup of dirstate for phase-based case Regular shelve has a hack using an uncommitted transaction that's then aborted at the end of the operation. It preserves the dirstate across the abort, however, by saving a backup copy of it. Phase-based shelve instead commits the transaction, so the hack shouldn't be necessary there. Differential Revision: https://phab.mercurial-scm.org/D5389
Wed, 05 Dec 2018 14:46:09 -0800 tests: split test-shelve.t in two
Martin von Zweigbergk <martinvonz@google.com> [Wed, 05 Dec 2018 14:46:09 -0800] rev 40870
tests: split test-shelve.t in two test-shelve.t dominated run time for all shelve tests. Before: # Ran 9 tests, 1 skipped, 0 failed. real 0m43.568s user 2m15.822s sys 0m40.857s After: # Ran 11 tests, 1 skipped, 0 failed. real 0m24.574s user 2m21.354s sys 0m40.435s Differential Revision: https://phab.mercurial-scm.org/D5388
Tue, 04 Dec 2018 22:16:13 -0800 remotefilelog: rely on progress helper for keeping track of position
Martin von Zweigbergk <martinvonz@google.com> [Tue, 04 Dec 2018 22:16:13 -0800] rev 40869
remotefilelog: rely on progress helper for keeping track of position The progress helper class keeps track of its current position, so we don't need a "count" variable for that. Differential Revision: https://phab.mercurial-scm.org/D5386
Tue, 04 Dec 2018 22:15:42 -0800 remotefilelog: reduce use of "count" container
Martin von Zweigbergk <martinvonz@google.com> [Tue, 04 Dec 2018 22:15:42 -0800] rev 40868
remotefilelog: reduce use of "count" container We had already given the initial value of "count[0]" a name, so just use that when applicable. Differential Revision: https://phab.mercurial-scm.org/D5385
Tue, 04 Dec 2018 22:12:47 -0800 remotefilelog: replace a "a=[expr]; b=a[0]" by "b=expr; a = [b]"
Martin von Zweigbergk <martinvonz@google.com> [Tue, 04 Dec 2018 22:12:47 -0800] rev 40867
remotefilelog: replace a "a=[expr]; b=a[0]" by "b=expr; a = [b]" Simpler is better. Differential Revision: https://phab.mercurial-scm.org/D5384
Tue, 04 Dec 2018 22:09:33 -0800 remotefilelog: remove an unnecessary update of "count" container
Martin von Zweigbergk <martinvonz@google.com> [Tue, 04 Dec 2018 22:09:33 -0800] rev 40866
remotefilelog: remove an unnecessary update of "count" container The "count" container is never used after this point, so there is no need to update it. Differential Revision: https://phab.mercurial-scm.org/D5383
Tue, 04 Dec 2018 21:58:46 -0800 remotefilelog: avoid temporarily using "count" variable as synonym for "total"
Martin von Zweigbergk <martinvonz@google.com> [Tue, 04 Dec 2018 21:58:46 -0800] rev 40865
remotefilelog: avoid temporarily using "count" variable as synonym for "total" The "count" variable is generally used for updating progress, but early in fileserverclient.request(), its used to mean the total count. We already have another "total" variable for that, so it seems much clearer to use that. Differential Revision: https://phab.mercurial-scm.org/D5382
Wed, 05 Dec 2018 09:30:01 -0800 remotefilelog: use progress helper in fileserverclient
Martin von Zweigbergk <martinvonz@google.com> [Wed, 05 Dec 2018 09:30:01 -0800] rev 40864
remotefilelog: use progress helper in fileserverclient Differential Revision: https://phab.mercurial-scm.org/D5381
Tue, 04 Dec 2018 16:32:59 -0800 remotefilelog: use progress helper in shallowrepo
Martin von Zweigbergk <martinvonz@google.com> [Tue, 04 Dec 2018 16:32:59 -0800] rev 40863
remotefilelog: use progress helper in shallowrepo Differential Revision: https://phab.mercurial-scm.org/D5380
Tue, 04 Dec 2018 16:31:04 -0800 remotefilelog: use progress helper in shallowbundle
Martin von Zweigbergk <martinvonz@google.com> [Tue, 04 Dec 2018 16:31:04 -0800] rev 40862
remotefilelog: use progress helper in shallowbundle Differential Revision: https://phab.mercurial-scm.org/D5379
Tue, 04 Dec 2018 16:29:05 -0800 remotefilelog: use progress helper in repack
Martin von Zweigbergk <martinvonz@google.com> [Tue, 04 Dec 2018 16:29:05 -0800] rev 40861
remotefilelog: use progress helper in repack Differential Revision: https://phab.mercurial-scm.org/D5378
Tue, 04 Dec 2018 16:23:00 -0800 remotefilelog: use progress helper in remotefilelogserver
Martin von Zweigbergk <martinvonz@google.com> [Tue, 04 Dec 2018 16:23:00 -0800] rev 40860
remotefilelog: use progress helper in remotefilelogserver Differential Revision: https://phab.mercurial-scm.org/D5377
Tue, 04 Dec 2018 16:09:20 -0800 remotefilelog: use progress helper in basestore
Martin von Zweigbergk <martinvonz@google.com> [Tue, 04 Dec 2018 16:09:20 -0800] rev 40859
remotefilelog: use progress helper in basestore Differential Revision: https://phab.mercurial-scm.org/D5376
Tue, 04 Dec 2018 16:02:56 -0800 remotefilelog: use progress helper when analyzing repos
Martin von Zweigbergk <martinvonz@google.com> [Tue, 04 Dec 2018 16:02:56 -0800] rev 40858
remotefilelog: use progress helper when analyzing repos Differential Revision: https://phab.mercurial-scm.org/D5375
Tue, 04 Dec 2018 15:59:47 -0800 fastannotate: use progress helper
Martin von Zweigbergk <martinvonz@google.com> [Tue, 04 Dec 2018 15:59:47 -0800] rev 40857
fastannotate: use progress helper Differential Revision: https://phab.mercurial-scm.org/D5374
Tue, 04 Dec 2018 15:57:11 -0800 debugbuildannotatecache: use progress helper
Martin von Zweigbergk <martinvonz@google.com> [Tue, 04 Dec 2018 15:57:11 -0800] rev 40856
debugbuildannotatecache: use progress helper Differential Revision: https://phab.mercurial-scm.org/D5373
Fri, 13 Jul 2018 11:45:15 +0200 upgrade: clarify "aggressivemergedelta" handling
Boris Feld <boris.feld@octobus.net> [Fri, 13 Jul 2018 11:45:15 +0200] rev 40855
upgrade: clarify "aggressivemergedelta" handling We rename "aggressivemergedelta" argument to "forceaggressivemergedelta". The previous argument naming could infer an absolute control on the behavior. However, the code show we respect the config option if set.
Fri, 13 Jul 2018 02:54:52 +0200 upgrade: test that fncache is valid after repository upgrade
Boris Feld <boris.feld@octobus.net> [Fri, 13 Jul 2018 02:54:52 +0200] rev 40854
upgrade: test that fncache is valid after repository upgrade The behavior was correct. Now it is correct and tested.
Wed, 05 Dec 2018 12:25:41 -0500 tests: update `rm` invocation for new location of checklink
Augie Fackler <augie@google.com> [Wed, 05 Dec 2018 12:25:41 -0500] rev 40853
tests: update `rm` invocation for new location of checklink This should fix the test on FreeBSD. Differential Revision: https://phab.mercurial-scm.org/D5387
Mon, 03 Dec 2018 14:17:38 -0500 bookflow: new extension for bookmark-based branching
idlsoft <idlsoft@gmail.com> [Mon, 03 Dec 2018 14:17:38 -0500] rev 40852
bookflow: new extension for bookmark-based branching This extension should be helpful for feature branches - based workflows. At my company we first considered branches, but weren't sure about creating a lot of permanent objects. We tried bookmarks, but found some scenarios to be difficult to control. The main problem, was the active bookmark being moved on update. Disabling that made everything a lot more predictable. Bookmarks move on commit, and updating means switching between them. The extension also implements a few minor features to better guide the workflow: - hg bookmark NAME can be ambiguous (create or move), unlike hg branch. The extension requires -rev to move. - require an active bookmark on commit. - some bookmarks can be protected (like @), useful for teams, that require code reviews. - block creation of new branches. The initial implementation requires no changes in the core, but it does rely on some implementation details. I thought it may be useful to discuss the functionality first, and then focus making the code more robust. Differential Revision: https://phab.mercurial-scm.org/D4312
Tue, 04 Dec 2018 17:03:43 +0000 rust: make clean takes care of rust/target
Georges Racinet <gracinet@anybox.fr> [Tue, 04 Dec 2018 17:03:43 +0000] rev 40851
rust: make clean takes care of rust/target This isn't the prettiest way of doing it, but it doesn't require looking up cargo, or wondering whether that should be part of setup.py clean. Differential Revision: https://phab.mercurial-scm.org/D5369
Tue, 04 Dec 2018 14:01:13 +0000 rust: rename local variables in AncestorsIterator::next
Georges Racinet <georges@racinet.fr> [Tue, 04 Dec 2018 14:01:13 +0000] rev 40850
rust: rename local variables in AncestorsIterator::next It was confusing to have p1 and parents.1 ; (p1, p2) is clearer. Differential Revision: https://phab.mercurial-scm.org/D5365
Tue, 04 Dec 2018 17:34:10 -0500 tests: stabilize test-inherit-mode.t on FreeBSD and macOS again
Augie Fackler <augie@google.com> [Tue, 04 Dec 2018 17:34:10 -0500] rev 40849
tests: stabilize test-inherit-mode.t on FreeBSD and macOS again This is the same fix as 90e26ef4cbb1, just repeated on the new file location. Differential Revision: https://phab.mercurial-scm.org/D5371
Tue, 04 Dec 2018 08:50:33 -0800 tests: drop redundant "#if execbit" from test-rebase-inmemory.t
Martin von Zweigbergk <martinvonz@google.com> [Tue, 04 Dec 2018 08:50:33 -0800] rev 40848
tests: drop redundant "#if execbit" from test-rebase-inmemory.t The whole file is already guarded by "#require execbit". Differential Revision: https://phab.mercurial-scm.org/D5366
Mon, 03 Dec 2018 16:56:09 -0800 narrow: don't resurrect old commits when narrowing (don't strip obsmarkers)
Martin von Zweigbergk <martinvonz@google.com> [Mon, 03 Dec 2018 16:56:09 -0800] rev 40847
narrow: don't resurrect old commits when narrowing (don't strip obsmarkers) If you have an old obsolescence-chain of commits that has been pruned and you narrow your repo so that some of those commits get stripped (because they affected the removed paths), then we would currently resurrect the commit that came before (along the obsmarker chain) the last stripped commit. That happens by the usual rules for obsmarker-stripping. However, it's quite surprising when it happens when you narrow your repo. This patch makes narrowing not strip obsmarkers. Differential Revision: https://phab.mercurial-scm.org/D5364
Sun, 18 Nov 2018 19:55:53 +0900 commandserver: turn server debug messages into logs
Yuya Nishihara <yuya@tcha.org> [Sun, 18 Nov 2018 19:55:53 +0900] rev 40846
commandserver: turn server debug messages into logs They were ui.debug() just because commandserver.log() was noop if no client connected.
Sun, 18 Nov 2018 19:47:04 +0900 commandserver: add config knob for various logging options
Yuya Nishihara <yuya@tcha.org> [Sun, 18 Nov 2018 19:47:04 +0900] rev 40845
commandserver: add config knob for various logging options The default rotating options are copied from the blackbox extension.
Sat, 10 Nov 2018 19:27:47 +0900 commandserver: expand log path for convenience
Yuya Nishihara <yuya@tcha.org> [Sat, 10 Nov 2018 19:27:47 +0900] rev 40844
commandserver: expand log path for convenience This allows us to set the log path relative to $XDG_RUNTIME_DIR, for instance. [cmdserver] log = $XDG_RUNTIME_DIR/chg/server.log
Sat, 10 Nov 2018 19:09:37 +0900 commandserver: switch logging facility to ui.log() interface
Yuya Nishihara <yuya@tcha.org> [Sat, 10 Nov 2018 19:09:37 +0900] rev 40843
commandserver: switch logging facility to ui.log() interface The "pager subcommand" message is removed since ui isn't accessible there. I think that's okay as cmdtable[cmd]() will call attachio() and some debug message will be printed.
Sat, 10 Nov 2018 19:00:17 +0900 commandserver: install logger to record server events through canonical API
Yuya Nishihara <yuya@tcha.org> [Sat, 10 Nov 2018 19:00:17 +0900] rev 40842
commandserver: install logger to record server events through canonical API The global commandserver.log() will be replaced with this.
Sat, 10 Nov 2018 18:19:34 +0900 commandserver: enable logging when server process started
Yuya Nishihara <yuya@tcha.org> [Sat, 10 Nov 2018 18:19:34 +0900] rev 40841
commandserver: enable logging when server process started This allows us to keep track of server events before client connects to the server. Tests will be added later. Currently there's no log() call to check if things are working well.
Sat, 10 Nov 2018 18:16:33 +0900 test-commandserver: change way of triggering early crash
Yuya Nishihara <yuya@tcha.org> [Sat, 10 Nov 2018 18:16:33 +0900] rev 40840
test-commandserver: change way of triggering early crash Future patches will move the logging facility out of the server class, so cmdserver.log can't be (ab)used for this purpose. Instead, let's hook the factory function to raise exception.
Sun, 18 Nov 2018 18:58:06 +0900 loggingutil: add basic logger backends
Yuya Nishihara <yuya@tcha.org> [Sun, 18 Nov 2018 18:58:06 +0900] rev 40839
loggingutil: add basic logger backends These classes will be used in command server. They are similar to the blackboxlogger, but it can't be factored out since the blackbox is so tightly coupled with a repo object.
Tue, 04 Dec 2018 17:13:01 -0500 merge with stable
Augie Fackler <augie@google.com> [Tue, 04 Dec 2018 17:13:01 -0500] rev 40838
merge with stable
Thu, 29 Nov 2018 09:13:13 +0000 rust: peek_mut optim for lazy ancestors
Georges Racinet <gracinet@anybox.fr> [Thu, 29 Nov 2018 09:13:13 +0000] rev 40837
rust: peek_mut optim for lazy ancestors This is one of the two optimizations that are also present in the Python code: replacing pairs of pop/push on the BinaryHeap by single updates, hence having it under the hood maintain its consistency (sift) only once. On Mozilla central, the measured gain (see details below) is around 7%. Creating the PeekMut object by calling peek_mut() right away instead of peek() first is less efficient (gain is only 4%, stats not included). Our interpretation is that its creation has a cost which is vasted in the cases where it ends by droping the value (Peekmut::pop() just does self.heap.pop() anyway). On the other hand, the immutable peek() is very fast: it's just taking a reference in the underlying vector. The Python version still has another optimization: if parent(current) == current-1, then the heap doesn't need to maintain its consistency, since we already know that it's bigger than all the others in the heap. Rust's BinaryHeap doesn't allow us to mutate its biggest element with no housekeeping, but we tried it anyway, with a copy of the BinaryHeap implementation with a dedicaded added method: it's not worth the technical debt in our opinion (we measured only a further 1.6% improvement). One possible explanation would be that the sift is really fast anyway in that case, whereas it's not in the case of Python, because it's at least partly done in slow Python code. Still it's possible that replacing BinaryHeap by something more dedicated to discrete ordered types could be faster. Measurements on mozilla-central: Three runs of 'hg perfancestors' on the parent changeset: Moyenne des médianes: 0.100587 ! wall 0.100062 comb 0.100000 user 0.100000 sys 0.000000 (best of 98) ! wall 0.135804 comb 0.130000 user 0.130000 sys 0.000000 (max of 98) ! wall 0.102864 comb 0.102755 user 0.099286 sys 0.003469 (avg of 98) ! wall 0.101486 comb 0.110000 user 0.110000 sys 0.000000 (median of 98) ! wall 0.096804 comb 0.090000 user 0.090000 sys 0.000000 (best of 100) ! wall 0.132235 comb 0.130000 user 0.120000 sys 0.010000 (max of 100) ! wall 0.100258 comb 0.100300 user 0.096000 sys 0.004300 (avg of 100) ! wall 0.098384 comb 0.100000 user 0.100000 sys 0.000000 (median of 100) ! wall 0.099925 comb 0.100000 user 0.100000 sys 0.000000 (best of 98) ! wall 0.133518 comb 0.140000 user 0.130000 sys 0.010000 (max of 98) ! wall 0.102381 comb 0.102449 user 0.098265 sys 0.004184 (avg of 98) ! wall 0.101891 comb 0.090000 user 0.090000 sys 0.000000 (median of 98) Mean of the medians: 0.100587 On the present changeset: ! wall 0.091344 comb 0.090000 user 0.090000 sys 0.000000 (best of 100) ! wall 0.122728 comb 0.120000 user 0.110000 sys 0.010000 (max of 100) ! wall 0.093268 comb 0.093300 user 0.089300 sys 0.004000 (avg of 100) ! wall 0.092567 comb 0.100000 user 0.090000 sys 0.010000 (median of 100) ! wall 0.093294 comb 0.080000 user 0.080000 sys 0.000000 (best of 100) ! wall 0.144887 comb 0.150000 user 0.140000 sys 0.010000 (max of 100) ! wall 0.097708 comb 0.097700 user 0.093400 sys 0.004300 (avg of 100) ! wall 0.094980 comb 0.100000 user 0.090000 sys 0.010000 (median of 100) ! wall 0.091262 comb 0.090000 user 0.080000 sys 0.010000 (best of 100) ! wall 0.123772 comb 0.130000 user 0.120000 sys 0.010000 (max of 100) ! wall 0.093188 comb 0.093200 user 0.089300 sys 0.003900 (avg of 100) ! wall 0.092364 comb 0.100000 user 0.090000 sys 0.010000 (median of 100) Mean of the medians is 0.0933 Differential Revision: https://phab.mercurial-scm.org/D5358
Mon, 03 Dec 2018 18:07:09 -0500 fuzz: grep away HAVE_GETC_UNLOCKED in pyconfig.h to avoid msan badness
Augie Fackler <augie@google.com> [Mon, 03 Dec 2018 18:07:09 -0500] rev 40836
fuzz: grep away HAVE_GETC_UNLOCKED in pyconfig.h to avoid msan badness Per discussion with Greg Smith and the patches on https://bugs.python.org/issue35214. This, combined with the previous patch, fixes msan builds on oss-fuzz. Differential Revision: https://phab.mercurial-scm.org/D5363
Tue, 13 Nov 2018 09:19:05 -0500 fuzz: more correctly specify CFLAGS and LDFLAGS when building Python
Augie Fackler <augie@google.com> [Tue, 13 Nov 2018 09:19:05 -0500] rev 40835
fuzz: more correctly specify CFLAGS and LDFLAGS when building Python Gets us closer to a working msan build alongside our asan build. Differential Revision: https://phab.mercurial-scm.org/D5362
Tue, 04 Dec 2018 00:19:33 -0500 tests: stabilize test-blackbox.t on Windows
Matt Harbison <matt_harbison@yahoo.com> [Tue, 04 Dec 2018 00:19:33 -0500] rev 40834
tests: stabilize test-blackbox.t on Windows I didn't look into why the error is more detailed, but that seems like it's a good thing (other than for recording tests).
Tue, 04 Dec 2018 00:16:12 -0500 tests: stabilize for recent wcache changes
Matt Harbison <matt_harbison@yahoo.com> [Tue, 04 Dec 2018 00:16:12 -0500] rev 40833
tests: stabilize for recent wcache changes This goes with 47e3f554df35::d5622dfe4ba3. I'm not sure if it was really expected that there would be no wcache directory if neither execbit nor symlink is supported.
Mon, 03 Dec 2018 12:48:42 -0500 extdiff: avoid double backslashes in the displayed tool path on Windows
Matt Harbison <matt_harbison@yahoo.com> [Mon, 03 Dec 2018 12:48:42 -0500] rev 40832
extdiff: avoid double backslashes in the displayed tool path on Windows This shows the tool path in the help, and changed in 67b180c0e263. uirepr() already does the same thing, but that undoes the mangling in its call to repr().
Wed, 28 Nov 2018 05:06:58 +0100 contrib: add a helper script that help to build interesting repositories
Boris Feld <boris.feld@octobus.net> [Wed, 28 Nov 2018 05:06:58 +0100] rev 40831
contrib: add a helper script that help to build interesting repositories The script is dedicated to building a couple of repositories that should be interesting to run discovery from one another. It seems a common enough need to contribute it upstream.
Mon, 03 Dec 2018 19:42:46 +0300 py3: listify filter() to call len() on it
Pulkit Goyal <pulkit@yandex-team.ru> [Mon, 03 Dec 2018 19:42:46 +0300] rev 40830
py3: listify filter() to call len() on it Differential Revision: https://phab.mercurial-scm.org/D5354
Sun, 18 Nov 2018 18:35:31 +0900 loggingutil: document openlogfile()
Yuya Nishihara <yuya@tcha.org> [Sun, 18 Nov 2018 18:35:31 +0900] rev 40829
loggingutil: document openlogfile() This function will be used later for command-server logging.
Sun, 18 Nov 2018 18:25:37 +0900 loggingutil: extract openlogfile() and proxylogger to new module
Yuya Nishihara <yuya@tcha.org> [Sun, 18 Nov 2018 18:25:37 +0900] rev 40828
loggingutil: extract openlogfile() and proxylogger to new module This module isn't placed under the "utils" package since it needs "ui" to process things. It's called "loggingutil", not "logutil" because the word "log" is too obscure in our codebase.
Sun, 18 Nov 2018 18:21:39 +0900 blackbox: pass in options to _openlogfile() as arguments
Yuya Nishihara <yuya@tcha.org> [Sun, 18 Nov 2018 18:21:39 +0900] rev 40827
blackbox: pass in options to _openlogfile() as arguments This prepares for extracting utility function from the blackbox module.
Sat, 17 Nov 2018 22:10:27 +0900 blackbox: just try writing to repo.vfs and update lastlogger on success
Yuya Nishihara <yuya@tcha.org> [Sat, 17 Nov 2018 22:10:27 +0900] rev 40826
blackbox: just try writing to repo.vfs and update lastlogger on success This is simpler and more robust. Before, an empty ".hg" directory would be created if it's removed after checking vfs.isdir('.').
Tue, 20 Nov 2018 22:31:12 +0900 vfs: add option to not create parent directories implicitly
Yuya Nishihara <yuya@tcha.org> [Tue, 20 Nov 2018 22:31:12 +0900] rev 40825
vfs: add option to not create parent directories implicitly In blackbox, we don't want to create a ".hg" directory by mistake. This provides a race-safe option to achieve that.
Thu, 15 Nov 2018 02:55:33 +0100 repo: add a `wcachevfs` to access the `.hg/wcache/` directory
Boris Feld <boris.feld@octobus.net> [Thu, 15 Nov 2018 02:55:33 +0100] rev 40824
repo: add a `wcachevfs` to access the `.hg/wcache/` directory This wvfs will allow us to migrate various cache to the new `wcache` directory. Helping with cache issues with "share".
Thu, 15 Nov 2018 02:46:31 +0100 cache: create `wcache` directory at init time
Boris Feld <boris.feld@octobus.net> [Thu, 15 Nov 2018 02:46:31 +0100] rev 40823
cache: create `wcache` directory at init time The cache directory will be needed very quickly, so it seems simpler to create it early to make sure it has the same owner and permission than the other directory in the repository.
Thu, 15 Nov 2018 02:38:55 +0100 cache: create `cache` directory at init time
Boris Feld <boris.feld@octobus.net> [Thu, 15 Nov 2018 02:38:55 +0100] rev 40822
cache: create `cache` directory at init time The cache directory will be needed very quickly, so it seems simpler to create it early to make sure it has the same owner and permission than the other directory in the repository.
Thu, 15 Nov 2018 17:08:23 +0100 check-exec: write file in 'wcache' instead of 'cache'
Boris Feld <boris.feld@octobus.net> [Thu, 15 Nov 2018 17:08:23 +0100] rev 40821
check-exec: write file in 'wcache' instead of 'cache' Some cache are relevant or affected by the working copy used. So the `.hg/cache` directory is not the best place for them because multiple shared repository can end up fighting over them. To address this issue, we introduce a new 'wcache' directory to host this kind of cache. The first user are the `checkisexec` type file. These files describe property of the working copy and fit the use-case well.
Fri, 23 Nov 2018 06:09:44 +0100 mmapindex: set default to 1MB
Boris Feld <boris.feld@octobus.net> [Fri, 23 Nov 2018 06:09:44 +0100] rev 40820
mmapindex: set default to 1MB mmapping index is more efficient if we only need a small part of it. The 1MB value has been picked arbitrarily, a lower value might be better. On a large repository with a 60MB index, we see the following performance gain: hg perfindex before: ! wall 0.032023 comb 0.040000 user 0.000000 sys 0.040000 (best of 100) after: ! wall 0.000196 comb 0.000000 user 0.000000 sys 0.000000 (best of 1060) The speed boost benefit all cases, including the one where the full index needs to be parsed. hg perfindex --rev 0 before: ! wall 0.040673 comb 0.030000 user 0.000000 sys 0.030000 (best of 100) after ! wall 0.010713 comb 0.020000 user 0.010000 sys 0.010000 (best of 212) This gain reflect in higher level operation: hg perfbookmarks --clear-revlogs before: ! wall 0.161339 comb 0.160000 user 0.130000 sys 0.030000 (best of 56) after: ! wall 0.123228 comb 0.120000 user 0.120000 sys 0.000000 (best of 68)
Fri, 23 Nov 2018 06:07:33 +0100 mmapindex: move the 'mmapindexthreshold' option out of experimental
Boris Feld <boris.feld@octobus.net> [Fri, 23 Nov 2018 06:07:33 +0100] rev 40819
mmapindex: move the 'mmapindexthreshold' option out of experimental The option is useful and should be advertised more. We move it out of experimental as a first step. The `storage` section is selected as this is related to how the storage is accessed. A new 'performance' section might be more appropriate. We move from 'mmapindexthreshold` to `mmap-threshold` as non-index item are also suitable for mmap (eg: the rev-branch-cache). If relevant, we can introduce sub-option `mmap-threshold.revlog-index` later.
Sat, 01 Dec 2018 15:57:27 +0100 perf: add a --rev attribute to perfindex
Boris Feld <boris.feld@octobus.net> [Sat, 01 Dec 2018 15:57:27 +0100] rev 40818
perf: add a --rev attribute to perfindex This allow for benchmarking the time necessary to look for other version than the tip.
Fri, 23 Nov 2018 06:03:38 +0100 perf: update perfindex to be more realistic
Boris Feld <boris.feld@octobus.net> [Fri, 23 Nov 2018 06:03:38 +0100] rev 40817
perf: update perfindex to be more realistic The previous code was creating a revlog manually, we now use the actual `localrepo` method to create it. We have to jump though extra hops to work around the impact of filecache.
Sun, 02 Dec 2018 13:09:46 -0800 match: drop unnecessary wrapping of regex in group
Martin von Zweigbergk <martinvonz@google.com> [Sun, 02 Dec 2018 13:09:46 -0800] rev 40816
match: drop unnecessary wrapping of regex in group It seems the regexes have been wrapped in an unnamed group since b6c42714d900 (Add locate command., 2005-07-05). In that commit, the grouping was needed because there was a "head" ('^') added before the group and a "tail" (os.sep) added after it. It seems the head was moved inside the group in 1c0c413cccdd (Get add and locate to use new repo and dirstate walk code., 2005-07-18) and the tail was moved inside the group in 89985a1b3427 (Clean up walk and changes code to use normalised names properly., 2005-07-31), So it seems to me that we've carried around the unnecessary group for 13 years. This patch removes it. Differential Revision: https://phab.mercurial-scm.org/D5352
Sun, 02 Dec 2018 13:45:20 -0800 match: use _BASE_SIZE instead of magic value 4
Martin von Zweigbergk <martinvonz@google.com> [Sun, 02 Dec 2018 13:45:20 -0800] rev 40815
match: use _BASE_SIZE instead of magic value 4 Differential Revision: https://phab.mercurial-scm.org/D5351
Sun, 02 Dec 2018 13:44:49 -0800 match: make "groupsize" include the trailing "|"
Martin von Zweigbergk <martinvonz@google.com> [Sun, 02 Dec 2018 13:44:49 -0800] rev 40814
match: make "groupsize" include the trailing "|" I think this is a little easier to follow and it will simplify later patches too. Differential Revision: https://phab.mercurial-scm.org/D5350
Sun, 02 Dec 2018 13:09:43 -0800 match: fix an unaligned (but harmless) indent
Martin von Zweigbergk <martinvonz@google.com> [Sun, 02 Dec 2018 13:09:43 -0800] rev 40813
match: fix an unaligned (but harmless) indent Differential Revision: https://phab.mercurial-scm.org/D5349
Thu, 22 Nov 2018 17:41:10 +0100 match: raise an Abort error instead of OverflowError
Boris Feld <boris.feld@octobus.net> [Thu, 22 Nov 2018 17:41:10 +0100] rev 40812
match: raise an Abort error instead of OverflowError This case of OverflowError (one single pattern being too large) has never been properly caught in the past.
Thu, 22 Nov 2018 21:02:02 +0100 match: avoid translating glob to matcher multiple times for large sets
Boris Feld <boris.feld@octobus.net> [Thu, 22 Nov 2018 21:02:02 +0100] rev 40811
match: avoid translating glob to matcher multiple times for large sets For hgignore with many globs, the resulting regexp might not fit under the 20K length limit. So the patterns need to be broken up in smaller pieces. Before this change, the logic was re-starting the full process from scratch for each smaller pieces, including the translation of globs into regexp. Effectively doing the work over and over. If the 20K limit is reached, we are likely in a case where there is many such glob, so exporting them is especially expensive and we should be careful not to do that work more than once. To work around this, we now translate glob to regexp once and for all. Then, we assemble the resulting individual regexp into valid blocks. This raises a very significant performance win for large `.hgignore file`: Before: ! wall 0.153153 comb 0.150000 user 0.150000 sys 0.000000 (median of 66) After: ! wall 0.059793 comb 0.060000 user 0.060000 sys 0.000000 (median of 100)
Thu, 22 Nov 2018 17:25:49 +0100 match: extract function that group regexps
Boris Feld <boris.feld@octobus.net> [Thu, 22 Nov 2018 17:25:49 +0100] rev 40810
match: extract function that group regexps
Thu, 22 Nov 2018 17:16:05 +0100 match: test for overflow error in pattern
Boris Feld <boris.feld@octobus.net> [Thu, 22 Nov 2018 17:16:05 +0100] rev 40809
match: test for overflow error in pattern If a single pattern is too large to handle, we raise an exception. This case is now doctested.
Thu, 22 Nov 2018 17:20:32 +0100 match: extract a literal constant into a symbolic one
Boris Feld <boris.feld@octobus.net> [Thu, 22 Nov 2018 17:20:32 +0100] rev 40808
match: extract a literal constant into a symbolic one
Sat, 01 Dec 2018 21:42:48 -0500 tests: apply binary mode to output in seq.py
Matt Harbison <matt_harbison@yahoo.com> [Sat, 01 Dec 2018 21:42:48 -0500] rev 40807
tests: apply binary mode to output in seq.py I noticed this when playing with running tests using WSL, and iterating over the output yielded '0\r', '1\r',... Most of the other *.py tools do this, and `seq` on MSYS lacks '\r' in the output, so this is more consistent.
Fri, 23 Nov 2018 01:09:37 +0100 perf: add a `--clear-caches` to `perfbranchmapupdate`
Boris Feld <boris.feld@octobus.net> [Fri, 23 Nov 2018 01:09:37 +0100] rev 40806
perf: add a `--clear-caches` to `perfbranchmapupdate` This flag will help to measure the time we spend loading various cache that support the branchmap update. Example for an 500 000 revisions repository: hg perfbranchmapupdate --base 'not tip' --target 'tip' ! wall 0.000860 comb 0.000000 user 0.000000 sys 0.000000 (best of 336) hg perfbranchmapupdate --base 'not tip' --target 'tip' --clear-caches ! wall 0.029494 comb 0.030000 user 0.030000 sys 0.000000 (best of 100)
Wed, 21 Nov 2018 21:11:47 +0000 perf: start from an existing branchmap if possible
Boris Feld <boris.feld@octobus.net> [Wed, 21 Nov 2018 21:11:47 +0000] rev 40805
perf: start from an existing branchmap if possible If the --base set if a superset of one of the cached branchmap, we should use as a starting point. This greatly help the overall runtime of `hg perfbranchmapupdate` For example, for a repository with about 500 000 revisions, using this trick make the command runtime move from about 200 second to about 10 seconds. A 20x gain.
Wed, 21 Nov 2018 20:35:22 +0000 perf: rely on repoview for perfbranchmapupdate
Boris Feld <boris.feld@octobus.net> [Wed, 21 Nov 2018 20:35:22 +0000] rev 40804
perf: rely on repoview for perfbranchmapupdate Using 'repoview' matching the base and target subset make the benchmark more realistic. It also unlocks optimization to make the command initialization faster.
Wed, 21 Nov 2018 22:56:06 +0100 perf: pre-indent some code in `perfbranchmapupdate`
Boris Feld <boris.feld@octobus.net> [Wed, 21 Nov 2018 22:56:06 +0100] rev 40803
perf: pre-indent some code in `perfbranchmapupdate` This make the next patch easier to read.
Wed, 21 Nov 2018 12:02:25 +0000 perf: add a `perfbranchmapupdate` command
Boris Feld <boris.feld@octobus.net> [Wed, 21 Nov 2018 12:02:25 +0000] rev 40802
perf: add a `perfbranchmapupdate` command This command benchmark the time necessary to update the branchmap between two sets of revisions. This changeset introduce a first version, doing nothing fancy regarding cache or other internal details.
Mon, 05 Nov 2018 13:52:19 +0800 push: config option to control behavior when pushing to a publishing server
Anton Shestakov <av6@dwimlabs.net> [Mon, 05 Nov 2018 13:52:19 +0800] rev 40801
push: config option to control behavior when pushing to a publishing server Pushing to a publishing server by mistake can lead to a difficult situation to solve because evolution doesn't work on public changesets. This new experimental config tries to help avoiding unintentionally (or at least being aware of) pushing to publishing remotes. `hg push --publish` can be used to make push succeed even when auto-publish is set to 'abort'.
Fri, 30 Nov 2018 17:42:55 +0300 narrowcommands: remove an unrequired `repo.narrowpats` call
Pulkit Goyal <pulkit@yandex-team.ru> [Fri, 30 Nov 2018 17:42:55 +0300] rev 40800
narrowcommands: remove an unrequired `repo.narrowpats` call We call that few lines above and do nothing significant in between which can change the narrowpats. So let's use values returned by that call. Differential Revision: https://phab.mercurial-scm.org/D5348
Thu, 29 Nov 2018 16:44:01 -0500 manifest: reject lines shorter than 42 bytes, not 22
Augie Fackler <augie@google.com> [Thu, 29 Nov 2018 16:44:01 -0500] rev 40799
manifest: reject lines shorter than 42 bytes, not 22 Yuya correctly spotted during the review of f27f8e9ef1e73 that we're dealing with hexlified hashes here, and so it should be 42 bytes not 22. Differential Revision: https://phab.mercurial-scm.org/D5347
Sun, 11 Nov 2018 20:05:38 +0900 blackbox: initialize logger with repo instance
Yuya Nishihara <yuya@tcha.org> [Sun, 11 Nov 2018 20:05:38 +0900] rev 40798
blackbox: initialize logger with repo instance The blackboxlogger is unusable without a repo. Let's simply initialize it with a repo instance.
Sat, 17 Nov 2018 20:56:25 +0900 blackbox: do not nullify repo to deactivate the logger on failure
Yuya Nishihara <yuya@tcha.org> [Sat, 17 Nov 2018 20:56:25 +0900] rev 40797
blackbox: do not nullify repo to deactivate the logger on failure The _repo will be a mandatory attribute. Instead, make the logger to not track any events.
Sun, 11 Nov 2018 20:02:34 +0900 blackbox: extract global last logger to proxylogger class
Yuya Nishihara <yuya@tcha.org> [Sun, 11 Nov 2018 20:02:34 +0900] rev 40796
blackbox: extract global last logger to proxylogger class So the blackboxlogger can be instantiated with a repo.
Sun, 11 Nov 2018 19:36:21 +0900 ui: pass in bytes opts dict to logger.log()
Yuya Nishihara <yuya@tcha.org> [Sun, 11 Nov 2018 19:36:21 +0900] rev 40795
ui: pass in bytes opts dict to logger.log() This is the convention of the Mercurial API.
Sun, 11 Nov 2018 19:35:33 +0900 ui: pass in formatted message to logger.log()
Yuya Nishihara <yuya@tcha.org> [Sun, 11 Nov 2018 19:35:33 +0900] rev 40794
ui: pass in formatted message to logger.log() This makes sure that all logger instances will handle the message arguments properly.
Sun, 11 Nov 2018 17:34:46 +0900 blackbox: send debug message to logger by core ui
Yuya Nishihara <yuya@tcha.org> [Sun, 11 Nov 2018 17:34:46 +0900] rev 40793
blackbox: send debug message to logger by core ui Since the core ui.log() may recurse into ui.log() through ui.debug(), it must guard against recursion. The ui extension class can finally be removed.
Sat, 17 Nov 2018 20:23:50 +0900 blackbox: change the way of deactivating the logger on write error
Yuya Nishihara <yuya@tcha.org> [Sat, 17 Nov 2018 20:23:50 +0900] rev 40792
blackbox: change the way of deactivating the logger on write error This prepares for the upcoming code move. The recursion guard will be ported to the core ui.
Wed, 28 Nov 2018 10:12:50 -0800 match: remove obsolete catching of OverflowError
Martin von Zweigbergk <martinvonz@google.com> [Wed, 28 Nov 2018 10:12:50 -0800] rev 40791
match: remove obsolete catching of OverflowError Since 0f6a1bdf89fb (match: handle large regexes, 2007-08-19), we catch an OverflowError from the regex engine and split up the regex if that happens. In 59a9dc9562e2 (ignore: split up huge patterns, 2008-02-11), that was extended to raise an OverflowError in our code even if the regex engine doesn't raise it. It's unclear if there was a range of regex sizes where the OverflowError would be raised from the regex engine but that were still below the limit we added in our code. Either way, both limitations were probably removed in Python 2.7.4 when the regex code width was extended from 16bit to 32bit (or Py_UCS4) integer (thanks to Yuya for finding that out). If at least the first limitation was removed, we no longer should be using OverflowError for flow control, so this patch changes that. Differential Revision: https://phab.mercurial-scm.org/D5309
Tue, 27 Nov 2018 02:10:14 +0100 sparse: raise a move verbose index error from the C code
Boris Feld <boris.feld@octobus.net> [Tue, 27 Nov 2018 02:10:14 +0100] rev 40790
sparse: raise a move verbose index error from the C code If we don't like a value we should print it.
Fri, 05 Oct 2018 23:10:56 +0300 narrow: drop the bundle2 capability since we have server capabilities (BC)
Pulkit Goyal <pulkit@yandex-team.ru> [Fri, 05 Oct 2018 23:10:56 +0300] rev 40789
narrow: drop the bundle2 capability since we have server capabilities (BC) This patch drops the narrow bundle2 capabilities since we introduced narrow server capabilities which are more nice and now used everywhere. I am not sure what it can affect, so on safe side I marked this as BC. Also I removed the NARROWCAP constant as that kind of conflicts with the same name constant in wireprototypes.py. Differential Revision: https://phab.mercurial-scm.org/D4892
Sun, 02 Jul 2017 04:06:24 +0200 vfs: extract the audit path logic into a submethod
Boris Feld <boris.feld@octobus.net> [Sun, 02 Jul 2017 04:06:24 +0200] rev 40788
vfs: extract the audit path logic into a submethod This will make it possible to apply it in more cases.
Thu, 22 Nov 2018 20:01:28 +0100 subrepo-git: use an official origvfs when appropriate
Boris Feld <boris.feld@octobus.net> [Thu, 22 Nov 2018 20:01:28 +0100] rev 40787
subrepo-git: use an official origvfs when appropriate The origvfs has the auditor properly set and can move file without issue. The current code is currently working without errors because rename are not audited, yet.
Thu, 22 Nov 2018 19:26:05 +0100 revert: extract origvfs logic in a sub-function
Boris Feld <boris.feld@octobus.net> [Thu, 22 Nov 2018 19:26:05 +0100] rev 40786
revert: extract origvfs logic in a sub-function The subrepo's "revert" logic could benefit from it.
Thu, 22 Nov 2018 18:44:07 +0100 vfs: treat 'undo.' file the same as 'journal.' file
Boris Feld <boris.feld@octobus.net> [Thu, 22 Nov 2018 18:44:07 +0100] rev 40785
vfs: treat 'undo.' file the same as 'journal.' file They are the same kind of file, they are protected by the store lock, but directly lives inside the '.hg' directory. No warnings were ever raised about them because `vfs.rename` is not audited. Something we are trying to change.
Thu, 22 Nov 2018 21:00:13 +0100 perf: add a perfignore command
Boris Feld <boris.feld@octobus.net> [Thu, 22 Nov 2018 21:00:13 +0100] rev 40784
perf: add a perfignore command The command is meant to benchmark operations related to hgignore. Right now the command is benchmarking the loading time of the hgignore rules.
Mon, 26 Nov 2018 15:36:06 +0300 py3: use pycompat.xrange instead of xrange
Pulkit Goyal <pulkit@yandex-team.ru> [Mon, 26 Nov 2018 15:36:06 +0300] rev 40783
py3: use pycompat.xrange instead of xrange xrange does not exists on Python 3. Differential Revision: https://phab.mercurial-scm.org/D5302
Tue, 27 Nov 2018 16:16:13 +0300 store: write fncache only once if there are both adds and removes
Pulkit Goyal <pulkit@yandex-team.ru> [Tue, 27 Nov 2018 16:16:13 +0300] rev 40782
store: write fncache only once if there are both adds and removes Differential Revision: https://phab.mercurial-scm.org/D5307
Tue, 20 Nov 2018 17:44:24 +0000 perf: disable revlogs clearing in `perftags` by default
Boris Feld <boris.feld@octobus.net> [Tue, 20 Nov 2018 17:44:24 +0000] rev 40781
perf: disable revlogs clearing in `perftags` by default This aligns things with what `perfbookmarks` does. I decided to disable the revlogs clearing by default to focus on the core logic by default, ignoring side effects. If we prefer to emphasize the side effect, we can instead keep this on in `perftags` and enable it by default in `perfbookmarks`.
Tue, 20 Nov 2018 10:55:20 +0000 perf: add a `clear-revlogs` flag to `perfbookmarks`
Boris Feld <boris.feld@octobus.net> [Tue, 20 Nov 2018 10:55:20 +0000] rev 40780
perf: add a `clear-revlogs` flag to `perfbookmarks` This flag (off by default) makes it possible to enable the refresh of the changelog and revlog. This is useful to check for costly side effects of bookmark loading. Usually, these side effects are shared with other logics (eg: tags). example output in my mercurial repo (with 1 bookmark, so not a great example): $ hg perfbookmarks ! wall 0.000044 $ hg perfbookmarks --clear-revlogs ! wall 0.001380
Tue, 20 Nov 2018 10:38:15 +0000 tags: cache `repo.changelog` access when checking tags nodes
Boris Feld <boris.feld@octobus.net> [Tue, 20 Nov 2018 10:38:15 +0000] rev 40779
tags: cache `repo.changelog` access when checking tags nodes The tags reading process checks if the nodes referenced in tags exist. Caching the access to `repo.changelog` provides a large speedup for repositories with many tags. running `hg perftags` in a large private repository before: ! wall 0.393464 comb 0.390000 user 0.330000 sys 0.060000 (median of 25) after: ! wall 0.267711 comb 0.270000 user 0.210000 sys 0.060000 (median of 38)
Tue, 20 Nov 2018 10:46:20 +0000 perf: add a `clear-revlogs` flag to `perftags`
Boris Feld <boris.feld@octobus.net> [Tue, 20 Nov 2018 10:46:20 +0000] rev 40778
perf: add a `clear-revlogs` flag to `perftags` This flag (on by default) makes it possible to disable the refresh of the changelog and revlog. This is useful to check for the time spent in the core tags logic without the associated side effects. Usually, these side effects are shared with other logics (eg: bookmarks). Example output in my Mercurial repository $ hg perftags ! wall 0.017919 comb 0.020000 user 0.020000 sys 0.000000 (best of 141) $ hg perftags --no-clear-revlogs ! wall 0.012982 comb 0.010000 user 0.010000 sys 0.000000 (best of 207)
Sun, 25 Nov 2018 13:37:53 +0100 perf: stop creating new revlog by hand in perftags
Boris Feld <boris.feld@octobus.net> [Sun, 25 Nov 2018 13:37:53 +0100] rev 40777
perf: stop creating new revlog by hand in perftags It's better to let the repository logic create its own object. We now just clear the cache. New object will be automatically created from there.
Mon, 26 Nov 2018 00:23:12 +0100 revlog: update the documentation for `trim_endidx`
Boris Feld <boris.feld@octobus.net> [Mon, 26 Nov 2018 00:23:12 +0100] rev 40776
revlog: update the documentation for `trim_endidx` The function role drifted since the function was commented.
Mon, 26 Nov 2018 00:21:09 +0100 revlog: properly detect corrupted revlog in `index_get_length`
Boris Feld <boris.feld@octobus.net> [Mon, 26 Nov 2018 00:21:09 +0100] rev 40775
revlog: properly detect corrupted revlog in `index_get_length` Pointed out by Yuya Nishihara.
Mon, 26 Nov 2018 00:15:12 +0100 perf: rename `perfhelper-tracecopies` to `perfhelper-pathcopies`
Boris Feld <boris.feld@octobus.net> [Mon, 26 Nov 2018 00:15:12 +0100] rev 40774
perf: rename `perfhelper-tracecopies` to `perfhelper-pathcopies` The command it supports is called `perfpathcopies`. It seems better to align the names.
Mon, 26 Nov 2018 00:13:50 +0100 perf: add a docstring to `perfpathcopies`
Boris Feld <boris.feld@octobus.net> [Mon, 26 Nov 2018 00:13:50 +0100] rev 40773
perf: add a docstring to `perfpathcopies` This will help people to find this command.
Mon, 26 Nov 2018 00:08:11 +0100 revlog: update the docstring of `ancestors` to match reality
Boris Feld <boris.feld@octobus.net> [Mon, 26 Nov 2018 00:08:11 +0100] rev 40772
revlog: update the docstring of `ancestors` to match reality Code using this method expect the revision to be (reverse) sorted. As pointed by Yuya Nishihara, the docstring should reflect that.
Mon, 26 Nov 2018 15:53:34 -0500 remotefilelog: fix typo in docstring
Augie Fackler <augie@google.com> [Mon, 26 Nov 2018 15:53:34 -0500] rev 40771
remotefilelog: fix typo in docstring Differential Revision: https://phab.mercurial-scm.org/D5306
Fri, 23 Nov 2018 18:58:16 +0300 store: append to fncache if there are only new files to write
Pulkit Goyal <pulkit@yandex-team.ru> [Fri, 23 Nov 2018 18:58:16 +0300] rev 40770
store: append to fncache if there are only new files to write Before this patch, if we have to add a new entry to fncache, we write the whole fncache again which slows things down on large fncache which have millions of entries. Addition of a new entry is common operation while pulling new files or commiting a new file. This patch adds a new fncache.addls set which keeps track of the additions happening and store them. When we write the fncache, we will just read the addls set and append those entries at the end of fncache. We make sure that the entries are new entries by loading the fncache and making sure entry does not exists there. In future if we can check if an entry is new without loading the fncache, that will speed up things more. Performance numbers for commiting a new file: mercurial repo before: 0.08784651756286621 after: 0.08474504947662354 mozilla-central before: 1.83314049243927 after: 1.7054164409637451 netbeans before: 0.7953150272369385 after: 0.7202838659286499 pypy before: 0.17805707454681396 after: 0.13431048393249512 In our internal repo, the performance improvement is in seconds. I have used octobus's ASV perf benchmark thing to get the above numbers. I also see some minute perf improvements related to creating a new commit without a new file, but I believe that's just some noise. Differential Revision: https://phab.mercurial-scm.org/D5301
Mon, 26 Nov 2018 15:38:35 +0300 py3: fix couple of division operator to do integer divison
Pulkit Goyal <pulkit@yandex-team.ru> [Mon, 26 Nov 2018 15:38:35 +0300] rev 40769
py3: fix couple of division operator to do integer divison Differential Revision: https://phab.mercurial-scm.org/D5305
Mon, 26 Nov 2018 15:37:48 +0300 py3: use dict.items() instead of dict.iteritems()
Pulkit Goyal <pulkit@yandex-team.ru> [Mon, 26 Nov 2018 15:37:48 +0300] rev 40768
py3: use dict.items() instead of dict.iteritems() dict.iteritems() does not exist on Python 3. Differential Revision: https://phab.mercurial-scm.org/D5304
Mon, 26 Nov 2018 15:36:51 +0300 py3: convert strings to bytes in tests/test-remotefilelog-histpack.py
Pulkit Goyal <pulkit@yandex-team.ru> [Mon, 26 Nov 2018 15:36:51 +0300] rev 40767
py3: convert strings to bytes in tests/test-remotefilelog-histpack.py Differential Revision: https://phab.mercurial-scm.org/D5303
Fri, 23 Nov 2018 21:54:03 +0300 py3: replace str() with pycompat.bytestr() or ('%d' % int)
Pulkit Goyal <pulkit@yandex-team.ru> [Fri, 23 Nov 2018 21:54:03 +0300] rev 40766
py3: replace str() with pycompat.bytestr() or ('%d' % int) After this patch, test-fastannotate-diffopts.t is about to pass. There are some extra newlines in the output. Differential Revision: https://phab.mercurial-scm.org/D5300
Fri, 23 Nov 2018 19:32:51 +0100 perf: add a `--timing` argument to `perfhelper-tracecopies`
Boris Feld <boris.feld@octobus.net> [Fri, 23 Nov 2018 19:32:51 +0100] rev 40765
perf: add a `--timing` argument to `perfhelper-tracecopies` The new argument will help picking better pair for benchmarking. See documentation for details.
Sun, 11 Nov 2018 18:08:33 +0900 ui: manage logger instances and event filtering by core ui
Yuya Nishihara <yuya@tcha.org> [Sun, 11 Nov 2018 18:08:33 +0900] rev 40764
ui: manage logger instances and event filtering by core ui The setup code in blackbox needs more tweaks since it has lots of black magics. I'll fix them by follow-up patches. To be clear, the goal of this series is to provide a proper way for command server to install its own logger. I need it to debug in-memory repository cache.
Mon, 12 Nov 2018 21:10:51 +0900 extensions: add "uipopulate" hook, called per instance, not per process
Yuya Nishihara <yuya@tcha.org> [Mon, 12 Nov 2018 21:10:51 +0900] rev 40763
extensions: add "uipopulate" hook, called per instance, not per process In short, this is the "reposetup" function for ui. It allows us to modify ui attributes without extending ui.__class__. Before, the only way to do that was to abuse the config dictionary, which is copied across ui instances. See the next patch for usage example.
Sat, 17 Nov 2018 19:11:45 +0900 hgweb: load globally-enabled extensions explicitly
Yuya Nishihara <yuya@tcha.org> [Sat, 17 Nov 2018 19:11:45 +0900] rev 40762
hgweb: load globally-enabled extensions explicitly Before, extensions were loaded as a side effect of hg.repository() if the hgweb was executed as a CGI/WSGI. I want to make it explicit so that another ui hook can be inserted after extensions.loadall().
Sat, 24 Nov 2018 14:11:02 -0500 tests: disable remotefilelog on Windows
Matt Harbison <matt_harbison@yahoo.com> [Sat, 24 Nov 2018 14:11:02 -0500] rev 40761
tests: disable remotefilelog on Windows I've spent a non trivial amount of time trying to eliminate the test errors, but it's looking like this is pretty dependent on Unix support. For example, there are attempts to delete open files, and uses of threads that report I/O attempts on closed files. (Maybe this is a race condition? Don't we usually use processes as workers on Windows?) In any event, I don't want real new errors elsewhere to be masked by these known problems. For some reason $CACHEDIR is reported as missing in test-remotefilelog-repack.t, but it actually exists in the hgcloneshallow call inside shallowutil.mkstickygroupdir(). By the time the process exits, it's gone. I don't see it being removed by code that calls 'rmdir' or 'remove' in the extension itself.
Thu, 22 Nov 2018 23:48:44 +0100 perf: run 'setup' function during stub run
Boris Feld <boris.feld@octobus.net> [Thu, 22 Nov 2018 23:48:44 +0100] rev 40760
perf: run 'setup' function during stub run The benchmarked function might need the content of the setup to be run in order to function properly.
Fri, 23 Nov 2018 02:08:01 +0100 perf: fallback to subset if ondisk cache is missing in perfbranchmapload
Boris Feld <boris.feld@octobus.net> [Fri, 23 Nov 2018 02:08:01 +0100] rev 40759
perf: fallback to subset if ondisk cache is missing in perfbranchmapload If there is no branchmap on disk for that filter, it means that the cache from some subset's filter is relevant for this one. We look for it instead of aborting. That way it is much simpler to run the command in an automated way. We can now add it to `test-contrib-perf.t`.
Fri, 23 Nov 2018 02:11:11 +0100 perf: prewarm the branchmap in perfbranchmapload
Boris Feld <boris.feld@octobus.net> [Fri, 23 Nov 2018 02:11:11 +0100] rev 40758
perf: prewarm the branchmap in perfbranchmapload It is not very interesting to have the command randomly failing because the branchmap for the tested filter happens to be cold. So we make sure to have a valid up to date branchmap before going further. The data might still be missing from disk if a subset was equivalent. See next changeset for details and fix.
Sun, 25 Nov 2018 22:39:54 +0900 localrepo: correct docstring of filectx()
Yuya Nishihara <yuya@tcha.org> [Sun, 25 Nov 2018 22:39:54 +0900] rev 40757
localrepo: correct docstring of filectx() The same reason as b6c2543e1dd8. It can't be any changeset specifiers but revision number.
Sat, 24 Nov 2018 20:05:55 +0900 annotate: remove dead code to not convert path to relative path
Yuya Nishihara <yuya@tcha.org> [Sat, 24 Nov 2018 20:05:55 +0900] rev 40756
annotate: remove dead code to not convert path to relative path It's annotate. There should be at least one file path specified.
Sat, 24 Nov 2018 18:41:44 +0900 annotate: start pager soon after command options are validated
Yuya Nishihara <yuya@tcha.org> [Sat, 24 Nov 2018 18:41:44 +0900] rev 40755
annotate: start pager soon after command options are validated It helps extracting helper class.
Sat, 24 Nov 2018 18:38:44 +0900 annotate: check and update command options first
Yuya Nishihara <yuya@tcha.org> [Sat, 24 Nov 2018 18:38:44 +0900] rev 40754
annotate: check and update command options first It helps extracting helper class.
Sat, 24 Nov 2018 18:36:44 +0900 annotate: format local tables in less-dense form
Yuya Nishihara <yuya@tcha.org> [Sat, 24 Nov 2018 18:36:44 +0900] rev 40753
annotate: format local tables in less-dense form I'll move these to a class, where one-extra indent will be needed.
Thu, 22 Nov 2018 18:14:21 +0300 perf: rename version flag of perfchangegroupchangelog to cgversion
Pulkit Goyal <pulkit@yandex-team.ru> [Thu, 22 Nov 2018 18:14:21 +0300] rev 40752
perf: rename version flag of perfchangegroupchangelog to cgversion The version flag conflicts with the global version flag and does not work. Differential Revision: https://phab.mercurial-scm.org/D5297 Differential Revision: https://phab.mercurial-scm.org/D5298
Fri, 23 Nov 2018 22:27:57 -0500 procutil: don't allow the main 'hg' script to be treated as the Windows exe
Matt Harbison <matt_harbison@yahoo.com> [Fri, 23 Nov 2018 22:27:57 -0500] rev 40751
procutil: don't allow the main 'hg' script to be treated as the Windows exe Previously, there were a handful of errors like this: $ hg prefetch --repack (running background incremental repack) + abort: %1 is not a valid Win32 application + [255] CreateProcess() doesn't append .exe when `lpApplicationName` contains a path, and a python script isn't directly executable.
Fri, 23 Nov 2018 22:18:56 -0500 remotefilelog: drop some compatibility cruft for finding the hg exeutable
Matt Harbison <matt_harbison@yahoo.com> [Fri, 23 Nov 2018 22:18:56 -0500] rev 40750
remotefilelog: drop some compatibility cruft for finding the hg exeutable
Wed, 21 Nov 2018 17:17:26 +0300 branchmap: build the revbranchcache._namesreverse() only when required
Pulkit Goyal <pulkit@yandex-team.ru> [Wed, 21 Nov 2018 17:17:26 +0300] rev 40749
branchmap: build the revbranchcache._namesreverse() only when required On big repositories with a lot of named branches and that also increasing over time, building of this dict can be expensive and shows up in profile. For our internal repository, this saves ~0.05 seconds. Thanks to Yuya for suggesting using util.propertycache() and util.clearcachedproperty(). Differential Revision: https://phab.mercurial-scm.org/D5291
Thu, 15 Nov 2018 11:11:38 +0100 sparse-revlog: put the native implementation of slicechunktodensity to use
Boris Feld <boris.feld@octobus.net> [Thu, 15 Nov 2018 11:11:38 +0100] rev 40748
sparse-revlog: put the native implementation of slicechunktodensity to use When possible, the C implementation of delta chain slicing will be used. providing a large boost in performance for this operation. To take a practical example of restoring manifest revision '59547c40bc4c' for a reference NetBeans repository (using sparse-revlog). The media time of the step `slice-sparse-chain` of `perfrevlogrevision` improve from 0.660 ms to 0.098 ms; The full series move delta chain slicing from 1.120 ms to 0.098 ms; Implementing _slicechunktosize into C would yield further improvements. However, the performance seems good enough for now.
Thu, 15 Nov 2018 11:10:52 +0100 cext: increment the `parsers` module version
Boris Feld <boris.feld@octobus.net> [Thu, 15 Nov 2018 11:10:52 +0100] rev 40747
cext: increment the `parsers` module version We introduced a new `slicechunktodensity` method to the index.
Thu, 15 Nov 2018 11:09:58 +0100 sparse-revlog: introduce native (C) implementation of slicechunktodensity
Boris Feld <boris.feld@octobus.net> [Thu, 15 Nov 2018 11:09:58 +0100] rev 40746
sparse-revlog: introduce native (C) implementation of slicechunktodensity This is a C implementation of `_slicechunktodensity` in the `mercurial/revlogutils/deltas.py` file. The algorithm involves a lot of integer manipulation and low-level access to index data. Having a C implementation of it raises a large performance improvement. See later changeset in this series for details.
Fri, 09 Nov 2018 18:45:23 +0100 sparse-revlog: add a `trim_endidx` function in C
Boris Feld <boris.feld@octobus.net> [Fri, 09 Nov 2018 18:45:23 +0100] rev 40745
sparse-revlog: add a `trim_endidx` function in C We are about to implement a native version of `slicechunktodensity`. For clarity, we introduce the helper functions first. This function implement a subpart of the python function `_trimchunk` in `mercurial/revlogutils/deltas.py`. Handling of actual Python objects is left to the caller function.
Fri, 09 Nov 2018 18:43:16 +0100 sparse-revlog: add a `index_segment_span` function in C
Boris Feld <boris.feld@octobus.net> [Fri, 09 Nov 2018 18:43:16 +0100] rev 40744
sparse-revlog: add a `index_segment_span` function in C We are about to implement a native version of `slicechunktodensity`. For clarity, we introduce the helper functions first. This new function provides an efficient way to retrieve some of the information needed by `slicechunktodensity`.
Fri, 09 Nov 2018 18:42:58 +0100 sparse-revlog: add a `index_get_length` function in C
Boris Feld <boris.feld@octobus.net> [Fri, 09 Nov 2018 18:42:58 +0100] rev 40743
sparse-revlog: add a `index_get_length` function in C We are about to implement a native version of `slicechunktodensity`. For clarity, we introduce the helper functions first. This new function provides an efficient way to retrieve some of the information needed by `slicechunktodensity`.
Tue, 20 Nov 2018 14:49:18 +0000 sparse-revlog: add a `index_get_start` function in C
Boris Feld <boris.feld@octobus.net> [Tue, 20 Nov 2018 14:49:18 +0000] rev 40742
sparse-revlog: add a `index_get_start` function in C We are about to implement a native version of `slicechunktodensity`. For clarity, we introduce the helper functions first. This new function provides an efficient way to retrieve some of the information needed by `slicechunktodensity`.
Fri, 23 Nov 2018 06:32:32 +0100 perf: add --clear-revlog flag to branchmapload
Boris Feld <boris.feld@octobus.net> [Fri, 23 Nov 2018 06:32:32 +0100] rev 40741
perf: add --clear-revlog flag to branchmapload Having the changelog index already loaded when loading the branchmap can have a large impact on performance. Example runs (large private repository): hg perfbranchmapload -f base ! wall 0.116722 comb 0.120000 user 0.110000 sys 0.010000 (best of 59) hg perfbranchmapload -f base --clear-revlogs ! wall 0.258246 comb 0.230000 user 0.220000 sys 0.010000 (best of 31)
Fri, 23 Nov 2018 06:32:28 +0100 perf: introduce a function to fully "unload" a changelog
Boris Feld <boris.feld@octobus.net> [Fri, 23 Nov 2018 06:32:28 +0100] rev 40740
perf: introduce a function to fully "unload" a changelog The function remove various attributes and caches related to changelog. This is getting a common requirement.
Fri, 23 Nov 2018 01:32:57 +0100 perf: use an explicit function in perfbranchmapload
Boris Feld <boris.feld@octobus.net> [Fri, 23 Nov 2018 01:32:57 +0100] rev 40739
perf: use an explicit function in perfbranchmapload This make things clearer.
Fri, 23 Nov 2018 01:20:18 +0100 perf: update function name to match `perfbranchmapload` command
Boris Feld <boris.feld@octobus.net> [Fri, 23 Nov 2018 01:20:18 +0100] rev 40738
perf: update function name to match `perfbranchmapload` command Having function with the same name as the command is simpler.
Wed, 21 Nov 2018 11:46:47 +0000 perf: fix a minor typo in perfbranchmapload
Boris Feld <boris.feld@octobus.net> [Wed, 21 Nov 2018 11:46:47 +0000] rev 40737
perf: fix a minor typo in perfbranchmapload
Wed, 10 Oct 2018 00:50:37 +0200 context: floor adjustlinkrev graph walk during copy tracing
Boris Feld <boris.feld@octobus.net> [Wed, 10 Oct 2018 00:50:37 +0200] rev 40736
context: floor adjustlinkrev graph walk during copy tracing The `_adjustlinkrev` method gains an optional "stoprev" argument. The linkrev adjustment will give up once this floor is reached. The relevant functions using `_adjustlinkrev` are updated to pass an appropriate value in the copy tracing code. In some private repository, about 10% of the status call triggered the pathological case addressed by this change. The speedup varies from one call to another, the best-observed win is moving from 170s to 11s. The effect of this change can be seen in the public pypy repository, running the following command: hg perftracecopies --source 83c9ff0c0206 --destination 59c79103d5b0 before: 3.401753 seconds after: 2.634897 seconds (-23%)
Mon, 19 Nov 2018 14:30:58 +0000 context: small refactoring of `isintroducedafter`
Boris Feld <boris.feld@octobus.net> [Mon, 19 Nov 2018 14:30:58 +0000] rev 40735
context: small refactoring of `isintroducedafter` This make the next change clearer.
Wed, 10 Oct 2018 00:50:36 +0200 context: split `introrev` logic in a sub function
Boris Feld <boris.feld@octobus.net> [Wed, 10 Oct 2018 00:50:36 +0200] rev 40734
context: split `introrev` logic in a sub function We want to add a mechanism to stop iteration early associated to intro rev early in some case. However, it does not make sense to expose it in the public `filectx` API. So we split the code into an internal method instead.
Wed, 10 Oct 2018 00:50:35 +0200 context: introduce an `isintroducedafter` method and use it in copies
Boris Feld <boris.feld@octobus.net> [Wed, 10 Oct 2018 00:50:35 +0200] rev 40733
context: introduce an `isintroducedafter` method and use it in copies Right now, copy tracing make effort to not traverse the graph too much to save performance. It uses a "limit" acting as a floor revision past which data are no longer relevant to the current copy tracing. However, to enforce this limit, it does a call to `filectx.rev()` and that call can trigger a graph traversal on its own. That extra graph traversal is unaware of the current limit and can become very expensive. That cost is increased by the nature of work done in adjust link rev, we are not only walking down the graph, we are also checking the affected file for each revision we walk through. Something significantly more expensive than the walk itself. To work around this we need to make the `filectx` operation aware of the current limit. The first step is to introduce a dedicated method: `isintroducedafter`. We'll then rework that method logic to stop traversal as soon as possible.
Wed, 10 Oct 2018 00:50:34 +0200 context: take advantage of `_descendantrev` in introrev if available
Boris Feld <boris.feld@octobus.net> [Wed, 10 Oct 2018 00:50:34 +0200] rev 40732
context: take advantage of `_descendantrev` in introrev if available Before this changeset, `_descendantrev` was ignored and `introrev` could return a "wrong" result. I was previously fine because there seems to be no existing code using both `introrev` and `_descendantrev` at the same time. However, we would like to change that.
Wed, 10 Oct 2018 00:49:30 +0200 context: spell out the logic around linkrev adjustement starting point
Boris Feld <boris.feld@octobus.net> [Wed, 10 Oct 2018 00:49:30 +0200] rev 40731
context: spell out the logic around linkrev adjustement starting point We make the intent of the `_changeid` and `_changectx` checks explicit. The same logic was previously performed by the `self.rev()` call. The new code is a bit redundant, but much clearer.
Mon, 19 Nov 2018 14:14:56 +0000 perf: add a new `perfhelper-tracecopies` command
Boris Feld <boris.feld@octobus.net> [Mon, 19 Nov 2018 14:14:56 +0000] rev 40730
perf: add a new `perfhelper-tracecopies` command The command is not measuring performance itself, it digs interesting statistic to help pick good arguments for the `perfcopytrace` command.
Fri, 21 Sep 2018 09:19:42 -0700 narrow: extract helper for parsing narrowspec file
Martin von Zweigbergk <martinvonz@google.com> [Fri, 21 Sep 2018 09:19:42 -0700] rev 40729
narrow: extract helper for parsing narrowspec file This will be used for parsing a file that's stored in a different location. Differential Revision: https://phab.mercurial-scm.org/D5277
Thu, 22 Nov 2018 22:40:22 +0900 py3: cast attribute name to sysstr in clearcachedproperty()
Yuya Nishihara <yuya@tcha.org> [Thu, 22 Nov 2018 22:40:22 +0900] rev 40728
py3: cast attribute name to sysstr in clearcachedproperty()
Wed, 21 Nov 2018 19:12:12 +0300 py3: whitelist three more passing test caught by buildbot
Pulkit Goyal <pulkit@yandex-team.ru> [Wed, 21 Nov 2018 19:12:12 +0300] rev 40727
py3: whitelist three more passing test caught by buildbot The number of failing test is back to two digits. Differential Revision: https://phab.mercurial-scm.org/D5293
Wed, 21 Nov 2018 13:08:23 -0500 tests: make test-check-module-imports more robust
Valentin Gatien-Baron <vgatien-baron@janestreet.com> [Wed, 21 Nov 2018 13:08:23 -0500] rev 40726
tests: make test-check-module-imports more robust It failed for me without this in this way: tests/test-commandserver.t:19: relative import of stdlib module tests/test-lfs-serve.t:108: relative import of stdlib module tests/test-lfs-serve.t:255: relative import of stdlib module tests/test-lfs-serve.t:362: relative import of stdlib module tests/test-lfs-serve.t:406: relative import of stdlib module tests/test-lock.py:9: imports not lexically sorted: silenttestrunner < unittest, True, True tests/test-lrucachedict.py:5: imports not lexically sorted: silenttestrunner < unittest, True, True tests/test-match.py:5: imports not lexically sorted: silenttestrunner < unittest, True, True tests/test-remotefilelog-datapack.py:15: imports not lexically sorted: silenttestrunner < unittest, True, True tests/test-remotefilelog-histpack.py:14: imports not lexically sorted: silenttestrunner < unittest, True, True tests/test-simplekeyvaluefile.py:4: imports not lexically sorted: silenttestrunner < unittest, True, True tests/test-sshserver.py:6: imports not lexically sorted: silenttestrunner < unittest, True, True This is because every module is considered a stdlib module, because the stdlib_prefixes is /usr, and my repo is in /usr/local/home, which means that sys.path contains a couple of /usr/local/home/../hg/.. entries that count as "in the stdlib". Fix this by preventing any path in sys.path that's inside the mercurial source from being considered "in the stdlib". Differential Revision: https://phab.mercurial-scm.org/D5294
Sat, 27 Oct 2018 21:13:23 +0800 push: add --publish flag to change phase of pushed changesets
Anton Shestakov <av6@dwimlabs.net> [Sat, 27 Oct 2018 21:13:23 +0800] rev 40725
push: add --publish flag to change phase of pushed changesets This flag is copied from topic extension, where it proved to be useful. It makes all pushed changesets public on both ends if the push succeeds. Doesn't currently work for any subrepos that are implicitly pushed together with their owner repo.
Mon, 19 Nov 2018 17:19:54 +0000 match: reformat `syntaxes` dictionary for better maintainability
Boris Feld <boris.feld@octobus.net> [Mon, 19 Nov 2018 17:19:54 +0000] rev 40724
match: reformat `syntaxes` dictionary for better maintainability
Mon, 19 Nov 2018 18:54:44 +0000 match: provide and use a quick way to escape a single byte
Boris Feld <boris.feld@octobus.net> [Mon, 19 Nov 2018 18:54:44 +0000] rev 40723
match: provide and use a quick way to escape a single byte The previous function has a lot of overhead (including being a function). In the `_globre` case, we always escape a single byte. So we provide a dictionary dedicated to this use case. We directly use the dictionary to avoid a function call, these are expensive in Python. Again, this raise a very significant performance gain: Before: ! wall 0.059793 comb 0.060000 user 0.060000 sys 0.000000 (median of 100) After: ! wall 0.020390 comb 0.020000 user 0.020000 sys 0.000000 (median of 146) Total improvement for the full series: Before: ! wall 0.153153 comb 0.150000 user 0.150000 sys 0.000000 (median of 66) After: ! wall 0.020390 comb 0.020000 user 0.020000 sys 0.000000 (median of 146)
Mon, 19 Nov 2018 16:50:21 +0000 perf: make `clearfilecache` helper work with any object
Boris Feld <boris.feld@octobus.net> [Mon, 19 Nov 2018 16:50:21 +0000] rev 40722
perf: make `clearfilecache` helper work with any object If the object is not a localrepo, it won't have an `unfiltered` method (and won't need one).
Tue, 20 Nov 2018 10:10:25 +0000 perf: move some of the perftags benchmark to the setup function
Boris Feld <boris.feld@octobus.net> [Tue, 20 Nov 2018 10:10:25 +0000] rev 40721
perf: move some of the perftags benchmark to the setup function Creating fresh objects and clearing the cache should not be part of the timing. before: ! wall 0.020851 comb 0.020000 user 0.020000 sys 0.000000 (median of 138) after: ! wall 0.018740 comb 0.020000 user 0.020000 sys 0.000000 (median of 141)
Mon, 19 Nov 2018 23:14:46 +0000 perf: use the new setup function in "perfbookmarks"
Boris Feld <boris.feld@octobus.net> [Mon, 19 Nov 2018 23:14:46 +0000] rev 40720
perf: use the new setup function in "perfbookmarks" This command was picked arbitrarily to display the usefulness of the new feature. In my Mercurial repository (with very few bookmarks), moving cache cleanup in the dedicated setup function has a visible and stable effect on the benchmark number. before: ! wall 0.000061 comb 0.000000 user 0.000000 sys 0.000000 (median of 40837) after: ! wall 0.000058 comb 0.000000 user 0.000000 sys 0.000000 (median of 40500)
Mon, 19 Nov 2018 22:55:07 +0000 perf: add a `setup` argument to run code outside of the timed section
Boris Feld <boris.feld@octobus.net> [Mon, 19 Nov 2018 22:55:07 +0000] rev 40719
perf: add a `setup` argument to run code outside of the timed section With this new argument, it is possible to perform special setup and cleanup outside of code actually timed. This is useful to provide more accurate benchmark.
Mon, 19 Nov 2018 23:02:29 +0000 perf: explicitly pass title as a keyword argument in `perfdiffwd`
Boris Feld <boris.feld@octobus.net> [Mon, 19 Nov 2018 23:02:29 +0000] rev 40718
perf: explicitly pass title as a keyword argument in `perfdiffwd` This will help to update the timer function arguments in a later changeset.
Sun, 11 Nov 2018 17:59:23 +0900 ui: unify argument name of ui.log()
Yuya Nishihara <yuya@tcha.org> [Sun, 11 Nov 2018 17:59:23 +0900] rev 40717
ui: unify argument name of ui.log() It's called an "event" in both blackbox and logtoprocess.
Sun, 11 Nov 2018 17:45:18 +0900 logtoprocess: extract logger class from ui wrapper
Yuya Nishihara <yuya@tcha.org> [Sun, 11 Nov 2018 17:45:18 +0900] rev 40716
logtoprocess: extract logger class from ui wrapper It provides the same interface as the blackboxlogger. The ui wrapper will be removed shortly.
Wed, 21 Nov 2018 21:40:16 +0900 merge with stable
Yuya Nishihara <yuya@tcha.org> [Wed, 21 Nov 2018 21:40:16 +0900] rev 40715
merge with stable
Mon, 19 Nov 2018 21:12:13 +0300 py3: use node.hex(m.digest()) instead of m.hexdigest()
Pulkit Goyal <pulkit@yandex-team.ru> [Mon, 19 Nov 2018 21:12:13 +0300] rev 40714
py3: use node.hex(m.digest()) instead of m.hexdigest() hashlib.sha1.hexdigest() returns str on Python 3. Differential Revision: https://phab.mercurial-scm.org/D5287
Sun, 18 Nov 2018 02:40:47 +0100 tests: add Balto configuration file
Boris Feld <boris.feld@octobus.net> [Sun, 18 Nov 2018 02:40:47 +0100] rev 40713
tests: add Balto configuration file I have been developing a Mercurial test runner plugin for being able to run Mercurial tests with Balto (https://bitbucket.org/lothiraldan/balto/src/default/). Balto requires a configuration file so let's include it, I have added the required information in the configuration file as comments. I hope Balto would be an helpful tool for other people than me. Differential Revision: https://phab.mercurial-scm.org/D5283
Mon, 19 Nov 2018 13:40:03 -0500 tests: make test-alias.t pass with re2
Valentin Gatien-Baron <vgatien-baron@janestreet.com> [Mon, 19 Nov 2018 13:40:03 -0500] rev 40712
tests: make test-alias.t pass with re2 Locally, these "non-ASCII character in alias" errors don't show up, though I get them when the alias is defined at the command line rather than in an hgrc. The brokenness comes from the fact that hgrcs are parsed with regexes, and re/re2 differ in this way: $ python -c 'import re; print(re.compile("(.*)").match("aaa\xc0bbbb").groups())' ('aaa\xc0bbbb',) $ python -c 'import re2; print(re2.compile("(.*)").match("aaa\xc0bbbb").groups())' ('aaa',) Apparently re2 stops when it encounters invalid utf8 (which I suppose makes sense given that '.' matches what appears to be a codepoint rather than a byte). This is presumably a bug in hg, but not very important, so just change the test to stick to valid utf8. Differential Revision: https://phab.mercurial-scm.org/D5288
Mon, 19 Nov 2018 23:08:09 -0800 context: remove seemingly impossible code branch
Martin von Zweigbergk <martinvonz@google.com> [Mon, 19 Nov 2018 23:08:09 -0800] rev 40711
context: remove seemingly impossible code branch I'm not a Python expert, but I can't think of a way that the following branch can ever be hit: def _changeid(self): if r'_changeid' in self.__dict__: return self._changeid It seems to me that if that condition is true, then this function would not have been called. The only exception I can think of is if a reference to the function had been stored beforehand, something like this: c = fctx.__dict__['_changeid'] fctx._changeid c() But that seems like very unlikely code to exist. The condition was added in 921b64e1f7b9 (filecontext: use 'is not None' to check for filelog existence, 2013-05-01) as a "bonus" change (in addition to what the patch was actually about) Differential Revision: https://phab.mercurial-scm.org/D5289
Mon, 19 Nov 2018 21:11:08 +0300 py3: use pycompat.byteskwargs() to covert keys of kwargs to bytes
Pulkit Goyal <pulkit@yandex-team.ru> [Mon, 19 Nov 2018 21:11:08 +0300] rev 40710
py3: use pycompat.byteskwargs() to covert keys of kwargs to bytes Differential Revision: https://phab.mercurial-scm.org/D5286
Mon, 19 Nov 2018 20:30:07 +0300 py3: use '%d' for integers instead of '%s'
Pulkit Goyal <pulkit@yandex-team.ru> [Mon, 19 Nov 2018 20:30:07 +0300] rev 40709
py3: use '%d' for integers instead of '%s' Differential Revision: https://phab.mercurial-scm.org/D5285
Mon, 19 Nov 2018 19:57:11 +0300 py3: add 9 new passing tests caught by buildbot
Pulkit Goyal <pulkit@yandex-team.ru> [Mon, 19 Nov 2018 19:57:11 +0300] rev 40708
py3: add 9 new passing tests caught by buildbot Differential Revision: https://phab.mercurial-scm.org/D5284
Fri, 09 Nov 2018 13:57:13 +0800 branch: allow changing branch of merge commits with --rev
Anton Shestakov <av6@dwimlabs.net> [Fri, 09 Nov 2018 13:57:13 +0800] rev 40707
branch: allow changing branch of merge commits with --rev Tests show that changing branch of merge commits works fine with evolution and without, so let's allow it. Other safeguards should prevent users from shooting themselves in the foot.
Thu, 15 Nov 2018 22:28:38 -0500 lfs: ensure that the return of urlopener.open() is closed
Matt Harbison <matt_harbison@yahoo.com> [Thu, 15 Nov 2018 22:28:38 -0500] rev 40706
lfs: ensure that the return of urlopener.open() is closed No problem observed, just an oversight noticed while reading documentation.
Thu, 15 Nov 2018 11:16:42 -0800 changegroup: avoid instantiating storage if we are not using it
Kyle Lippincott <spectral@google.com> [Thu, 15 Nov 2018 11:16:42 -0800] rev 40705
changegroup: avoid instantiating storage if we are not using it Differential Revision: https://phab.mercurial-scm.org/D5280
Fri, 16 Nov 2018 17:56:36 -0500 http: allow 'auth.prefix' to have a username consistent with the URI
Matt Harbison <matt_harbison@yahoo.com> [Fri, 16 Nov 2018 17:56:36 -0500] rev 40704
http: allow 'auth.prefix' to have a username consistent with the URI It may be a little weird to put a username in the prefix, but the documentation doesn't disallow it, and silently disallowing it has caused confusion[1]. The username must match what is passed in (which seems to be from the URI via a circuitous route), as well as 'auth.username' if it was specified. I thought about printing a warning for a mismatch, but we already don't print a warning if the 'auth.username' and URI username don't match. This change allows the first and second last new test cases to work as expected. It looks like this would have been a problem since at least 0593e8f81c71. [1] https://www.mercurial-scm.org/pipermail/mercurial/2018-November/051069.html
Thu, 15 Nov 2018 18:14:57 -0500 lfs: make the exception messages consistent
Matt Harbison <matt_harbison@yahoo.com> [Thu, 15 Nov 2018 18:14:57 -0500] rev 40703
lfs: make the exception messages consistent I don't love that it repeats 'HTTP Error' in an already long message, but I doubt that we should assume that it will always say that on the original exception message.
Thu, 15 Nov 2018 18:08:29 -0500 lfs: handle URLErrors to add additional information
Matt Harbison <matt_harbison@yahoo.com> [Thu, 15 Nov 2018 18:08:29 -0500] rev 40702
lfs: handle URLErrors to add additional information Sometimes the blob server is hit first (e.g. on push), and sometimes it's hit last (e.g. pull). Throw in depth first subrepo operations, and things quickly get insane. It wasn't even mentioning LFS, so just saying "connection refused" can be confusing- especially if the blob server is a secondary server and connecting to the repo server works. The exception handler for the transfer handler will print the full path to the blob, but that seems fine given that it might be necessary to debug a second server. (We don't yet support a standalone blob server, so the handler for the Batch API will cover 99.9% of the current problems. But it might as well be handled now while I'm thinking about it.) The function for translating to a message was mostly borrowed from scmutil.catchall().
Thu, 15 Nov 2018 17:58:59 -0500 lfs: improve the hints for common errors in the Batch API
Matt Harbison <matt_harbison@yahoo.com> [Thu, 15 Nov 2018 17:58:59 -0500] rev 40701
lfs: improve the hints for common errors in the Batch API The previous message was too debug-ish and less action oriented than a hint should be. The remaining errors that aren't handled are more along the lines of programming errors (not using POST, bad accept type, etc), so I'm not bothering with that. The friendly errors purposely use `self.baseurl` instead of the full Batch API endpoint because I'd expect some copy/paste/modify on the part of the user here, and it would be more confusing if '/objects/batch' magically appeared, but shouldn't be used in the config setting. It still seems like the right thing for debugging in the catchall case.
Thu, 15 Nov 2018 17:55:01 -0500 lfs: provide more Batch API error info via a hint in the raised exception
Matt Harbison <matt_harbison@yahoo.com> [Thu, 15 Nov 2018 17:55:01 -0500] rev 40700
lfs: provide more Batch API error info via a hint in the raised exception A coworker had a typo in `lfs.url`, forgot it was even set because usually the blob server is inferred, and then got a 404. It would have been easier to debug with the failing URL printed.
Thu, 15 Nov 2018 17:50:14 -0500 scmutil: display the optional hint when handling StorageError in catchall()
Matt Harbison <matt_harbison@yahoo.com> [Thu, 15 Nov 2018 17:50:14 -0500] rev 40699
scmutil: display the optional hint when handling StorageError in catchall() Other than CensoredNodeError (which is also a StorageError), it looks like all exceptions with a hint display them. I'm not sure that it makes sense to have a hint for censored nodes, so I'm not bothering with that. It looks like nobody is using this yet, as the tests don't change.
Thu, 15 Nov 2018 14:57:26 +0100 sparse-revlog: align endrevidx usages in the _slicechunktosize
Boris Feld <boris.feld@octobus.net> [Thu, 15 Nov 2018 14:57:26 +0100] rev 40698
sparse-revlog: align endrevidx usages in the _slicechunktosize All "startrevidx..endrevidx" ranges in this function are now half-open.
Thu, 15 Nov 2018 14:55:11 +0100 sparse-revlog: use `span` variable as intended
Boris Feld <boris.feld@octobus.net> [Thu, 15 Nov 2018 14:55:11 +0100] rev 40697
sparse-revlog: use `span` variable as intended The variable was planned to be used in the while condition but was not used yet.
Thu, 15 Nov 2018 17:38:51 -0500 tests: stabilize test-commandserver.t on Windows
Matt Harbison <matt_harbison@yahoo.com> [Thu, 15 Nov 2018 17:38:51 -0500] rev 40696
tests: stabilize test-commandserver.t on Windows It looks like new test coverage in 054d0fcba2c4, rather than a code change.
Thu, 15 Nov 2018 17:36:15 -0500 histedit: conditionalize the imports of 'fcntl' and 'termios'
Matt Harbison <matt_harbison@yahoo.com> [Thu, 15 Nov 2018 17:36:15 -0500] rev 40695
histedit: conditionalize the imports of 'fcntl' and 'termios' The recent import of chistedit in c36175456350 made Windows sad. I'm not sure if there's other stuff that needs to be done here (e.g. change the default interface), but this makes the tests run again. It would have been nicer if the error message indicated these modules were the problem, but instead it said "*** failed to import extension histedit: No module named histedit". I'm not sure if there's anything we can do about that.
Fri, 16 Nov 2018 14:21:47 +0100 logtoprocess: update commandfinish options arguments
Boris Feld <boris.feld@octobus.net> [Fri, 16 Nov 2018 14:21:47 +0100] rev 40694
logtoprocess: update commandfinish options arguments d2c997b8001f changed the logtoprocess API with the effect of not exposing the positional arguments to the logtoprocess scripts anymore. We have some scripts that use the duration and return code of the "commandfinish" event to monitor hg calls. Update the logging of the "commandfinish" to expose those values as options argument, which will be accessible as `OPT_RETURN_CODE` and `OPT_DURATION` in logtoprocess arguments. The code has been formatted with Black. Differential Revision: https://phab.mercurial-scm.org/D5282
Thu, 15 Nov 2018 13:16:46 -0800 rebase: fix two ui.logs to actually have text when using default blackbox log
Kyle Lippincott <spectral@google.com> [Thu, 15 Nov 2018 13:16:46 -0800] rev 40693
rebase: fix two ui.logs to actually have text when using default blackbox log Some implementations of ui.log record structured information along with the ui.log which can be used for metrics, but ui.log() as implemented by the blackbox logging does not do anything special with this, and we end up with a log line with no text (not even a line break) so it ends up looking something like: date time user @node (pid) [rebase]> date time user @node (pid) ... Differential Revision: https://phab.mercurial-scm.org/D5279
Thu, 15 Nov 2018 11:22:32 -0800 wireprotov2server: let repo.narrowmatch(match) do matcher intersection
Martin von Zweigbergk <martinvonz@google.com> [Thu, 15 Nov 2018 11:22:32 -0800] rev 40692
wireprotov2server: let repo.narrowmatch(match) do matcher intersection This is supported since 4fd0fac48922 (localrepo: allow narrowmatch() to accept matcher to intersect with, 2018-09-28). Differential Revision: https://phab.mercurial-scm.org/D5281
Sun, 11 Nov 2018 17:29:46 +0900 blackbox: extract function to test if log event is tracked
Yuya Nishihara <yuya@tcha.org> [Sun, 11 Nov 2018 17:29:46 +0900] rev 40691
blackbox: extract function to test if log event is tracked This will be a required method of the logger interface.
Sun, 11 Nov 2018 17:25:34 +0900 blackbox: initialize inlog flag properly
Yuya Nishihara <yuya@tcha.org> [Sun, 11 Nov 2018 17:25:34 +0900] rev 40690
blackbox: initialize inlog flag properly And ditch the "bb" prefix as it's no longer a ui extension class.
Sun, 11 Nov 2018 17:24:28 +0900 blackbox: initialize repo attribute properly
Yuya Nishihara <yuya@tcha.org> [Sun, 11 Nov 2018 17:24:28 +0900] rev 40689
blackbox: initialize repo attribute properly And ditch the "bb" prefix as it's no longer a ui extension class.
Sun, 11 Nov 2018 17:22:14 +0900 blackbox: unindent "if True" block
Yuya Nishihara <yuya@tcha.org> [Sun, 11 Nov 2018 17:22:14 +0900] rev 40688
blackbox: unindent "if True" block
Sun, 11 Nov 2018 17:17:49 +0900 blackbox: extract logger class from ui wrapper
Yuya Nishihara <yuya@tcha.org> [Sun, 11 Nov 2018 17:17:49 +0900] rev 40687
blackbox: extract logger class from ui wrapper This moves most functions to new blackboxlogger class. The ui wrapper will be removed later.
Sun, 11 Nov 2018 16:58:22 +0900 blackbox: rename variables to prepare extracting core logic from ui wrapper
Yuya Nishihara <yuya@tcha.org> [Sun, 11 Nov 2018 16:58:22 +0900] rev 40686
blackbox: rename variables to prepare extracting core logic from ui wrapper I'm going to add ui.setlogger() function so that I can enable logging feature in command server without extending ui.__class__. This prepares for it. "self" will be a logger instance, so this patch renames some of them to "ui".
Fri, 09 Nov 2018 17:58:37 +0100 sparse-revlog: rework the way we enforce chunk size limit
Boris Feld <boris.feld@octobus.net> [Fri, 09 Nov 2018 17:58:37 +0100] rev 40685
sparse-revlog: rework the way we enforce chunk size limit We move from a O(N) algorithm to a O(log(N)) algorithm. The previous algorithm was traversing the whole delta chain, looking for the exact point where it became too big. This would result in most of the delta chain to be traversed. Instead, we now use a "binary" approach, slicing the chain in two until we have a chunk of the appropriate size. We still keep the previous algorithm for the snapshots part. There are few of them and they are large bits of data distant from each other. So the previous algorithm should work well in that case. To take a practical example of restoring manifest revision '59547c40bc4c' for a reference NetBeans repository (using sparse-revlog). The media time of the step `slice-sparse-chain` of `perfrevlogrevision` improve from 1.109 ms to 0.660 ms.
Tue, 13 Nov 2018 15:06:29 +0100 doctest: add a `issnapshot` method to _testrevlog
Boris Feld <boris.feld@octobus.net> [Tue, 13 Nov 2018 15:06:29 +0100] rev 40684
doctest: add a `issnapshot` method to _testrevlog We'll need it soon.
Tue, 13 Nov 2018 14:41:04 +0100 tests: add `revlogutils.deltas` module to doctests
Boris Feld <boris.feld@octobus.net> [Tue, 13 Nov 2018 14:41:04 +0100] rev 40683
tests: add `revlogutils.deltas` module to doctests The doctest in these module have been from `mercurial.revlog` but the module was not added to the doctests. Spotted by Yuya Nishihara.
Thu, 15 Nov 2018 20:20:31 +0900 merge with stable
Yuya Nishihara <yuya@tcha.org> [Thu, 15 Nov 2018 20:20:31 +0900] rev 40682
merge with stable
Mon, 05 Nov 2018 22:58:19 +0100 mergetools: adjust Beyond Compare config on Mac/Linux
joco <joco@google.com> [Mon, 05 Nov 2018 22:58:19 +0100] rev 40681
mergetools: adjust Beyond Compare config on Mac/Linux Set the labels of the Linux and Mac versions of Beyond Compare from Mercurial's builtin variables, same as the Windows version. Differential Revision: https://phab.mercurial-scm.org/D5255
Wed, 14 Nov 2018 15:05:38 +0800 rewriteutil: move publicrevs closer to where it's used
Anton Shestakov <av6@dwimlabs.net> [Wed, 14 Nov 2018 15:05:38 +0800] rev 40680
rewriteutil: move publicrevs closer to where it's used
Wed, 14 Nov 2018 11:30:46 -0800 requires: use atomictemp=True when writing .hg/requires
Martin von Zweigbergk <martinvonz@google.com> [Wed, 14 Nov 2018 11:30:46 -0800] rev 40679
requires: use atomictemp=True when writing .hg/requires We use an unusual file system at Google that allows writes (and renames) but not deletions (for certain paths). That causes problems when writing the requires files without atomictemp=True. There doesn't appear to be any real drawbacks to using atomictemp, so I'm hoping we can just change it in core. Differential Revision: https://phab.mercurial-scm.org/D5274
Sun, 11 Nov 2018 16:47:28 +0900 blackbox: extract _log() function which is called after lastui is resolved
Yuya Nishihara <yuya@tcha.org> [Sun, 11 Nov 2018 16:47:28 +0900] rev 40678
blackbox: extract _log() function which is called after lastui is resolved This makes sure that self is the solo ui instance used in _log().
Sun, 11 Nov 2018 16:44:30 +0900 blackbox: inline temporary variables which are referenced only once
Yuya Nishihara <yuya@tcha.org> [Sun, 11 Nov 2018 16:44:30 +0900] rev 40677
blackbox: inline temporary variables which are referenced only once
Sun, 11 Nov 2018 16:43:29 +0900 blackbox: simply update global lastui variable at once
Yuya Nishihara <yuya@tcha.org> [Sun, 11 Nov 2018 16:43:29 +0900] rev 40676
blackbox: simply update global lastui variable at once
Sun, 11 Nov 2018 16:38:43 +0900 blackbox: consolidate conditions for early return
Yuya Nishihara <yuya@tcha.org> [Sun, 11 Nov 2018 16:38:43 +0900] rev 40675
blackbox: consolidate conditions for early return Just pick the lastui only if it is usable.
Sun, 11 Nov 2018 16:34:49 +0900 blackbox: remove redundant check for unassigned repo
Yuya Nishihara <yuya@tcha.org> [Sun, 11 Nov 2018 16:34:49 +0900] rev 40674
blackbox: remove redundant check for unassigned repo Since ui._bbvfs is looked through ui._bbrepo, the repo instance should exist if ui._bbvfs isn't None.
Wed, 14 Nov 2018 10:15:28 -0500 tests: fix bytes/str issue I introduced when adding this test
Augie Fackler <augie@google.com> [Wed, 14 Nov 2018 10:15:28 -0500] rev 40673
tests: fix bytes/str issue I introduced when adding this test # skip-blame just b prefixes for py3 Differential Revision: https://phab.mercurial-scm.org/D5271
Tue, 13 Nov 2018 17:14:47 -0800 shelve: use matcher to restrict prefetch to just the modified files
Kyle Lippincott <spectral@google.com> [Tue, 13 Nov 2018 17:14:47 -0800] rev 40672
shelve: use matcher to restrict prefetch to just the modified files Shelve currently operates by: - make a temp commit - identify all the bases necessary to shelve, put them in the bundle - use exportfile to export the temp commit to the bundle ('file' here means "export to this fd", not "export this file") - remove the temp commit exportfile calls prefetchfiles, and prefetchfiles uses a matcher to restrict what files it's going to prefetch; if it's not provided, it's alwaysmatcher. This means that `hg shelve` in a remotefilelog repo can possibly download the file contents of everything in the repository, even when it doesn't need to. It luckily is restricted to the narrowspec (if there is one), but this is still a lot of downloading that's just unnecessary, especially if there's a "smart" VCS-aware filesystem involved. exportfile is called with exactly one revision to emit, so we're just restricting it to prefetching the files from that revision. The base revisions having separate files should not be a concern since they're handled already; example: commit 10 is draft and modifies foo/a.txt and foo/b.txt commit 11 is draft and modifies foo/a.txt my working directory that I'm shelving modifies foo/b.txt By the time we get to exportfile, commit 10 and 11 are already handled, so the matcher only specifying foo/b.txt does not cause any problems. I verified this by doing an `hg unbundle` on the bundle that shelve produces, and getting the full contents of those commits back out, instead of just the files that were modified in the shelve. Differential Revision: https://phab.mercurial-scm.org/D5268
Tue, 13 Nov 2018 12:32:05 -0800 revlog: automatically read from opened file handles
Gregory Szorc <gregory.szorc@gmail.com> [Tue, 13 Nov 2018 12:32:05 -0800] rev 40671
revlog: automatically read from opened file handles The revlog reading code commonly opens a new file handle for reading on demand. There is support for passing a file handle to revlog.revision(). But it is marked as an internal argument. When revlogs are written, we write() data as it is available. But we don't flush() data until all revisions are written. Putting these two traits together, it is possible for an in-process revlog reader during active writes to trigger the opening of a new file handle on a file with unflushed writes. The reader won't have access to all "available" revlog data (as it hasn't been flushed). And with the introduction of the previous patch, this can lead to the revlog raising an error due to a partial read. I witnessed this behavior when applying changegroup data (via `hg pull`) before issue6006 was fixed via different means. Having this and the previous patch in play would have helped cause errors earlier rather than manifesting as hash verification failures. While this has been a long-standing issue, I believe the relatively new delta computation code has tickled it into being more common. This is because the new delta computation code will compute deltas in more scenarios. This can lead to revlog reading. While the delta computation code is probably supposed to reuse file handles, it appears it isn't doing so in all circumstances. But the issue runs deeper than that. Theoretically, any code can access revision data during revlog writes. It appears we were just getting lucky that it wasn't. (The "add revision callback" passed to addgroup() provides an avenue to do this.) If I changed the revlog's behavior to not cache the full revision text or to clear caches after revision insertion during addgroup(), I was able to produce crashes 100% of the time when writing changelog revisions. This is because changelog's add revision callback attempts to resolve the revision data to access the changed files list. And without the revision's fulltext being cached, we performed a revlog read, which required opening a new file handle. This attempted to read unflushed data, leading to a partial read and a crash. This commit teaches the revlog to store the file handles used for writing multiple revisions during addgroup(). It also teaches the code for resolving a file handle when reading to use these handles, if available. This ensures that *any* reads (regardless of their source) use the active writing file handles, if available. These file handles have access to the unflushed data because they wrote it. This allows reads to complete without issue. Differential Revision: https://phab.mercurial-scm.org/D5267
Tue, 13 Nov 2018 12:30:59 -0800 revlog: detect incomplete revlog reads
Gregory Szorc <gregory.szorc@gmail.com> [Tue, 13 Nov 2018 12:30:59 -0800] rev 40670
revlog: detect incomplete revlog reads _readsegment() is supposed to return N bytes of revlog revision data starting at a file offset. Surprisingly, its behavior before this patch never verified that it actually read and returned N bytes! Instead, it would perform the read(), then return whatever data was available. And even more surprisingly, nothing in the call chain appears to have been validating that it received all the data it was expecting. This behavior could lead to partial or incomplete revision chunks being operated on. This could result in e.g. cached deltas being applied against incomplete base revisions. The delta application process would happily perform this operation. Only hash verification would detect the corruption and save us. This commit changes the behavior of raw revlog reading to validate that we actually read() the number of bytes that were requested. We will raise a more specific error faster, rather than possibly have it go undetected or manifest later in the call stack, at delta application or hash verification. Differential Revision: https://phab.mercurial-scm.org/D5266
Tue, 30 Oct 2018 16:50:05 -0700 revlog: use single file handle when de-inlining revlog
Gregory Szorc <gregory.szorc@gmail.com> [Tue, 30 Oct 2018 16:50:05 -0700] rev 40669
revlog: use single file handle when de-inlining revlog _getsegmentforrevs() will eventually call into _datareadfp() to resolve a file handle to read revision data. If no file handle is passed into _getsegmentforrevs(), it opens a new one. Explicit is better than implicit. This commit changes _enforceinlinesize() to open a file handle explicitly when converting inline revlogs to split revlogs and to pass this file handle into _getsegmentforrevs(). I haven't measured, but this change should improve performance, as we no longer reopen the revlog for reading for every revision in the revlog when it is converted from inline to split. Instead, we open it at most once and use it for the duration of the operation. That being said, I /think/ the chunk cache may mitigate the number of file opens required. Differential Revision: https://phab.mercurial-scm.org/D5265
Tue, 13 Nov 2018 18:44:09 +0300 store: raise ProgrammingError if unable to decode a storage path
Pulkit Goyal <pulkit@yandex-team.ru> [Tue, 13 Nov 2018 18:44:09 +0300] rev 40668
store: raise ProgrammingError if unable to decode a storage path Right now, the function magically return False which is dangerous, so let's raise ProgrammingError. Suggested by Augie in D5139. Differential Revision: https://phab.mercurial-scm.org/D5264
Tue, 13 Nov 2018 23:54:23 -0500 tests: document a known failing interaction between narrow and lfs
Matt Harbison <matt_harbison@yahoo.com> [Tue, 13 Nov 2018 23:54:23 -0500] rev 40667
tests: document a known failing interaction between narrow and lfs This is one of the two remaining aborts I found looking into issue5794. I've got no idea what's wrong with the hook, since the changes there fixed the other two problems noted in that bug report. It seems like it might go away when the narrow issue is fixed, but let's make sure this doesn't get lost. The stacktrace for the hook seems to indicate that the missing file *is* in ctx: remote: Traceback (most recent call last): remote: File "c:\Users\Matt\projects\hg\hgext\lfs\__init__.py", line 253, in checkrequireslfs remote: if any(f in ctx and match(f) and ctx[f].islfs() for f in ctx.files()): remote: File "c:\Users\Matt\projects\hg\hgext\lfs\__init__.py", line 253, in <genexpr> remote: if any(f in ctx and match(f) and ctx[f].islfs() for f in ctx.files()): remote: File "c:\Users\Matt\projects\hg\hgext\lfs\wrapper.py", line 191, in filectxislfs remote: return _islfs(self.filelog(), self.filenode()) remote: File "c:\Users\Matt\projects\hg\mercurial\context.py", line 631, in filenode remote: return self._filenode remote: File "c:\Users\Matt\projects\hg\mercurial\util.py", line 1528, in __get__ remote: result = self.func(obj) remote: File "c:\Users\Matt\projects\hg\mercurial\context.py", line 579, in _filenode remote: return self._filelog.lookup(self._fileid) remote: File "c:\Users\Matt\projects\hg\mercurial\filelog.py", line 68, in lookup remote: self._revlog.indexfile) remote: File "c:\Users\Matt\projects\hg\mercurial\utils\storageutil.py", line 218, in fileidlookup remote: raise error.LookupError(fileid, identifier, _('no match found')) remote: LookupError: data/inside2/f.i@f59b4e021835: no match found
Sun, 11 Nov 2018 12:55:58 +0900 logtoprocess: drop support for ui.log() call with invalid msg arguments (BC)
Yuya Nishihara <yuya@tcha.org> [Sun, 11 Nov 2018 12:55:58 +0900] rev 40666
logtoprocess: drop support for ui.log() call with invalid msg arguments (BC) Before, the logtoprocess extension put a formatted message into $MSG1, and its arguments to $MSG2... If the specified arguments couldn't be formatted because of a caller bug, an unformatted message was passed in to $MSG1 instead of exploding. This behavior doesn't make sense. Since I'm planning to formalize the ui.log() interface such that we'll no longer have to extend the ui class, I want to remove any features not conforming to the ui.log() API. So this patch removes the support for ill-formed arguments, and $MSG{n} (where n > 1) parameters which seems useless as long as the message can be formatted. The $MSG1 variable isn't renamed for the maximum compatibility. In future patches, a formatted msg will be passed to a processlogger object, instead of overriding the ui.log() function. .. bc:: The logtoprocess extension no longer supports invalid ``ui.log()`` arguments. A log message is always formatted and passed in to the ``$MSG1`` environment variable.
Sun, 11 Nov 2018 12:35:38 +0900 py3: byte-stringify inline extension in test-logtoprocess.t
Yuya Nishihara <yuya@tcha.org> [Sun, 11 Nov 2018 12:35:38 +0900] rev 40665
py3: byte-stringify inline extension in test-logtoprocess.t
Sun, 11 Nov 2018 12:33:14 +0900 logtoprocess: rewrite dict building in py3-compatible way
Yuya Nishihara <yuya@tcha.org> [Sun, 11 Nov 2018 12:33:14 +0900] rev 40664
logtoprocess: rewrite dict building in py3-compatible way
Sun, 11 Nov 2018 12:27:23 +0900 logtoprocess: leverage procutil.shellenviron() to stringify variables (BC)
Yuya Nishihara <yuya@tcha.org> [Sun, 11 Nov 2018 12:27:23 +0900] rev 40663
logtoprocess: leverage procutil.shellenviron() to stringify variables (BC) This should make the extension more Py3 friendly. The environment variables of the main process are copied to the dict by shellenviron(). .. bc:: Boolean options passed to the logtoprocess extension are now formatted as ``0`` or ``1`` instead of ``None``, ``False``, or ``True``.
Tue, 13 Nov 2018 22:15:30 +0900 templater: check invalid use of list expression properly (issue5920)
Yuya Nishihara <yuya@tcha.org> [Tue, 13 Nov 2018 22:15:30 +0900] rev 40662
templater: check invalid use of list expression properly (issue5920) The error message is still cryptic, but it should be better.
Tue, 13 Nov 2018 18:08:55 +0300 py3: add b suffix to make sure file is opened in bytes mode
Pulkit Goyal <pulkit@yandex-team.ru> [Tue, 13 Nov 2018 18:08:55 +0300] rev 40661
py3: add b suffix to make sure file is opened in bytes mode Differential Revision: https://phab.mercurial-scm.org/D5263
Tue, 13 Nov 2018 18:08:17 +0300 py3: don't use dict.iterkeys()
Pulkit Goyal <pulkit@yandex-team.ru> [Tue, 13 Nov 2018 18:08:17 +0300] rev 40660
py3: don't use dict.iterkeys() dict.iterkeys() is not present on Python 3. Differential Revision: https://phab.mercurial-scm.org/D5262
Tue, 13 Nov 2018 18:07:21 +0300 py3: use node.hex(h.digest()) instead of h.hexdigest()
Pulkit Goyal <pulkit@yandex-team.ru> [Tue, 13 Nov 2018 18:07:21 +0300] rev 40659
py3: use node.hex(h.digest()) instead of h.hexdigest() hashlib.sha1.hexdigest() returns str on Python 3. Differential Revision: https://phab.mercurial-scm.org/D5261
Tue, 13 Nov 2018 17:41:54 +0300 py3: make second argument of fdopen() a str
Pulkit Goyal <pulkit@yandex-team.ru> [Tue, 13 Nov 2018 17:41:54 +0300] rev 40658
py3: make second argument of fdopen() a str # skip-blame as just r'' prefixes Differential Revision: https://phab.mercurial-scm.org/D5260
Tue, 13 Nov 2018 17:41:26 +0300 py3: fix keyword arguments handling in hgext/remotefilelog/
Pulkit Goyal <pulkit@yandex-team.ru> [Tue, 13 Nov 2018 17:41:26 +0300] rev 40657
py3: fix keyword arguments handling in hgext/remotefilelog/ Keys of kwargs on Python 3 should be strings. This patch fixes them by appending r'' prefixes, and using pycompat.byteskwargs() and pycompat.strkwargs(). Differential Revision: https://phab.mercurial-scm.org/D5259
Sat, 13 Oct 2018 05:09:18 +0300 py3: add __pycache__ to .hgignore
Pulkit Goyal <pulkit@yandex-team.ru> [Sat, 13 Oct 2018 05:09:18 +0300] rev 40656
py3: add __pycache__ to .hgignore Something changed with Python 3 just like million on things. Maybe they should named Python 3 as anaconda or cobra instead of just increasing the version number. This makes test-custom-filters.t pass on Python 3. Differential Revision: https://phab.mercurial-scm.org/D5039
Thu, 08 Nov 2018 16:07:16 +0100 sparse-revlog: stop using a heap to track selected gap
Boris Feld <boris.feld@octobus.net> [Thu, 08 Nov 2018 16:07:16 +0100] rev 40655
sparse-revlog: stop using a heap to track selected gap Same logic as for 'gapsheap', we don't actually need a heap.
Thu, 08 Nov 2018 16:01:30 +0100 sparse-revlog: stop using a heap to track gaps
Boris Feld <boris.feld@octobus.net> [Thu, 08 Nov 2018 16:01:30 +0100] rev 40654
sparse-revlog: stop using a heap to track gaps The heap doesn't bring any performance advantage as we can simply sort the final list. Moreover, the lesser complexity helps a lot when we later implement it in C.
Thu, 08 Nov 2018 15:29:58 +0100 sparse-revlog: fast-path before computing payload size
Boris Feld <boris.feld@octobus.net> [Thu, 08 Nov 2018 15:29:58 +0100] rev 40653
sparse-revlog: fast-path before computing payload size In this fast-path case, we do not need to compute the full delta chain payload. Since it comes with a significant cost, we avoid doing so if possible.
Tue, 16 Oct 2018 14:46:28 +0200 sparse-revlog: drop unused deltainfo parameter from segmentspan
Boris Feld <boris.feld@octobus.net> [Tue, 16 Oct 2018 14:46:28 +0200] rev 40652
sparse-revlog: drop unused deltainfo parameter from segmentspan We no longer need to deal with slicing logic including uncommitted revision. We drop the associated code.
Tue, 16 Oct 2018 14:43:51 +0200 sparse-revlog: drop unused deltainfo parameter from _slicechunktodensity
Boris Feld <boris.feld@octobus.net> [Tue, 16 Oct 2018 14:43:51 +0200] rev 40651
sparse-revlog: drop unused deltainfo parameter from _slicechunktodensity We no longer need to deal with slicing logic including uncommitted revision. We drop the associated code.
Mon, 15 Oct 2018 15:45:08 +0200 sparse-revlog: skip the span check in the sparse-revlog case
Boris Feld <boris.feld@octobus.net> [Mon, 15 Oct 2018 15:45:08 +0200] rev 40650
sparse-revlog: skip the span check in the sparse-revlog case This significantly improves the performance on unbundling on smaller repositories. Mercurial: unbundling 1K revisions no-sparse-revlog: 500 ms sparse-revlog-before: 689 ms sparse-revlog-after: 484 ms Pypy: unbundling 1K revisions no-sparse-revlog: 1.242 s sparse-revlog-before: 1.135 s sparse-revlog-after: 0.860 s NetBeans: unbundling 1K revisions no-sparse-revlog: 1.386 s sparse-revlog-before: 2.368 s sparse-revlog-after: 1.191 s Mozilla: unbundling 1K revisions no-sparse-revlog: 3.103 s sparse-revlog-before: 3.367 s sparse-revlog-after: 3.093 s
Wed, 17 Oct 2018 17:15:42 -0400 histedit: import chistedit curses UI from hg-experimental
Augie Fackler <augie@google.com> [Wed, 17 Oct 2018 17:15:42 -0400] rev 40649
histedit: import chistedit curses UI from hg-experimental I don't tend to like curses interfaces, but this gets enough use at work that it seems like it's worth bringing into core. This is a minimal import from hg-experimental revision 4c7f33bf5f00, in that I've done the smallest amount of code movement and editing in order to import the functionality. .. feature:: `hg histedit` will now present a curses UI if curses is available and `ui.interface` or `ui.interface.histedit` is set to `curses`. Differential Revision: https://phab.mercurial-scm.org/D5146
Mon, 12 Nov 2018 20:32:58 -0500 manifest: perform cheap checks before potentially allocating memory
Augie Fackler <augie@google.com> [Mon, 12 Nov 2018 20:32:58 -0500] rev 40648
manifest: perform cheap checks before potentially allocating memory Differential Revision: https://phab.mercurial-scm.org/D5258
Mon, 12 Nov 2018 20:31:57 -0500 manifest: also reject obviously-too-short lines when parsing lines
Augie Fackler <augie@google.com> [Mon, 12 Nov 2018 20:31:57 -0500] rev 40647
manifest: also reject obviously-too-short lines when parsing lines Differential Revision: https://phab.mercurial-scm.org/D5257
Mon, 12 Nov 2018 20:35:22 -0500 manifest: make sure there's a filename before bothering to look for newline
Augie Fackler <augie@google.com> [Mon, 12 Nov 2018 20:35:22 -0500] rev 40646
manifest: make sure there's a filename before bothering to look for newline There's no valid manifest that would have no characters before the NUL byte on a line, and this fixes some erratic timeouts in the fuzzer. Differential Revision: https://phab.mercurial-scm.org/D5256
Tue, 06 Nov 2018 11:12:56 -0500 revlog: replace PyInt_AS_LONG with a more portable helper function
Augie Fackler <augie@google.com> [Tue, 06 Nov 2018 11:12:56 -0500] rev 40645
revlog: replace PyInt_AS_LONG with a more portable helper function PyInt_AS_LONG disappears on Python, and our previous #define was producing some problems on Python 3. Let's give up and make an inline helper function that makes this more sane. Differential Revision: https://phab.mercurial-scm.org/D5235
Mon, 12 Nov 2018 22:51:36 +0900 help: document weird behavior of uisetup()
Yuya Nishihara <yuya@tcha.org> [Mon, 12 Nov 2018 22:51:36 +0900] rev 40644
help: document weird behavior of uisetup() While refactoring ui.log() API, it was really annoying that uisetup() is actually an extsetup() the phase 1. Let's document that. I'm planning to add another uisetup() which is called per ui instance, though I can't think of a good name for it.
Mon, 12 Nov 2018 22:26:24 +0900 help: merge section about uisetup() and extsetup()
Yuya Nishihara <yuya@tcha.org> [Mon, 12 Nov 2018 22:26:24 +0900] rev 40643
help: merge section about uisetup() and extsetup() They are technically the same callback, called only once per process. The section name "ui setup" is confusing, so shouldn't be used.
Mon, 12 Nov 2018 21:28:54 +0900 help: add internals.extensions topic
Yuya Nishihara <yuya@tcha.org> [Mon, 12 Nov 2018 21:28:54 +0900] rev 40642
help: add internals.extensions topic I think it's better to include the API overview in core as we now have the internals section in our help system. Retrieved from the wiki, and formatted as reST. Several wiki links are removed since they are invalid in the help. The sections about example extension are removed at all as they seemed too verbose. https://www.mercurial-scm.org/wiki/WritingExtensions
Sun, 04 Nov 2018 12:51:14 +0900 commandserver: send raw progress information to message channel
Yuya Nishihara <yuya@tcha.org> [Sun, 04 Nov 2018 12:51:14 +0900] rev 40641
commandserver: send raw progress information to message channel This is pretty basic implementation to support GUI progress bar.
Sun, 04 Nov 2018 12:38:49 +0900 commandserver: make getpass() request distinct from normal prompt
Yuya Nishihara <yuya@tcha.org> [Sun, 04 Nov 2018 12:38:49 +0900] rev 40640
commandserver: make getpass() request distinct from normal prompt Otherwise, GUI clients would have to parse the prompt text.
Sun, 04 Nov 2018 12:17:20 +0900 commandserver: attach prompt default and choices to message
Yuya Nishihara <yuya@tcha.org> [Sun, 04 Nov 2018 12:17:20 +0900] rev 40639
commandserver: attach prompt default and choices to message These attributes are important to provide a GUI prompt to user.
Thu, 08 Nov 2018 22:25:04 +0900 test-commandserver: clean up quoting and location of dbgui extension
Yuya Nishihara <yuya@tcha.org> [Thu, 08 Nov 2018 22:25:04 +0900] rev 40638
test-commandserver: clean up quoting and location of dbgui extension This helps embedding '$' in the script.
Sun, 18 Jan 2015 17:55:28 +0900 ui: extract helpers to write message with type or label
Yuya Nishihara <yuya@tcha.org> [Sun, 18 Jan 2015 17:55:28 +0900] rev 40637
ui: extract helpers to write message with type or label This provides a 'type' attribute to command-server clients, which seems more solid than relying on 'ui.<type>' labels. In future patches, type='progress' will be added to send raw progress information.
Sun, 18 Jan 2015 18:49:59 +0900 commandserver: add experimental option to use separate message channel
Yuya Nishihara <yuya@tcha.org> [Sun, 18 Jan 2015 18:49:59 +0900] rev 40636
commandserver: add experimental option to use separate message channel This is loosely based on the idea of the TortoiseHg's pipeui extension, which attaches ui.label to message text so the command-server client can capture prompt text, for example. https://bitbucket.org/tortoisehg/thg/src/4.7.2/tortoisehg/util/pipeui.py I was thinking that this functionality could be generalized to templating, but changed mind as doing template stuff would be unnecessarily complex. It's merely a status message, a simple serialization option should suffice. Since this slightly changes the command-server protocol, it's gated by a config knob. If the config is enabled, and if it's supported by the server, "message-encoding: <name>" is advertised so the client can stop parsing 'o'/'e' channel data and read encoded messages from the 'm' channel. As we might add new message encodings in future releases, client can specify a list of encoding names in preferred order. This patch includes 'cbor' encoding as example. Perhaps, 'json' should be supported as well.
Wed, 07 Nov 2018 22:37:51 +0900 commandserver: fix reference before assignment error in pipeservice cleanup
Yuya Nishihara <yuya@tcha.org> [Wed, 07 Nov 2018 22:37:51 +0900] rev 40635
commandserver: fix reference before assignment error in pipeservice cleanup Spotted by the next patch.
Sun, 18 Jan 2015 18:43:23 +0900 dispatch: pass around ui.fmsg channel
Yuya Nishihara <yuya@tcha.org> [Sun, 18 Jan 2015 18:43:23 +0900] rev 40634
dispatch: pass around ui.fmsg channel This will be set by the command server. See the next patch.
Sat, 10 Nov 2018 12:01:21 +0900 test-subrepo: document why share magically works even if subrepos are missing
Yuya Nishihara <yuya@tcha.org> [Sat, 10 Nov 2018 12:01:21 +0900] rev 40633
test-subrepo: document why share magically works even if subrepos are missing I was confused how it's working while reviewing fb490d798be0, "share: reload repo after adjusting it in postshare()."
Sun, 11 Nov 2018 14:13:08 -0500 packaging: add Fedora 29 target
Augie Fackler <raf@durin42.com> [Sun, 11 Nov 2018 14:13:08 -0500] rev 40632
packaging: add Fedora 29 target Differential Revision: https://phab.mercurial-scm.org/D5254
Sat, 10 Nov 2018 11:52:32 +0900 store: pass in decoded filename to narrow matcher
Yuya Nishihara <yuya@tcha.org> [Sat, 10 Nov 2018 11:52:32 +0900] rev 40631
store: pass in decoded filename to narrow matcher
Sat, 10 Nov 2018 11:47:36 +0900 test-narrow-clone-stream: include no usefncache case which is broken
Yuya Nishihara <yuya@tcha.org> [Sat, 10 Nov 2018 11:47:36 +0900] rev 40630
test-narrow-clone-stream: include no usefncache case which is broken Since 9aeb9e2d28a7, encoded filenames are filtered by the narrow matcher, which is clearly wrong.
Sat, 10 Nov 2018 11:36:22 +0900 test-narrow-clone-stream: include uppercase letter in filename
Yuya Nishihara <yuya@tcha.org> [Sat, 10 Nov 2018 11:36:22 +0900] rev 40629
test-narrow-clone-stream: include uppercase letter in filename This makes encoded filenames differ from the original names.
Sat, 10 Nov 2018 13:37:18 -0500 phase: use the `phases.cmdphasenames` constant to walk available command flags
Matt Harbison <matt_harbison@yahoo.com> [Sat, 10 Nov 2018 13:37:18 -0500] rev 40628
phase: use the `phases.cmdphasenames` constant to walk available command flags This reverts 1ea6772fb415.
Fri, 09 Nov 2018 23:19:53 -0500 phases: add a list of names usable by the phase command
Matt Harbison <matt_harbison@yahoo.com> [Fri, 09 Nov 2018 23:19:53 -0500] rev 40627
phases: add a list of names usable by the phase command This is useful in TortoiseHg for example, which has until recently just added all names in the `phasenames` list to the context menu that changes the phase. The ones not supported by the command would just error out.
Wed, 07 Nov 2018 19:59:38 +0100 transaction: display data about why the transaction failed to rollback
Boris Feld <boris.feld@octobus.net> [Wed, 07 Nov 2018 19:59:38 +0100] rev 40626
transaction: display data about why the transaction failed to rollback We saw more of these a while back. Having more data available would be nice.
Sat, 10 Nov 2018 12:07:26 +0900 merge with stable
Yuya Nishihara <yuya@tcha.org> [Sat, 10 Nov 2018 12:07:26 +0900] rev 40625
merge with stable
Fri, 09 Nov 2018 10:47:24 -0800 remotefilelog: avoid accessing repo instance after dispatch
Martin von Zweigbergk <martinvonz@google.com> [Fri, 09 Nov 2018 10:47:24 -0800] rev 40624
remotefilelog: avoid accessing repo instance after dispatch Upstream commit c5e6c1ba1c79 (hg: don't reuse repo instance after unshare(), 2018-09-12) poisoned the repo instance after unshare(). That made `hg unshare` fail with remotefilelog because we tried to close the fileserverclient after dispatch by accessing it via the repo. This patch fixes that by storing the reference to the fileserverclient at the beginning of dispatch. An analogous patch was sent for remotefilelog version in FB's hg-experimental as D5246. Differential Revision: https://phab.mercurial-scm.org/D5253
Fri, 09 Nov 2018 11:28:05 -0800 share: avoid a now-unnecessary reload of the repo
Martin von Zweigbergk <martinvonz@google.com> [Fri, 09 Nov 2018 11:28:05 -0800] rev 40623
share: avoid a now-unnecessary reload of the repo hg.share() now returns an already-reloaded repo, so let's just use that. (This would have failed test-subrepo-recursion.t without the previous patch.) Differential Revision: https://phab.mercurial-scm.org/D5252
Fri, 09 Nov 2018 10:46:02 -0800 share: reload repo after adjusting it in postshare()
Martin von Zweigbergk <martinvonz@google.com> [Fri, 09 Nov 2018 10:46:02 -0800] rev 40622
share: reload repo after adjusting it in postshare() When sharing a repo that's using remotefilelog, the update that happens at the end of the `hg share` call does not see the remote repo path that's copied in hg.postshare(). This patch reloads the repo after hg.postshare() to address that. This changes a subrepo test case. Note that `hg share -U; hg co tip` worked there before, so I don't see see why `hg share` should fail. I also don't know what a "locally referenced subrepo". So maybe this is fixing a bug? Hopefully it's not breaking something someone actually cares about at least. Maybe someone who knows and cares about subrepos can review this. Differential Revision: https://phab.mercurial-scm.org/D5251
Fri, 09 Nov 2018 09:36:16 -0800 tests: don't load strip extension via mq extension for remotefilelog tests
Martin von Zweigbergk <martinvonz@google.com> [Fri, 09 Nov 2018 09:36:16 -0800] rev 40621
tests: don't load strip extension via mq extension for remotefilelog tests The proper way to get the `hg strip` command has been via the "strip" extension since 2013. Differential Revision: https://phab.mercurial-scm.org/D5250
Fri, 09 Nov 2018 09:35:05 -0800 remotefilelog: remove unused configs for {data,history}pack version
Martin von Zweigbergk <martinvonz@google.com> [Fri, 09 Nov 2018 09:35:05 -0800] rev 40620
remotefilelog: remove unused configs for {data,history}pack version Differential Revision: https://phab.mercurial-scm.org/D5249
Fri, 09 Nov 2018 09:27:37 -0800 tests: remove obsolete PYTHONPATH override from remotefilelog tests
Martin von Zweigbergk <martinvonz@google.com> [Fri, 09 Nov 2018 09:27:37 -0800] rev 40619
tests: remove obsolete PYTHONPATH override from remotefilelog tests They were added in https://bitbucket.org/facebook/hg-experimental/commits/fdcad37a6a68cfbaf5920f3eeaa0cc9cae42bd26, which says this: When remotefilelog moved from its own repo, the tests needed to be updated to adjust the PYTHONPATH to ensure the in-repo remotefilelog was loaded instead of the system one. This meant any local runs of remotefilelog tests would've been using the system remotefilelog unless the user had manually set the PYTHONPATH themselves. That doesn't seem relevant with remotefilelog in core. Differential Revision: https://phab.mercurial-scm.org/D5248
Fri, 09 Nov 2018 08:19:08 -0800 tests: drop obsolete "hginit" alias in remotefilelog tests
Martin von Zweigbergk <martinvonz@google.com> [Fri, 09 Nov 2018 08:19:08 -0800] rev 40618
tests: drop obsolete "hginit" alias in remotefilelog tests Differential Revision: https://phab.mercurial-scm.org/D5247
Thu, 08 Nov 2018 12:35:26 -0800 fix: add extra field to fixed revisions to avoid creating obsolescence cycles
Danny Hooper <hooper@google.com> [Thu, 08 Nov 2018 12:35:26 -0800] rev 40617
fix: add extra field to fixed revisions to avoid creating obsolescence cycles The extra field prevents sequential invocations of fix from producing the same hash twice. Previously, this could cause problems because it would create an obsolescence cycle instead of the expected new successor. This change also adds an explicit check for whether a new revision should be committed. Until now, the code relied on memctx.commit() to quietly do nothing if the node already exists. Because of the new extra field, this no longer covers the case where we don't want to replace an unchanged node. Differential Revision: https://phab.mercurial-scm.org/D5245
Thu, 08 Nov 2018 12:29:56 -0800 cleanup: use revision numbers instead of hashes in test output
Danny Hooper <hooper@google.com> [Thu, 08 Nov 2018 12:29:56 -0800] rev 40616
cleanup: use revision numbers instead of hashes in test output This allows changes to the hashes produced by fix to not needlessly modify this area of the test. Differential Revision: https://phab.mercurial-scm.org/D5244
Wed, 07 Nov 2018 15:42:56 -0800 tests: make the commands.resolve.confirm tests not pollute the test-wide hgrc
Kyle Lippincott <spectral@google.com> [Wed, 07 Nov 2018 15:42:56 -0800] rev 40615
tests: make the commands.resolve.confirm tests not pollute the test-wide hgrc I want to add tests after these tests that create a new repo and use it, and was confused for a bit as to why they were seeing different behavior than I expected. Differential Revision: https://phab.mercurial-scm.org/D5242
Wed, 07 Nov 2018 15:41:18 -0800 tests: fix a couple typos in test-resolve.t comments and add a comment
Kyle Lippincott <spectral@google.com> [Wed, 07 Nov 2018 15:41:18 -0800] rev 40614
tests: fix a couple typos in test-resolve.t comments and add a comment Differential Revision: https://phab.mercurial-scm.org/D5241
Tue, 06 Nov 2018 15:50:41 -0800 fix: add suboption for configuring execution order of tools
Danny Hooper <hooper@google.com> [Tue, 06 Nov 2018 15:50:41 -0800] rev 40613
fix: add suboption for configuring execution order of tools This could be accomplished by using wrapper scripts, but that would diminish the usefulness of the incremental formatting logic. Configuring execution order along with other things in the hgrc is probably more convenient anyway. This change highlights some awkwardness with suboptions and default values, which should be addressed separately. Differential Revision: https://phab.mercurial-scm.org/D5237
Wed, 07 Nov 2018 14:21:39 -0500 tests: fix up some import statements caught by Python 3
Augie Fackler <augie@google.com> [Wed, 07 Nov 2018 14:21:39 -0500] rev 40612
tests: fix up some import statements caught by Python 3 I'm curious how the import checker manages to be so much more pedantic in Python 3, but not enough to bother exploring. Differential Revision: https://phab.mercurial-scm.org/D5240
Wed, 07 Nov 2018 10:29:38 -0800 tests: replace `tac` reimplementation by `sort -r`
Martin von Zweigbergk <martinvonz@google.com> [Wed, 07 Nov 2018 10:29:38 -0800] rev 40611
tests: replace `tac` reimplementation by `sort -r` `sort -r` is better code "formatter" than `tac` since it's stable. It's also portable so we don't need to reimplement it in Python. Differential Revision: https://phab.mercurial-scm.org/D5239
Wed, 07 Nov 2018 12:15:36 -0500 tests: work around `tac` not being portable
Augie Fackler <augie@google.com> [Wed, 07 Nov 2018 12:15:36 -0500] rev 40610
tests: work around `tac` not being portable Introduce a tac.py helper and use it. Sigh. Differential Revision: https://phab.mercurial-scm.org/D5238
Tue, 06 Nov 2018 11:22:16 -0500 revlog: give formatting to clang-format
Augie Fackler <augie@google.com> [Tue, 06 Nov 2018 11:22:16 -0500] rev 40609
revlog: give formatting to clang-format This has two lines that are poorly formatted, both right after PyObject_HEAD macros. It's possible that in the future there will be a feature to tell clang-format that a token includes an end-of-line character (in this case the ;), but for now I'm willing to live with two poorly-formatted lines in a struct definition in exchange for not thinking about how this file is formatted. Differential Revision: https://phab.mercurial-scm.org/D5234
Tue, 06 Nov 2018 11:19:35 -0500 revlog: add blank line in comment to help clang-format
Augie Fackler <augie@google.com> [Tue, 06 Nov 2018 11:19:35 -0500] rev 40608
revlog: add blank line in comment to help clang-format Differential Revision: https://phab.mercurial-scm.org/D5233
Tue, 06 Nov 2018 11:18:12 -0500 revlog: add a comment to help clang-format produce less-awful results
Augie Fackler <augie@google.com> [Tue, 06 Nov 2018 11:18:12 -0500] rev 40607
revlog: add a comment to help clang-format produce less-awful results Differential Revision: https://phab.mercurial-scm.org/D5232
Tue, 06 Nov 2018 11:52:41 -0500 py3: ratchet caught two more passing tests
Augie Fackler <augie@google.com> [Tue, 06 Nov 2018 11:52:41 -0500] rev 40606
py3: ratchet caught two more passing tests Differential Revision: https://phab.mercurial-scm.org/D5236
Mon, 05 Nov 2018 15:57:31 +0100 perf: add a lazydeltabase option to perfrevlogwrite
Boris Feld <boris.feld@octobus.net> [Mon, 05 Nov 2018 15:57:31 +0100] rev 40605
perf: add a lazydeltabase option to perfrevlogwrite The option controls if we'll test the provided delta first. This is the current default behavior for unbundle.
Mon, 05 Nov 2018 15:24:09 +0100 perf: add `storage` as possible source for perfrevlogwrite
Boris Feld <boris.feld@octobus.net> [Mon, 05 Nov 2018 15:24:09 +0100] rev 40604
perf: add `storage` as possible source for perfrevlogwrite This source will use the stored delta.
Mon, 05 Nov 2018 15:19:44 +0100 perf: add `parent-smallest` as possible source for perfrevlogwrite
Boris Feld <boris.feld@octobus.net> [Mon, 05 Nov 2018 15:19:44 +0100] rev 40603
perf: add `parent-smallest` as possible source for perfrevlogwrite This source will use the smallest of the possible diff against parent.
Mon, 05 Nov 2018 15:15:18 +0100 perf: add `parent-2` as possible source for perfrevlogwrite
Boris Feld <boris.feld@octobus.net> [Mon, 05 Nov 2018 15:15:18 +0100] rev 40602
perf: add `parent-2` as possible source for perfrevlogwrite This source will use a diff against p2 if it exists and fall back to p1 otherwise.
Mon, 05 Nov 2018 15:15:02 +0100 perf: add `parent-1` as possible source for perfrevlogwrite
Boris Feld <boris.feld@octobus.net> [Mon, 05 Nov 2018 15:15:02 +0100] rev 40601
perf: add `parent-1` as possible source for perfrevlogwrite This source will use a diff against p1 in all case.
Fri, 19 Oct 2018 17:23:29 +0200 perf: add the notion of "source" to perfrevlogwrite
Boris Feld <boris.feld@octobus.net> [Fri, 19 Oct 2018 17:23:29 +0200] rev 40600
perf: add the notion of "source" to perfrevlogwrite We want to test performance associated witch various way to add a new revision. They will be specified using this new argument.
Tue, 06 Nov 2018 00:57:34 +0100 perf: only display the total time for perfrevlogwrite if quiet
Boris Feld <boris.feld@octobus.net> [Tue, 06 Nov 2018 00:57:34 +0100] rev 40599
perf: only display the total time for perfrevlogwrite if quiet This provide a simple way to get an overview of the total performance.
Wed, 03 Oct 2018 11:04:57 +0200 perf: offer full details in perfrevlogwrite
Boris Feld <boris.feld@octobus.net> [Wed, 03 Oct 2018 11:04:57 +0200] rev 40598
perf: offer full details in perfrevlogwrite This will be useful for people who want to study the timing pattern more closely.
Wed, 03 Oct 2018 10:53:29 +0200 perf: introduce a perfrevlogwrite command
Boris Feld <boris.feld@octobus.net> [Wed, 03 Oct 2018 10:53:29 +0200] rev 40597
perf: introduce a perfrevlogwrite command The command record times taken by adding many revisions to a revlog. Timing each addition, individually. The "added revision" are recreations of the original ones. To time each addition individually, we have to handle the timing and the reporting ourselves. This command is introduced to track the impact of sparse-revlog format on delta computations at initial storage time. It starts with the full text, a situation similar to the "commit". Additions from an existing delta are better timed with bundles. The complaints from `check-perf-code.py` are not relevant. We are accessing and "revlog" opener, not a repository opener.
Tue, 06 Nov 2018 10:41:00 -0500 tests: fix config knob in test-narrow-clone-stream.t
Augie Fackler <augie@google.com> [Tue, 06 Nov 2018 10:41:00 -0500] rev 40596
tests: fix config knob in test-narrow-clone-stream.t Two patches landed in parallel and had a semantic conflict. This resolves the mess and leaves us with passing tests. Differential Revision: https://phab.mercurial-scm.org/D5231
Tue, 06 Nov 2018 10:26:33 -0500 remotefilelog: fix various whitespace issues in docstring
Augie Fackler <augie@google.com> [Tue, 06 Nov 2018 10:26:33 -0500] rev 40595
remotefilelog: fix various whitespace issues in docstring Differential Revision: https://phab.mercurial-scm.org/D5230
Sat, 03 Nov 2018 19:42:50 +0900 ui: add config knob to redirect status messages to stderr (API)
Yuya Nishihara <yuya@tcha.org> [Sat, 03 Nov 2018 19:42:50 +0900] rev 40594
ui: add config knob to redirect status messages to stderr (API) This option can be used to isolate structured output from status messages. For now, "stdio" (stdout/err pair) and "stderr" are supported. In future patches, I'll add the "channel" option which will send status messages to a separate command-server channel with some metadata attached, maybe in CBOR encoding. This is a part of the generic templating plan: https://www.mercurial-scm.org/wiki/GenericTemplatingPlan#Sanity_check_output .. api:: Status messages may be sent to a dedicated stream depending on configuration. Don't use ``ui.status()``, etc. as a shorthand for conditional writes. Use ``ui.write()`` for data output.
Sat, 03 Nov 2018 20:53:31 +0900 ui: hide fin/fout/ferr attributes behind @property functions
Yuya Nishihara <yuya@tcha.org> [Sat, 03 Nov 2018 20:53:31 +0900] rev 40593
ui: hide fin/fout/ferr attributes behind @property functions This allows keeping references to fout/ferr/fin which are updated when these properties are changed. See the next patch.
Sun, 18 Jan 2015 17:42:53 +0900 ui: label prompt and echo messages
Yuya Nishihara <yuya@tcha.org> [Sun, 18 Jan 2015 17:42:53 +0900] rev 40592
ui: label prompt and echo messages I'm going to add a dedicated command-server channel for status messages, which carries metadata alongside a message text. 'ui.*' label provides a hint how message text should be processed.
Sat, 03 Nov 2018 18:17:30 +0900 ui: add inner function to select write destination
Yuya Nishihara <yuya@tcha.org> [Sat, 03 Nov 2018 18:17:30 +0900] rev 40591
ui: add inner function to select write destination I'm going to add a config knob to redirect any status messages to stderr. This function helps to switch underlying file objects. # no-check-commit because of existing write_err() function
Sat, 03 Nov 2018 18:04:22 +0900 ui: remove _write() and _write_err() functions
Yuya Nishihara <yuya@tcha.org> [Sat, 03 Nov 2018 18:04:22 +0900] rev 40590
ui: remove _write() and _write_err() functions
Sat, 03 Nov 2018 18:03:09 +0900 ui: move pre/post processes from low-level write()s to _writenobuf()
Yuya Nishihara <yuya@tcha.org> [Sat, 03 Nov 2018 18:03:09 +0900] rev 40589
ui: move pre/post processes from low-level write()s to _writenobuf() This helps adding a dedicated stream for status/error messages. I don't want to add _write*() function per stream.
Sat, 03 Nov 2018 17:56:17 +0900 ui: pass in file object to _writenobuf()
Yuya Nishihara <yuya@tcha.org> [Sat, 03 Nov 2018 17:56:17 +0900] rev 40588
ui: pass in file object to _writenobuf() See the subsequent patches for why. The "if" block in _writenobuf() will be removed soon.
Mon, 05 Nov 2018 17:24:39 +0100 perf: fix perfrevlogrevisions --reverse
Boris Feld <boris.feld@octobus.net> [Mon, 05 Nov 2018 17:24:39 +0100] rev 40587
perf: fix perfrevlogrevisions --reverse Currently, 'endrev' equals `len(revlog)`, a revision that does not exist. When asking for the reverse order, the arguments passed to xrange are `xrange(len(revlog), startrev)` which then crash. We need to offset 'endrev' by one so we don't crash anymore. Also, we offset 'startrev' to ensure we get the same number of revisions with and without the `--reverse` option. Differential Revision: https://phab.mercurial-scm.org/D5228
Tue, 06 Nov 2018 11:54:15 +0100 procutil: import concerns about creationflags on Windows from D1701
Boris Feld <boris.feld@octobus.net> [Tue, 06 Nov 2018 11:54:15 +0100] rev 40586
procutil: import concerns about creationflags on Windows from D1701 I don't have the need anymore for the change in D1701 nor the time to investigate the changes on all supported Windows platforms. I import the stuff I learned on D1701 in the `runbgcommand` so the next people working on it can starts from there. Differential Revision: https://phab.mercurial-scm.org/D5229
Mon, 05 Nov 2018 14:14:32 -0800 localrepo: extract loading of hgrc files to standalone function
Gregory Szorc <gregory.szorc@gmail.com> [Mon, 05 Nov 2018 14:14:32 -0800] rev 40585
localrepo: extract loading of hgrc files to standalone function Various 3rd party extensions supplement where per-repo config data lives. Looking at their sources, they resort to unorthodox means to inject the config data. And the way they do it is susceptible to corner cases. e.g. not processing automatic extension loads, not reacting to new or disabled extensions in configs, etc. This commit extracts the core logic of loading hgrc files into a standalone function so there is a clear function that can be monkeypatched to inject per-repo config data at repository open time. Differential Revision: https://phab.mercurial-scm.org/D5221
Mon, 05 Nov 2018 09:09:48 -0800 revsets: make bookmark/named('re:nonexistent') not abort (issue6018) (BC)
Martin von Zweigbergk <martinvonz@google.com> [Mon, 05 Nov 2018 09:09:48 -0800] rev 40584
revsets: make bookmark/named('re:nonexistent') not abort (issue6018) (BC) Foozy documented the differences between revsets branch(), tag(), bookmark(), and named() in eeb5d5ab14a6 (revset: raise RepoLookupError to make present() predicate continue the query, 2015-01-31). He seemed to want tag() to change behavior to not error out on non-matching regular expressions. I think it's instead bookmark() and named() that should not error out. So that's what this patch does. Differential Revision: https://phab.mercurial-scm.org/D5220
Mon, 05 Nov 2018 16:05:45 -0800 fix: rename :fileset subconfig to :pattern
Danny Hooper <hooper@google.com> [Mon, 05 Nov 2018 16:05:45 -0800] rev 40583
fix: rename :fileset subconfig to :pattern This name was always inaccurate, since the config accepts any pattern. Hopefully so few people use this right now that it won't matter, but there will now be a warning if the old config name is used. Differential Revision: https://phab.mercurial-scm.org/D5226
Wed, 31 Oct 2018 13:11:51 -0700 fix: add a config to abort when a fixer tool fails
Danny Hooper <hooper@google.com> [Wed, 31 Oct 2018 13:11:51 -0700] rev 40582
fix: add a config to abort when a fixer tool fails This allows users to stop and address tool failures before proceeding, instead of the default behavior of continuing to apply any tools that didn't fail. For example, a code formatting tool could fail if you have syntax errors, and you might want your repo to stay in its current state while you fix the syntax error before re-running 'hg fix'. It's conceivable that this would even be necessary for the correctness of some fixer tools across a chain of revisions. Differential Revision: https://phab.mercurial-scm.org/D5200
Tue, 06 Nov 2018 11:05:13 +0100 perf: measure slicing time in perfrevlogrevision
Boris Feld <boris.feld@octobus.net> [Tue, 06 Nov 2018 11:05:13 +0100] rev 40581
perf: measure slicing time in perfrevlogrevision Slicing a sparse delta chain can be expensive. We now benchmark the associated time.
Tue, 06 Nov 2018 11:04:23 +0100 perf: teach perfrevlogrevision about sparse reading
Boris Feld <boris.feld@octobus.net> [Tue, 06 Nov 2018 11:04:23 +0100] rev 40580
perf: teach perfrevlogrevision about sparse reading Before this change, chunks were always read in a single block. Even in the sparse-read/sparse-revlog case. This gave a false view of the performance and could lead to memory consumption issue.
Tue, 06 Nov 2018 11:13:31 +0100 perf: use the same timer for all section of perfrevlogrevision
Boris Feld <boris.feld@octobus.net> [Tue, 06 Nov 2018 11:13:31 +0100] rev 40579
perf: use the same timer for all section of perfrevlogrevision Otherwise the -T json output is invalid.
Tue, 22 May 2018 15:26:17 +0200 obsutil: clarify the access to "repo"
Boris Feld <boris.feld@octobus.net> [Tue, 22 May 2018 15:26:17 +0200] rev 40578
obsutil: clarify the access to "repo" We use the variable multiple times and we might use it even more in the future. We use a temporary variable instead.
Mon, 05 Nov 2018 19:52:42 -0800 pycompat: adding Linux detection and fixing Mac
rdamazio@google.com [Mon, 05 Nov 2018 19:52:42 -0800] rev 40577
pycompat: adding Linux detection and fixing Mac Python 3 recommends detecting OSs with the prefix of the platform, but we were comparing the full string for macOS. We also didn't have Linux detection, which is convenient for extensions to use (rather than have some OSs detected by hg and some by the extension). Reference: https://docs.python.org/3/library/sys.html#sys.platform Differential Revision: https://phab.mercurial-scm.org/D5227
Mon, 05 Nov 2018 17:48:23 -0500 remotefilelog: fix various minor py3 problems
Augie Fackler <augie@google.com> [Mon, 05 Nov 2018 17:48:23 -0500] rev 40576
remotefilelog: fix various minor py3 problems # skip-blame b prefixes and pycompat.long, nothing remotely interesting Differential Revision: https://phab.mercurial-scm.org/D5223
Mon, 05 Nov 2018 17:37:37 -0500 remotefilelog: rip out a missed mention of lz4
Augie Fackler <augie@google.com> [Mon, 05 Nov 2018 17:37:37 -0500] rev 40575
remotefilelog: rip out a missed mention of lz4 Differential Revision: https://phab.mercurial-scm.org/D5222
Sat, 03 Nov 2018 17:47:23 +0900 ui: wrap whole _write() block with timeblockedsection
Yuya Nishihara <yuya@tcha.org> [Sat, 03 Nov 2018 17:47:23 +0900] rev 40574
ui: wrap whole _write() block with timeblockedsection I think the cost of color labeling is negligible compared to the I/O syscalls. Let's simply wrap the whole write() function so that we can eliminate _write() and _write_err() in later changeset.
Sat, 03 Nov 2018 17:43:57 +0900 ui: indent _writenobuf() to prepare moving bits from _write() functions
Yuya Nishihara <yuya@tcha.org> [Sat, 03 Nov 2018 17:43:57 +0900] rev 40573
ui: indent _writenobuf() to prepare moving bits from _write() functions
Sat, 03 Nov 2018 17:42:05 +0900 ui: simply concatenate messages before applying color labels
Yuya Nishihara <yuya@tcha.org> [Sat, 03 Nov 2018 17:42:05 +0900] rev 40572
ui: simply concatenate messages before applying color labels This should be cheaper in space than applying labels for each message.
Sat, 03 Nov 2018 17:36:10 +0900 ui: simplify interface of low-level write() functions
Yuya Nishihara <yuya@tcha.org> [Sat, 03 Nov 2018 17:36:10 +0900] rev 40571
ui: simplify interface of low-level write() functions _write() and _write_err() will be replaced with fout.write() and ferr.write() respectively. This is the first step.
Sat, 03 Nov 2018 17:32:35 +0900 ui: factor out function that writes data to fout/ferr with labeling
Yuya Nishihara <yuya@tcha.org> [Sat, 03 Nov 2018 17:32:35 +0900] rev 40570
ui: factor out function that writes data to fout/ferr with labeling I'm thinking of adding an option to send status messages to stderr (or a dedicated command-server channel) so that structured output (e.g. JSON) would never be interleaved with non-formatter output. A unified write() interface helps to do that.
Sat, 03 Nov 2018 16:04:16 +0900 ui: consolidate places where _progclear() is called
Yuya Nishihara <yuya@tcha.org> [Sat, 03 Nov 2018 16:04:16 +0900] rev 40569
ui: consolidate places where _progclear() is called The progress bar has to be cleared when we start writing some data to the output stream. Let's make it always triggered immediately before switching by _colormode, so that we can easily factor out helper functions.
Sun, 04 Nov 2018 20:44:26 +0900 templater: compute revset lazily
Yuya Nishihara <yuya@tcha.org> [Sun, 04 Nov 2018 20:44:26 +0900] rev 40568
templater: compute revset lazily This speeds up e.g. "{ifcontains(rev, revset('::.'), ...)}" in common cases where 'rev' is near the working parent. The templater API is ugly, but it helps here. 'f' can be either a generator or a function returning a generator.
Wed, 24 Oct 2018 18:48:43 +0300 remotefilelog: drop compat code for "getbundle_shallow" wireprotocol command
Pulkit Goyal <pulkit@yandex-team.ru> [Wed, 24 Oct 2018 18:48:43 +0300] rev 40567
remotefilelog: drop compat code for "getbundle_shallow" wireprotocol command Doing some annotate on hgexperimental shows that getbundle_shallow used to exist in 2013 or before. We don't have any pre-2013 remotefilelog users except Fb themselves and I doubt they are going to use in-core remotefilelog. So it's safe to remove this. Differential Revision: https://phab.mercurial-scm.org/D5193
Wed, 24 Oct 2018 17:54:34 +0300 tests: remove lz4 as dependency while running tests
Pulkit Goyal <pulkit@yandex-team.ru> [Wed, 24 Oct 2018 17:54:34 +0300] rev 40566
tests: remove lz4 as dependency while running tests One of the previous patch authored by Augie rips out the lz4 dependency and things should work without it. Now there are just 2-3 tests failing because of same change in emitrevisions() API. Differential Revision: https://phab.mercurial-scm.org/D5192
Wed, 24 Oct 2018 17:51:49 +0300 remotefilelogserver: add a matcher argument to _walkstreamfiles()
Pulkit Goyal <pulkit@yandex-team.ru> [Wed, 24 Oct 2018 17:51:49 +0300] rev 40565
remotefilelogserver: add a matcher argument to _walkstreamfiles() Implementing narrow stream clones in core, I added an optional matcher argument. The function in remotefilelogserver.py does not know about that argument and does not accept that and hence some tests fails. Differential Revision: https://phab.mercurial-scm.org/D5191
Mon, 05 Nov 2018 11:52:10 -0800 shallowutil: introduce a helper function isenabled()
Pulkit Goyal <pulkit@yandex-team.ru> [Mon, 05 Nov 2018 11:52:10 -0800] rev 40564
shallowutil: introduce a helper function isenabled() This patch introduces a inenabled() function which will check whether remotefilelog is enabled or not. The function is then also used at all the places where check whether remotefilelog is enabled or not. The new function makes code easy to read without need to understand what is the constant involved and why we are checking repo.requirements. Differential Revision: https://phab.mercurial-scm.org/D5190
Wed, 24 Oct 2018 16:59:05 +0300 remotefilelog: remove some BC code related to streamclone
Pulkit Goyal <pulkit@yandex-team.ru> [Wed, 24 Oct 2018 16:59:05 +0300] rev 40563
remotefilelog: remove some BC code related to streamclone Since remotefilelog is now moved to core and we have streamclone._walkstreamfiles() in core, we don't need to have the backward compatibility code. People with old mercurial version should use remotefilelog from hg-experimental repo as IMO remotefilelog will go under a good refactoring and old clients will break. # no-check-commit foo_bar function name Differential Revision: https://phab.mercurial-scm.org/D5189
Wed, 17 Oct 2018 09:12:29 -0400 remotefilelog: add some docstring
Augie Fackler <augie@google.com> [Wed, 17 Oct 2018 09:12:29 -0400] rev 40562
remotefilelog: add some docstring Differential Revision: https://phab.mercurial-scm.org/D5131
Thu, 04 Oct 2018 10:03:10 -0400 remotefilelog: rename wireproto methods and remaining capabilities
Augie Fackler <augie@google.com> [Thu, 04 Oct 2018 10:03:10 -0400] rev 40561
remotefilelog: rename wireproto methods and remaining capabilities This is a mess, in part because there should be more constants throughout. I know we typically do exp- instead of the x_ business in this change, but I also had to use this in some function names, so I figured until I can break that coupling I'd go with this. If it's too unpleasant during review, let me know and I can probably clean it up some more. # no-check-commit due to new foo_bar naming - too hard to avoid right now :( Differential Revision: https://phab.mercurial-scm.org/D5129
Tue, 16 Oct 2018 17:02:48 -0400 remotefilelog: consolidate and rename on-disk store requirement
Augie Fackler <augie@google.com> [Tue, 16 Oct 2018 17:02:48 -0400] rev 40560
remotefilelog: consolidate and rename on-disk store requirement The value of this constant appeared in too many places. While we're here, rename it to be more consistent with our naming conventions for experimental functionality. Differential Revision: https://phab.mercurial-scm.org/D5128
Tue, 16 Oct 2018 17:30:47 -0400 remotefilelog: consolidate and rename bundle2 capability
Augie Fackler <augie@google.com> [Tue, 16 Oct 2018 17:30:47 -0400] rev 40559
remotefilelog: consolidate and rename bundle2 capability Bonus: we catch a spot where the shallowrepo requirement was being misused as the bundle2 capability. Differential Revision: https://phab.mercurial-scm.org/D5127
Tue, 16 Oct 2018 16:38:40 -0400 remotefilelog: rename capability for legacy ssh file fetching method
Augie Fackler <augie@google.com> [Tue, 16 Oct 2018 16:38:40 -0400] rev 40558
remotefilelog: rename capability for legacy ssh file fetching method I think I want to delete this, but for now we'll just rename this so it's easy to tell apart from other strings that have the same value. Differential Revision: https://phab.mercurial-scm.org/D5126
Thu, 04 Oct 2018 00:11:37 -0400 remotefilelog: rip out lz4 support
Augie Fackler <augie@google.com> [Thu, 04 Oct 2018 00:11:37 -0400] rev 40557
remotefilelog: rip out lz4 support Some methods are left teased out so it's easier to build a migration extension from v1 packs to v2. I also anticipate those methods will be of use if we get around to adding configurable compression engines before we end up jettisoning packs. I think it would make sense to register one-shot `compress` and `decompress` methods on our compression engines in util.py, but indygreg mentioned that might not be straightforward. Differential Revision: https://phab.mercurial-scm.org/D4944
Wed, 03 Oct 2018 23:25:31 -0400 remotefilelog: bump pack file formats to version 2
Augie Fackler <augie@google.com> [Wed, 03 Oct 2018 23:25:31 -0400] rev 40556
remotefilelog: bump pack file formats to version 2 Drop support for format 0 and 1 packs. Version 2 will be different in that it'll use zlib compression instead of lz4, as the latter isn't really suitable for core. If I can make it work, I'll make compression engines pluggable, but the logic for handling these files is spread out enough it's a little tricky to get that right. Test changes are only due to pack files being renamed. The contents of the packs are the same. Differential Revision: https://phab.mercurial-scm.org/D4943
Wed, 03 Oct 2018 23:47:43 -0400 remotefilelog: avoid hard-coding pack names in tests
Augie Fackler <augie@google.com> [Wed, 03 Oct 2018 23:47:43 -0400] rev 40555
remotefilelog: avoid hard-coding pack names in tests I'm about to alter the pack format, which alters the content-addressed name of the pack file. In order to reduce my own confusion I found it helpful to use an ls | head pipeline since we always want to inspect the newest pack. Differential Revision: https://phab.mercurial-scm.org/D4942
Tue, 16 Oct 2018 14:04:41 -0400 remotefilelog: remove now-unused wirepack code
Augie Fackler <augie@google.com> [Tue, 16 Oct 2018 14:04:41 -0400] rev 40554
remotefilelog: remove now-unused wirepack code Differential Revision: https://phab.mercurial-scm.org/D5124
Tue, 16 Oct 2018 14:04:11 -0400 remotefilelogserver: remove pack-serving functionality
Augie Fackler <augie@google.com> [Tue, 16 Oct 2018 14:04:11 -0400] rev 40553
remotefilelogserver: remove pack-serving functionality Differential Revision: https://phab.mercurial-scm.org/D5123
Tue, 16 Oct 2018 13:17:16 -0400 remotefilelog: remove support for fetching packs
Augie Fackler <augie@google.com> [Tue, 16 Oct 2018 13:17:16 -0400] rev 40552
remotefilelog: remove support for fetching packs We've never used this at Google, and it's strictly an optimization that indygreg and I are confident we can handle more elegantly later. Let's rip it out to keep the surface area of the imported remotefilelog small. Some tests have changes because the tests for regular packs and repacking were mixed with tests of fetching packs. I'm pretty sure I've done the right thing here. Differential Revision: https://phab.mercurial-scm.org/D5122
Wed, 03 Oct 2018 17:20:44 -0400 remotefilelog: jettison example cache client
Augie Fackler <augie@google.com> [Wed, 03 Oct 2018 17:20:44 -0400] rev 40551
remotefilelog: jettison example cache client We can always reconstruct it from history if it becomes interesting. Differential Revision: https://phab.mercurial-scm.org/D4941
Wed, 03 Oct 2018 17:18:20 -0400 remotefilelog: prune obsolete method
Augie Fackler <augie@google.com> [Wed, 03 Oct 2018 17:18:20 -0400] rev 40550
remotefilelog: prune obsolete method Differential Revision: https://phab.mercurial-scm.org/D4940
Wed, 03 Oct 2018 14:01:22 -0400 logtoprocess: use new runbgcommand from procutil
Augie Fackler <augie@google.com> [Wed, 03 Oct 2018 14:01:22 -0400] rev 40549
logtoprocess: use new runbgcommand from procutil Differential Revision: https://phab.mercurial-scm.org/D4939
Tue, 16 Oct 2018 14:42:57 -0400 procutil: port over windows encoding fixes from logtoprocess
Augie Fackler <augie@google.com> [Tue, 16 Oct 2018 14:42:57 -0400] rev 40548
procutil: port over windows encoding fixes from logtoprocess Differential Revision: https://phab.mercurial-scm.org/D5121
Wed, 03 Oct 2018 14:01:04 -0400 remotefilelog: transplant runbgcommand to procutil
Augie Fackler <augie@google.com> [Wed, 03 Oct 2018 14:01:04 -0400] rev 40547
remotefilelog: transplant runbgcommand to procutil While cleaning up the deprecated runshellcommand I noticed a near-clone of this in logtoprocess, so I'm standardizing on what appears to be the newer one by moving it to procutil. Differential Revision: https://phab.mercurial-scm.org/D4938
Wed, 03 Oct 2018 13:54:45 -0400 remotefilelog: remove function that was described as deprecated
Augie Fackler <augie@google.com> [Wed, 03 Oct 2018 13:54:45 -0400] rev 40546
remotefilelog: remove function that was described as deprecated Differential Revision: https://phab.mercurial-scm.org/D4937
Thu, 27 Sep 2018 13:03:19 -0400 remotefilelog: import pruned-down remotefilelog extension from hg-experimental
Augie Fackler <augie@google.com> [Thu, 27 Sep 2018 13:03:19 -0400] rev 40545
remotefilelog: import pruned-down remotefilelog extension from hg-experimental This is remotefilelog as of my recent patches for compatibility with current tip of hg, minus support for old versions of Mercurial and some FB-specific features like their treemanifest extension and fetching linkrev data from a patched phabricator. The file extutil.py moved from hgext3rd to remotefilelog. This is not yet ready to be landed, consider it a preview for now. Planned changes include: * replace lz4 with zstd * rename some capabilities, requirements and wireproto commands to mark them as experimental * consolidate bits of shallowutil with related functions (eg readfile) I'm certainly open to other (small) changes, but my rough mission is to land this largely as-is so we can use it as a model of the functionality we need going forward for lazy-fetching of file contents from a server. # no-check-commit because of a few foo_bar functions Differential Revision: https://phab.mercurial-scm.org/D4782
Wed, 17 Oct 2018 17:42:32 +0300 store: introduce _matchtrackedpath() and use it to filter store files
Pulkit Goyal <pulkit@yandex-team.ru> [Wed, 17 Oct 2018 17:42:32 +0300] rev 40544
store: introduce _matchtrackedpath() and use it to filter store files This patch introduces a function to filter store files on the basis of the path which they are tracking. The function assumes that the entries can be of two types, 'meta/*' and 'data/*' which means it will just work on revlog based storage and not with another storage ways. For the 'data/*' entries, we remove the 'data/' part and '.i/.d' part from the beginning and the end then pass that to matcher. For the 'meta/*' entries, we remove the 'meta/' and '/00manifest.(i/d)' part from beginning and end then call matcher.visitdir() with it to make sure all the parent directories are also downloaded. Since the storage filtering for narrow stream clones is implemented with this patch, we remove the un-implemented error message, add some more tests and add the treemanifest case to tests too. The tests demonstrate that it works correctly. After this patch, we have now narrow stream clones working. Narrow stream clones are a very important feature for large repositories who have good internet connection because they use streamclones for cloning and if they do normal narrow clone, that takes more time then a full streamclone. Also narrow-stream clone will drastically speed up clone timings. Differential Revision: https://phab.mercurial-scm.org/D5139
Wed, 17 Oct 2018 17:24:55 +0300 narrow: only send includepats and excludepats if they are not empty
Pulkit Goyal <pulkit@yandex-team.ru> [Wed, 17 Oct 2018 17:24:55 +0300] rev 40543
narrow: only send includepats and excludepats if they are not empty If we send an empty includepats or excludepats argument to getbundle, it's translated to `['']` on the server which causes problems because even though it's empty, bool of that value if True and we end up creating differencematcher with narrowspec.match() which results in unexpected behavior. Differential Revision: https://phab.mercurial-scm.org/D5138
Tue, 16 Oct 2018 17:53:26 +0300 exchange: pass includepats and excludepats as arguments to getbundle()
Pulkit Goyal <pulkit@yandex-team.ru> [Tue, 16 Oct 2018 17:53:26 +0300] rev 40542
exchange: pass includepats and excludepats as arguments to getbundle() This will help in implementing narrow stream clones. Also narrow extension used to add these arguments, now we add them by default if they are not empty. Since reading includepats and excludepats on the server only works when narrow is enabled, we check if narrow if enabled or not before passing them. Differential Revision: https://phab.mercurial-scm.org/D5119
Thu, 01 Nov 2018 16:51:21 -0700 catapult: add a bit more documentation on how to use catapult tracing
Kyle Lippincott <spectral@google.com> [Thu, 01 Nov 2018 16:51:21 -0700] rev 40541
catapult: add a bit more documentation on how to use catapult tracing Differential Revision: https://phab.mercurial-scm.org/D5217
Thu, 01 Nov 2018 16:44:02 -0700 catapult: introduce HGTESTCATAPULTSERVERPIPE to control run-tests' tracing
Kyle Lippincott <spectral@google.com> [Thu, 01 Nov 2018 16:44:02 -0700] rev 40540
catapult: introduce HGTESTCATAPULTSERVERPIPE to control run-tests' tracing If unset, it will inherit its value from HGCATAPULTSERVERPIPE (which hg itself also respects). By setting only HGTESTCATAPULTSERVERPIPE, we can get per-command breakdowns of the test runtimes for the whole test suite without overloading the trace file with the contents of the tracing from hg (such as demandimport, etc.) Differential Revision: https://phab.mercurial-scm.org/D5216
Thu, 01 Nov 2018 16:44:37 -0700 catapult: rename 'active' to 'activetrace'; this isn't storing a boolean state
Kyle Lippincott <spectral@google.com> [Thu, 01 Nov 2018 16:44:37 -0700] rev 40539
catapult: rename 'active' to 'activetrace'; this isn't storing a boolean state (This is an attempt to make it more obvious that the indentation is correct, to prevent a repeat of 97f52862b1bd) Differential Revision: https://phab.mercurial-scm.org/D5215
Thu, 01 Nov 2018 16:44:32 -0700 catapult: fix broken run-tests catapult tracing
Kyle Lippincott <spectral@google.com> [Thu, 01 Nov 2018 16:44:32 -0700] rev 40538
catapult: fix broken run-tests catapult tracing Commit 97f52862b1bd thought this block was misindented, but it was not; the indentation after that commit means we never log a catapult trace for individual commands. Also, we've never emitted the "end" trace line when the test was finished, so the trace viewer claims that these "did not finish", fixing that as well. Differential Revision: https://phab.mercurial-scm.org/D5214
Sat, 03 Nov 2018 23:24:15 +0530 test: fix self._testdir to use the right mercurial library during testing
Sangeet Kumar Mishra <mail2sangeetmishra@gmail.com> [Sat, 03 Nov 2018 23:24:15 +0530] rev 40537
test: fix self._testdir to use the right mercurial library during testing Currently if you run tests from some other directory other than the `../tests/`, you will get a warning stating ``` warning: Testing with unexpected mercurial lib: mercurial (expected /tmp/hgtests.xxxxxx/install/lib/python/mercurial) ``` This is because the current directory being added to the 'PATH', if the `self._testdir != runtestdir`, owing to this line ``` if self._testdir != runtestdir: path = [self._testdir] + path ``` Also say you ran the tests from the hg base directory, because directory is being added in the PATH (see the above snippet, at that stage the `self._testdir` has the value as `cwd`, owing to a faulty initialization). And since the current directory already has the 'hg', that is used in place of the hg that is installed for the testing purposes in `/tmp/hgtests.xxxxxx/...`. Differential Revision: https://phab.mercurial-scm.org/D5199
Sat, 03 Nov 2018 20:50:04 -0400 tests: conditonalize a difference in test-merge-tools.t on Windows
Matt Harbison <matt_harbison@yahoo.com> [Sat, 03 Nov 2018 20:50:04 -0400] rev 40536
tests: conditonalize a difference in test-merge-tools.t on Windows
Thu, 01 Nov 2018 17:12:22 -0400 statprof: clean up unicode/bytes a little
Augie Fackler <augie@google.com> [Thu, 01 Nov 2018 17:12:22 -0400] rev 40535
statprof: clean up unicode/bytes a little I'm not really sure how this worked before, but something perturbed it and what I've got in this change I believe is a little tidier. This fixes test-profile.t on Python 3. Differential Revision: https://phab.mercurial-scm.org/D5210
Thu, 01 Nov 2018 17:11:31 -0400 statprof: add a couple of asserts to avoid storing unicodes
Augie Fackler <augie@google.com> [Thu, 01 Nov 2018 17:11:31 -0400] rev 40534
statprof: add a couple of asserts to avoid storing unicodes I don't feel strongly about this change, so it'd be fine to drop it during review, but it was _extremely_ helpful in drafting the next change. Differential Revision: https://phab.mercurial-scm.org/D5209
Thu, 01 Nov 2018 17:09:55 -0400 tests: add some helpful `|| cat` bits to test-profile.t
Augie Fackler <augie@google.com> [Thu, 01 Nov 2018 17:09:55 -0400] rev 40533
tests: add some helpful `|| cat` bits to test-profile.t This way if the hg invocation crashes, you get to see a stacktrace without having to edit the test. Differential Revision: https://phab.mercurial-scm.org/D5208
Thu, 01 Nov 2018 16:13:01 -0400 tests: skip wireproto clientreactor tests on Python 3.6.0-3.6.3 inclusive
Augie Fackler <augie@google.com> [Thu, 01 Nov 2018 16:13:01 -0400] rev 40532
tests: skip wireproto clientreactor tests on Python 3.6.0-3.6.3 inclusive See comment next to the if statement for sad details. Differential Revision: https://phab.mercurial-scm.org/D5207
Thu, 01 Nov 2018 15:58:01 -0400 contrib: tweak import-checker to always use bytes for module names
Augie Fackler <augie@google.com> [Thu, 01 Nov 2018 15:58:01 -0400] rev 40531
contrib: tweak import-checker to always use bytes for module names We could go the other route and make embedded() return this as a bytes, but then it would be harder to portably doctest, so I prefer this option. Differential Revision: https://phab.mercurial-scm.org/D5206
Thu, 01 Nov 2018 15:43:43 -0400 contrib: fix import-checker to not b'' module names on Python 3
Augie Fackler <augie@google.com> [Thu, 01 Nov 2018 15:43:43 -0400] rev 40530
contrib: fix import-checker to not b'' module names on Python 3 Caught by the doctests. Differential Revision: https://phab.mercurial-scm.org/D5205
Thu, 01 Nov 2018 15:47:26 -0400 tests: add a critical flush() to run-tests.py to make output stable on py3
Augie Fackler <augie@google.com> [Thu, 01 Nov 2018 15:47:26 -0400] rev 40529
tests: add a critical flush() to run-tests.py to make output stable on py3 Differential Revision: https://phab.mercurial-scm.org/D5204
Sat, 13 Oct 2018 07:49:20 -0700 merge-tools: when calling external merge tool, describe the resolve inputs
Kyle Lippincott <spectral@google.com> [Sat, 13 Oct 2018 07:49:20 -0700] rev 40528
merge-tools: when calling external merge tool, describe the resolve inputs It is a common complaint that a user will be running some operation (histedit, rebase, evolve, etc.), get into a merge-conflict situation, and not understand what they are seeing - it is possible that the merge tool is configured to display the hash, but it's difficult for most merge tools to display a good snippet of the description. In the worst case, configuring this template will lead to output that is immediately covered by a terminal application, maybe the user can hit ctrl-z to see it. In the common case, the output will be in a terminal window and a GUI program will start, and it should be possible to view both the terminal and the GUI program at the same time. Differential Revision: https://phab.mercurial-scm.org/D5094
Fri, 26 Oct 2018 21:46:37 +0900 templatekw: deprecate p1rev/p2rev/p1node/p2node in favor of p1/p2
Yuya Nishihara <yuya@tcha.org> [Fri, 26 Oct 2018 21:46:37 +0900] rev 40527
templatekw: deprecate p1rev/p2rev/p1node/p2node in favor of p1/p2
Fri, 26 Oct 2018 21:43:20 +0900 templatekw: add p1/p2 keywords which switches the current ctx
Yuya Nishihara <yuya@tcha.org> [Fri, 26 Oct 2018 21:43:20 +0900] rev 40526
templatekw: add p1/p2 keywords which switches the current ctx This is just an example of mappingdict. I have no idea what should be displayed as {p1|json}. Currently it is an empty dict since {'ctx'} isn't displayable, which is clearly useless and should be changed later.
Fri, 19 Oct 2018 21:11:30 +0900 templater: add wrapper for a single template mapping
Yuya Nishihara <yuya@tcha.org> [Fri, 19 Oct 2018 21:11:30 +0900] rev 40525
templater: add wrapper for a single template mapping This can be used to nest template mappings without inserting a sequence-like layer. See the next patch for example.
Fri, 26 Oct 2018 21:28:20 +0900 templatekw: extract internal "{rev}:{node|formatnode}" template to constant
Yuya Nishihara <yuya@tcha.org> [Fri, 26 Oct 2018 21:28:20 +0900] rev 40524
templatekw: extract internal "{rev}:{node|formatnode}" template to constant This will be used later.
Thu, 01 Nov 2018 14:35:18 +0100 test: remove changes preparing the drop of `HGMERGE`
Boris Feld <boris.feld@octobus.net> [Thu, 01 Nov 2018 14:35:18 +0100] rev 40523
test: remove changes preparing the drop of `HGMERGE` These changes are no longer necessary so we better drop them.
Thu, 01 Nov 2018 14:29:21 +0100 run-tests: define the default merge tool through configuration
Boris Feld <boris.feld@octobus.net> [Thu, 01 Nov 2018 14:29:21 +0100] rev 40522
run-tests: define the default merge tool through configuration Using the `HGMERGE` environment variable generates confusion as it overrides any value set through configuration. By setting the default value through the default HGRC, the usual overriding rules apply and it should reduce confusion.
Fri, 19 Oct 2018 01:52:16 +0200 run-tests: explicitly declare the list of dropped environment variable
Boris Feld <boris.feld@octobus.net> [Fri, 19 Oct 2018 01:52:16 +0200] rev 40521
run-tests: explicitly declare the list of dropped environment variable It will make the list clearer and more maintainable.
Thu, 01 Nov 2018 14:29:14 +0100 test: drop usage of `HGMERGE` in `test-lfconvert.t`
Boris Feld <boris.feld@octobus.net> [Thu, 01 Nov 2018 14:29:14 +0100] rev 40520
test: drop usage of `HGMERGE` in `test-lfconvert.t` Using configuration instead of environment variable has a strange effect on the output, but no impact on the end result.
Thu, 01 Nov 2018 14:26:30 +0100 test: drop usage of `HGMERGE` in `test-merge-types.t`
Boris Feld <boris.feld@octobus.net> [Thu, 01 Nov 2018 14:26:30 +0100] rev 40519
test: drop usage of `HGMERGE` in `test-merge-types.t` Using configuration instead of environment variable has a strange effect on the output, but no impact on the end result.
Thu, 01 Nov 2018 14:24:34 +0100 test: use the "correct" merge tool in `test-rebase-detach.t`
Boris Feld <boris.feld@octobus.net> [Thu, 01 Nov 2018 14:24:34 +0100] rev 40518
test: use the "correct" merge tool in `test-rebase-detach.t` The value of `HGMERGE` overrides the value passed through --config. We are about to drop this `HGMERGE` environment variable so we update the value used in config to match what is currently in use. This is another example of confusion introduced by the `HGMERGE` environment variable.
Wed, 31 Oct 2018 19:12:32 +0100 test: also deactivate `ui.merge` when testing merge tool
Boris Feld <boris.feld@octobus.net> [Wed, 31 Oct 2018 19:12:32 +0100] rev 40517
test: also deactivate `ui.merge` when testing merge tool We are about to introduce a default config for `ui.merge`. Since `test-merge-tools.t` is about testing merge configuration, we need to make sure it won't interfere.
Wed, 31 Oct 2018 18:43:56 +0100 tests: adjust merge tool config in test-largefiles-update.t
Boris Feld <boris.feld@octobus.net> [Wed, 31 Oct 2018 18:43:56 +0100] rev 40516
tests: adjust merge tool config in test-largefiles-update.t Previously, the `ui.merge=internal:fail` configuration was shadowed by the the `HGMERGE=internal:merge` environment variable. We would like to remove this usage of `HGMERGE` variable because it is error-prone (eg: this very test). We start by cleaning up test independently to avoid large churn when the change happens.
Fri, 20 Apr 2018 18:08:54 +0200 extensions: include current version in "invalid version" message
Boris Feld <boris.feld@octobus.net> [Fri, 20 Apr 2018 18:08:54 +0200] rev 40515
extensions: include current version in "invalid version" message It is "not so rare" for the mercurial version to be badly detected at build time. In such case, version check for extensions gets confused. To help pinpoint the error, we now include the Mercurial's version number in the error message.
Fri, 19 Oct 2018 01:07:08 +0200 obsolete: prefetch the repo.obsstore used in phasedivergence loop
Boris Feld <boris.feld@octobus.net> [Fri, 19 Oct 2018 01:07:08 +0200] rev 40514
obsolete: prefetch the repo.obsstore used in phasedivergence loop The speedup is probably quite negligible, but it cannot hurt.
Fri, 19 Oct 2018 00:53:18 +0200 obsutil: prefetch method in allpredecessors loop
Boris Feld <boris.feld@octobus.net> [Fri, 19 Oct 2018 00:53:18 +0200] rev 40513
obsutil: prefetch method in allpredecessors loop We don't expect a massive speedup from this, but the change was laying around in my repository and it cannot hurt.
Fri, 02 Nov 2018 14:24:29 -0400 merge with stable
Augie Fackler <augie@google.com> [Fri, 02 Nov 2018 14:24:29 -0400] rev 40512
merge with stable
Sat, 13 Oct 2018 01:55:40 -0700 beautifygraph: don't substitute anything for 'X' in rendered graphs
Danny Hooper <hooper@google.com> [Sat, 13 Oct 2018 01:55:40 -0700] rev 40511
beautifygraph: don't substitute anything for 'X' in rendered graphs It looks like we never actually render graphs this way, although there's an example in a comment next to the code that prevents it from being needed (see graphmod.ascii()). Differential Revision: https://phab.mercurial-scm.org/D5103
Wed, 24 Oct 2018 21:29:04 +0900 py3: do not stringify integers in revlog stats by '%s'
Yuya Nishihara <yuya@tcha.org> [Wed, 24 Oct 2018 21:29:04 +0900] rev 40510
py3: do not stringify integers in revlog stats by '%s'
Wed, 24 Oct 2018 21:28:03 +0900 py3: convert revlog stats to a dict of (bytes, int) pairs
Yuya Nishihara <yuya@tcha.org> [Wed, 24 Oct 2018 21:28:03 +0900] rev 40509
py3: convert revlog stats to a dict of (bytes, int) pairs Py_DECREF(t) is replaced with Py_CLEAR(t) so that t is set to NULL once decrefed. Otherwise, it would be excessively decrefed if a subsequent PyBytes_FromString() failed.
Thu, 25 Oct 2018 22:13:22 -0400 py3: roll up threading.Thread constructor args into **kwargs
Matt Harbison <matt_harbison@yahoo.com> [Thu, 25 Oct 2018 22:13:22 -0400] rev 40508
py3: roll up threading.Thread constructor args into **kwargs The constructor doesn't have a `verbose` keyword argument in py3.
Thu, 25 Oct 2018 21:04:47 -0400 tests: glob over a single quote vs double quote difference on Windows
Matt Harbison <matt_harbison@yahoo.com> [Thu, 25 Oct 2018 21:04:47 -0400] rev 40507
tests: glob over a single quote vs double quote difference on Windows
Tue, 23 Oct 2018 11:31:33 -0400 py3: port test-log-exthook.t to Python 3
Augie Fackler <augie@google.com> [Tue, 23 Oct 2018 11:31:33 -0400] rev 40506
py3: port test-log-exthook.t to Python 3 For once an easy one. Differential Revision: https://phab.mercurial-scm.org/D5184
Fri, 12 Oct 2018 12:30:47 -0400 extensions: fix up many many debug logs that use %r
Augie Fackler <augie@google.com> [Fri, 12 Oct 2018 12:30:47 -0400] rev 40505
extensions: fix up many many debug logs that use %r This gets us a bunch closer on Python 3, but I'll still have to use a ton of sad globs. A previous version of this patch tried to preserve the %r formatting, but upon review Yuya noted that special characters in extension names is very unlikely, so we can just use %s and not sweat the quoting. Differential Revision: https://phab.mercurial-scm.org/D5002
Wed, 17 Oct 2018 15:48:01 -0700 blackbox: add configitem for format of log timestamps
Matt DeVore <matvore@google.com> [Wed, 17 Oct 2018 15:48:01 -0700] rev 40504
blackbox: add configitem for format of log timestamps Sometimes blackbox logs are used to report performance problems, but the timestamps are only at second granularity, so often the timings have to stated separately by the reporter. This is inconvenient and error-prone, so I would like to include %f in the date format. This patch makes that possible.
Tue, 23 Oct 2018 14:04:17 -0700 narrow: replace filtering in list comprehension by set operations
Martin von Zweigbergk <martinvonz@google.com> [Tue, 23 Oct 2018 14:04:17 -0700] rev 40503
narrow: replace filtering in list comprehension by set operations I didn't think of this while reviewing the patch. Differential Revision: https://phab.mercurial-scm.org/D5188
Tue, 23 Oct 2018 19:20:22 +0200 storage: update sqlitestore to use the new `deltamode` parameter
Boris Feld <boris.feld@octobus.net> [Tue, 23 Oct 2018 19:20:22 +0200] rev 40502
storage: update sqlitestore to use the new `deltamode` parameter While updating the filelog class, I forget to update the sqlitestore, tests are now passing with this patch. Differential Revision: https://phab.mercurial-scm.org/D5185
Tue, 23 Oct 2018 16:24:04 +0300 narrow: rework logic to check whether we need to widen and narrow
Pulkit Goyal <pulkit@yandex-team.ru> [Tue, 23 Oct 2018 16:24:04 +0300] rev 40501
narrow: rework logic to check whether we need to widen and narrow This patch reworks logic which calculates whether we need to extend or narrow our working copy or not. We filter the addincludes, removeincludes, addexcludes and removeexcludes passed from user to the actual added and removed includes and excludes. What that means is a user can pass an already included path as addincludes, a path which is not included as removeincludes etc. In such situations the old logic use to think we need to do some work, whereas we don't need to do that work. In old logic, even if we don't have anything new to include but it believes we need to call widen, this adds some good amount of work on large repository. A widen calls involves computing incomming csets, calling the narrow_widen() which in non-ellipses cases goes through all the set of csets which are available which can take ~2-3 mins on large repos. Those 2-3 minutes are spend on doing nothing which a client can prevent by checking is there really anything which needs to be included. The tests changes shows that we don't go to the server anymore in such cases which is nice. Differential Revision: https://phab.mercurial-scm.org/D5183
Tue, 23 Oct 2018 14:26:17 +0300 tests: show that adding an already included path still calls narrow_widen()
Pulkit Goyal <pulkit@yandex-team.ru> [Tue, 23 Oct 2018 14:26:17 +0300] rev 40500
tests: show that adding an already included path still calls narrow_widen() This patch adds tests demonstrating that we still go to the server in non-ellipses widening when we have that path already on the client and there is nothing new to download. The next patch will try to make client side logic smart and not go to the server if we don't need to download anything. Differential Revision: https://phab.mercurial-scm.org/D5182
Sun, 14 Oct 2018 17:08:18 +0200 graft: introduce --base option for using custom base revision while merging
Mads Kiilerich <mads@kiilerich.com> [Sun, 14 Oct 2018 17:08:18 +0200] rev 40499
graft: introduce --base option for using custom base revision while merging The graft command usually performs an internal merge of the current parent revision with the graft revision, using p1 of the grafted revision as base for the merge. As a trivial extension of this, we introduce the --base option to allow for using another base revision. This can be used as a building block for grafting and collapsing multiple changesets at once, or for grafting the resulting change from a merge as a single simple change. (This is kind of similar to backout --parent ... only different: this graft base must be an ancestor, but is usually *not* a parent.) This is probably an advanced use case, and we do thus not show it in the non-verbose help.
Thu, 18 Oct 2018 12:31:06 +0200 changegroup: add a option to create bundle with full snapshot only
Boris Feld <boris.feld@octobus.net> [Thu, 18 Oct 2018 12:31:06 +0200] rev 40498
changegroup: add a option to create bundle with full snapshot only This is easy to implement now and can be useful for benchmarking.
Wed, 10 Oct 2018 00:21:02 +0200 changegroup: allow to force delta to be against p1
Boris Feld <boris.feld@octobus.net> [Wed, 10 Oct 2018 00:21:02 +0200] rev 40497
changegroup: allow to force delta to be against p1 This new developer option is useful to general more "generic" bundle. Without this option, a bundle generated from the repository use deltas similar to the one stored in the specific repository it was generated from. This makes performance testing a bit tricky. Using deltas similar to the final result means all delta stored in the bundle can be applied to the target repository without any further processing (except for the rare case of a full snapshot). The application of such bundles (almost) never exercises the (slower) path of searching for a new valid delta. This result in unrealistic and too favorable timing and profile. Instead, we introduce an option to make sure all revisions are stored as a delta against p1. It might not be the best generation option, but it guarantees that the content will be "generic", not favoring a specific target.
Tue, 09 Oct 2018 23:26:35 +0200 storage: also use `deltamode argument` for ifiledata
Boris Feld <boris.feld@octobus.net> [Tue, 09 Oct 2018 23:26:35 +0200] rev 40496
storage: also use `deltamode argument` for ifiledata Now that lower level uses such argument, we can propagate the change to higher layers.
Tue, 09 Oct 2018 22:02:01 +0200 changegroup: refactor emitrevision to use a `deltamode` argument
Boris Feld <boris.feld@octobus.net> [Tue, 09 Oct 2018 22:02:01 +0200] rev 40495
changegroup: refactor emitrevision to use a `deltamode` argument This new argument gathers the semantic of `sendfulltext` and `deltaprevious` in a single value. We are about to introduce a new type of constraints. Avoiding yet another argument sounds like a plus.
Tue, 23 Oct 2018 21:11:13 +0900 branchmap: do not specify changelog as an argument
Yuya Nishihara <yuya@tcha.org> [Tue, 23 Oct 2018 21:11:13 +0900] rev 40494
branchmap: do not specify changelog as an argument Since (unfiltered)repo.changelog lookup gets as fast as __dict__ lookup, there's no point to pass in changelog instance. $ hg perfbranchmap --clear-revbranch -R mozilla-central ! base (orig) wall 20.593091 comb 20.600000 user 20.520000 sys 0.080000 (best of 3) (this) wall 20.129126 comb 20.130000 user 20.020000 sys 0.110000 (best of 3) This backs out most of the changes in 76d4272bd57b and 47c03042cd1d.
Sat, 20 Oct 2018 17:56:00 +0900 filecache: unimplement __set__() and __delete__() (API)
Yuya Nishihara <yuya@tcha.org> [Sat, 20 Oct 2018 17:56:00 +0900] rev 40493
filecache: unimplement __set__() and __delete__() (API) Implementing __set__() implies that the descriptor can't be overridden by obj.__dict__, which means any property access involves slow function call. "Data descriptors with __set__() and __get__() defined always override a redefinition in an instance dictionary. In contrast, non-data descriptors can be overridden by instances." https://docs.python.org/2.7/reference/datamodel.html#invoking-descriptors This patch basically backs out 236bb604dc39, "scmutil: update cached copy when filecached attribute is assigned (issue3263)." The problem described in issue3263 (which is #3264 in Bugzilla) should no longer happen since repo._bookmarkcurrent has been moved to repo._bookmarks.active. We still have a risk of introducing similar bugs, but I think that's the cost we have to pay. $ hg perfrevset 'branch(tip)' -R mercurial (orig) wall 0.139511 comb 0.140000 user 0.140000 sys 0.000000 (best of 66) (prev) wall 0.114195 comb 0.110000 user 0.110000 sys 0.000000 (best of 81) (this) wall 0.099038 comb 0.110000 user 0.100000 sys 0.010000 (best of 93)
Sat, 20 Oct 2018 19:13:05 +0900 filecache: use try-except for faster __dict__ lookup
Yuya Nishihara <yuya@tcha.org> [Sat, 20 Oct 2018 19:13:05 +0900] rev 40492
filecache: use try-except for faster __dict__ lookup Python function call is slow, and the cost could be significant here. $ hg perfrevset 'branch(tip)' -R mercurial (orig) wall 0.139511 comb 0.140000 user 0.140000 sys 0.000000 (best of 66) (this) wall 0.114195 comb 0.110000 user 0.110000 sys 0.000000 (best of 81)
Thu, 18 Oct 2018 19:57:30 -0700 help: displaying extension commands by default
rdamazio@google.com [Thu, 18 Oct 2018 19:57:30 -0700] rev 40491
help: displaying extension commands by default Differential Revision: https://phab.mercurial-scm.org/D5156
Thu, 18 Oct 2018 19:57:05 -0700 help: displaying documented aliases by default
rdamazio@google.com [Thu, 18 Oct 2018 19:57:05 -0700] rev 40490
help: displaying documented aliases by default This makes aliases be displayed in "hg help" when they have a :doc config entry, and also allows them to be assigned to a category with :category. Differential Revision: https://phab.mercurial-scm.org/D5087
Sat, 13 Oct 2018 05:43:39 -0700 help: allow hiding of help topics
rdamazio@google.com [Sat, 13 Oct 2018 05:43:39 -0700] rev 40489
help: allow hiding of help topics Differential Revision: https://phab.mercurial-scm.org/D5077
Sat, 13 Oct 2018 05:02:55 -0700 help: allow commands to be hidden
rdamazio@google.com [Sat, 13 Oct 2018 05:02:55 -0700] rev 40488
help: allow commands to be hidden This is useful in enterprise environments where some workflows are discouraged. Differential Revision: https://phab.mercurial-scm.org/D5076
Sat, 20 Oct 2018 00:12:20 +0300 py3: add one more passing test to whitelist
Pulkit Goyal <pulkit@yandex-team.ru> [Sat, 20 Oct 2018 00:12:20 +0300] rev 40487
py3: add one more passing test to whitelist Caught by python 3 builder. Differential Revision: https://phab.mercurial-scm.org/D5175
Sat, 20 Oct 2018 00:05:50 +0300 py3: make sure we pass sysstr in sqlite3.connect()
Pulkit Goyal <pulkit@yandex-team.ru> [Sat, 20 Oct 2018 00:05:50 +0300] rev 40486
py3: make sure we pass sysstr in sqlite3.connect() Differential Revision: https://phab.mercurial-scm.org/D5174
Tue, 05 Sep 2017 15:24:25 -0700 archive: use manifest.matches() to simplify and speed up matching
Martin von Zweigbergk <martinvonz@google.com> [Tue, 05 Sep 2017 15:24:25 -0700] rev 40485
archive: use manifest.matches() to simplify and speed up matching manifest.matches() can avoid walking paths the user did not want to archive. Differential Revision: https://phab.mercurial-scm.org/D5178
Tue, 05 Sep 2017 15:24:22 -0700 archive: create alwaysmatcher when no matcher provided
Martin von Zweigbergk <martinvonz@google.com> [Tue, 05 Sep 2017 15:24:22 -0700] rev 40484
archive: create alwaysmatcher when no matcher provided Differential Revision: https://phab.mercurial-scm.org/D5177
Tue, 05 Sep 2017 15:21:21 -0700 archive: change "matcnfn" argument to a real matcher
Martin von Zweigbergk <martinvonz@google.com> [Tue, 05 Sep 2017 15:21:21 -0700] rev 40483
archive: change "matcnfn" argument to a real matcher All callers seem to be passing a real matcher, not just a function. We were also passing it into match.subdirmatcher(), which assumes it is a matcher. Differential Revision: https://phab.mercurial-scm.org/D5176
Wed, 09 Jan 2019 20:00:35 -0800 histedit: crashing with a more useful error message on empty defaultrev stable
rdamazio@google.com [Wed, 09 Jan 2019 20:00:35 -0800] rev 40482
histedit: crashing with a more useful error message on empty defaultrev Before this, `hg --config histedit.defaultrev= histedit` would crash with File "destutil.py", line 385, in desthistedit if revs: UnboundLocalError: local variable 'revs' referenced before assignment Differential Revision: https://phab.mercurial-scm.org/D5543
Mon, 07 Jan 2019 19:00:54 -0500 Added signature for changeset 197f092b2cd9 stable
Augie Fackler <raf@durin42.com> [Mon, 07 Jan 2019 19:00:54 -0500] rev 40481
Added signature for changeset 197f092b2cd9
Mon, 07 Jan 2019 19:00:51 -0500 Added tag 4.8.2 for changeset 197f092b2cd9 stable
Augie Fackler <raf@durin42.com> [Mon, 07 Jan 2019 19:00:51 -0500] rev 40480
Added tag 4.8.2 for changeset 197f092b2cd9
Sun, 06 Jan 2019 14:58:54 -0500 server: always close http socket if responding with an error (issue6033) stable 4.8.2
Augie Fackler <raf@durin42.com> [Sun, 06 Jan 2019 14:58:54 -0500] rev 40479
server: always close http socket if responding with an error (issue6033) It's possible for hgweb to respond _very_ early with an error if we're catching certain types of errors. When we do, we need to tell the client the socket is toast when there's a POST involved because otherwise there can be lingering POST data on the socket that will confuse any future requests on the socket. This manifested as a flaky failure on Linux in an lfs extension test and a reliable failure on FreeBSD. With this patch applied, test-lfs-serve-access.t now passes for me on FreeBSD. Differential Revision: https://phab.mercurial-scm.org/D5498
Sat, 05 Jan 2019 15:44:55 +0900 match: fix assertion for fileset with no context (issue6046) stable
Yuya Nishihara <yuya@tcha.org> [Sat, 05 Jan 2019 15:44:55 +0900] rev 40478
match: fix assertion for fileset with no context (issue6046) A falsy changectx should be allowed.
Fri, 04 Jan 2019 21:01:10 -0500 templatekw: fix documentation typos stable
Matt Harbison <matt_harbison@yahoo.com> [Fri, 04 Jan 2019 21:01:10 -0500] rev 40477
templatekw: fix documentation typos
Wed, 02 Jan 2019 09:41:04 +0900 update: do not pass in user revspec as default destination (issue6044) stable
Yuya Nishihara <yuya@tcha.org> [Wed, 02 Jan 2019 09:41:04 +0900] rev 40476
update: do not pass in user revspec as default destination (issue6044) When the revsingle() was introduced at 61c0df2b089a, it couldn't handle revspec=0 (not '0') properly. That's probably why the default was set to rev. This is technically BC since "hg update ''" was identical to "hg update '.'" whereas "hg update -r ''" is "hg update", but I believe that's a bug given no test fails with this change.
Sun, 30 Dec 2018 16:11:06 +0100 revlog: cache delta base value under -1 stable
Boris Feld <boris.feld@octobus.net> [Sun, 30 Dec 2018 16:11:06 +0100] rev 40475
revlog: cache delta base value under -1 Such base are invalid so we better report them early.
Thu, 27 Dec 2018 23:34:37 +0100 revlog: catch revlog corruption in index_baserev stable
Boris Feld <boris.feld@octobus.net> [Thu, 27 Dec 2018 23:34:37 +0100] rev 40474
revlog: catch revlog corruption in index_baserev A revision cannot use a base above itself, it can only happens one corrupted repository. Ignoring such corrupted could lead to infinite loop.
Fri, 21 Dec 2018 17:36:12 -0500 phabricator: properly encode boolean types in the request body stable
Matt Harbison <matt_harbison@yahoo.com> [Fri, 21 Dec 2018 17:36:12 -0500] rev 40473
phabricator: properly encode boolean types in the request body I tripped over this playing with `hg debugcallconduit` to query for valid reviewers. If the JSON on stdin is written as 'True' or 'False', python complains it isn't valid JSON. If it's written as 'true' or 'false', it made it to the server, but got kicked back with this: abort: Conduit Error (ERR-CONDUIT-CORE): Error while reading "isBot": Expected boolean (true or false), got something else. The test isn't really relevant here (the code can be reverted, and it will pass), but this gives us coverage for the debug command.
Tue, 11 Dec 2018 22:34:07 +0900 worker: do not swallow exception occurred in main process stable
Yuya Nishihara <yuya@tcha.org> [Tue, 11 Dec 2018 22:34:07 +0900] rev 40472
worker: do not swallow exception occurred in main process Before, SystemExit(255) would be most likely raised since the worker processes were terminated by the main process and the status would be set to 255 in response. We should instead re-raise the exception occurred first. It's pretty hard to debug problems like the issue 6035 with no traceback.
Mon, 17 Dec 2018 20:46:09 +0900 run-tests: fix permission to clean up unreadable directories stable
Yuya Nishihara <yuya@tcha.org> [Mon, 17 Dec 2018 20:46:09 +0900] rev 40471
run-tests: fix permission to clean up unreadable directories I found many hgtests.* directories left in $TMPDIR, which couldn't be deleted because test-ssh-repoerror.t created some directories with a-rx mode.
Sun, 16 Dec 2018 17:08:46 +0900 context: reimplement memfilectx.cmp() stable
Yuya Nishihara <yuya@tcha.org> [Sun, 16 Dec 2018 17:08:46 +0900] rev 40470
context: reimplement memfilectx.cmp() If I added a sanity check to basefilectx, test-context.py exploded. This patch copies the naive implementation from overlayworkingfilectx.
Sat, 15 Dec 2018 14:55:06 -0500 windows: ensure pure posixfile fd doesn't escape by entering context manager stable
Matt Harbison <matt_harbison@yahoo.com> [Sat, 15 Dec 2018 14:55:06 -0500] rev 40469
windows: ensure pure posixfile fd doesn't escape by entering context manager There are tests in test-revlog-mmapindex.t and test-rebase-mq-skip.t that are fixed by this, but we usually don't use --pure on Windows. For whatever reason, the remaining --pure failures are various errors like $ENOTDIR$ and "Access is denied" have a trailing '.'.
Sat, 15 Dec 2018 13:54:37 -0500 vfs: ensure closewrapbase fh doesn't escape by entering context manager stable
Matt Harbison <matt_harbison@yahoo.com> [Sat, 15 Dec 2018 13:54:37 -0500] rev 40468
vfs: ensure closewrapbase fh doesn't escape by entering context manager I'm not sure if there's a problem in practice here, as there's no test failure either way. The __exit__() and close() methods raise an exception, so maybe __exit__() and close() are being called directly on the underlying handle when delayclosedfile is used on a context manager? I doubt that was intended.
Sat, 15 Dec 2018 13:41:34 -0500 windows: ensure mixedfilemodewrapper fd doesn't escape by entering context mgr stable
Matt Harbison <matt_harbison@yahoo.com> [Sat, 15 Dec 2018 13:41:34 -0500] rev 40467
windows: ensure mixedfilemodewrapper fd doesn't escape by entering context mgr Otherwise it seems that the special read and write handling would be bypassed.
Sat, 15 Dec 2018 01:26:18 -0500 py3: ensure the proxied Windows fd doesn't escape by entering context manager stable
Matt Harbison <matt_harbison@yahoo.com> [Sat, 15 Dec 2018 01:26:18 -0500] rev 40466
py3: ensure the proxied Windows fd doesn't escape by entering context manager The purpose of the proxy class is to provide the `name` attribute which contains the file path. But in tests that used a context manager, it still blew up complaining that 'int' doesn't have a 'startswith' function.
Wed, 12 Dec 2018 06:41:19 +0100 test: fix test-http-bad-server with current python 2.7 stable
Julien Cristau <jcristau@mozilla.com> [Wed, 12 Dec 2018 06:41:19 +0100] rev 40465
test: fix test-http-bad-server with current python 2.7 https://github.com/python/cpython/pull/2825 changed the exception message for empty http status line. Differential Revision: https://phab.mercurial-scm.org/D5412
Sun, 09 Dec 2018 23:48:50 -0500 hgweb: register web.comparisoncontext to the config table stable
Matt Harbison <matt_harbison@yahoo.com> [Sun, 09 Dec 2018 23:48:50 -0500] rev 40464
hgweb: register web.comparisoncontext to the config table This was caught in some server side logging added to debug py3 issues.
Tue, 04 Dec 2018 17:04:19 -0500 Added signature for changeset 1c8c54cf9725 stable
Augie Fackler <raf@durin42.com> [Tue, 04 Dec 2018 17:04:19 -0500] rev 40463
Added signature for changeset 1c8c54cf9725
Tue, 04 Dec 2018 17:04:17 -0500 Added tag 4.8.1 for changeset 1c8c54cf9725 stable
Augie Fackler <raf@durin42.com> [Tue, 04 Dec 2018 17:04:17 -0500] rev 40462
Added tag 4.8.1 for changeset 1c8c54cf9725
Tue, 20 Nov 2018 14:43:27 -0800 rebase: fix path auditing to audit path relative to repo root (issue5818) stable 4.8.1
Martin von Zweigbergk <martinvonz@google.com> [Tue, 20 Nov 2018 14:43:27 -0800] rev 40461
rebase: fix path auditing to audit path relative to repo root (issue5818) Before this patch, when rebasing a file called "foo/bar", we would check e.g. if "/foo" (i.e. rooted at the file system root) was a symlink. Differential Revision: https://phab.mercurial-scm.org/D5361
Tue, 04 Dec 2018 08:56:43 -0800 tests: show bad path auditing in in-memory rebase stable
Martin von Zweigbergk <martinvonz@google.com> [Tue, 04 Dec 2018 08:56:43 -0800] rev 40460
tests: show bad path auditing in in-memory rebase Thanks to Yuya for providing this test case in https://bz.mercurial-scm.org/show_bug.cgi?id=5818. Differential Revision: https://phab.mercurial-scm.org/D5368
Tue, 04 Dec 2018 08:55:48 -0800 tests: add a missing "cd .." to test-rebase-inmemory.t stable
Martin von Zweigbergk <martinvonz@google.com> [Tue, 04 Dec 2018 08:55:48 -0800] rev 40459
tests: add a missing "cd .." to test-rebase-inmemory.t Differential Revision: https://phab.mercurial-scm.org/D5367
Sun, 28 Oct 2018 21:29:04 +0900 rust: fix possible out-of-bounds read through index_get_parents() stable
Yuya Nishihara <yuya@tcha.org> [Sun, 28 Oct 2018 21:29:04 +0900] rev 40458
rust: fix possible out-of-bounds read through index_get_parents() index_get_parents() is an internal function, which doesn't check if the specified rev is valid. If rustlazyancestors() were instantiated with an invalid stoprev, it would access to invalid memory region. This is NOT a security fix as there's no Python code triggering the bug, but included in this series to not give a notion about the memory issue fixed by the previous patch.
Thu, 01 Nov 2018 20:32:59 +0900 revlog: fix out-of-bounds access by negative parents read from revlog (SEC) stable
Yuya Nishihara <yuya@tcha.org> [Thu, 01 Nov 2018 20:32:59 +0900] rev 40457
revlog: fix out-of-bounds access by negative parents read from revlog (SEC) 82d6a35cf432 wasn't enough. Several callers don't check negative revisions but for -1 (nullrev), which would directly lead to out-of-bounds read, and buffer overflow could follow. RCE might be doable with carefully crafted revlog structure, though I don't think this would be useful attack surface.
Mon, 03 Dec 2018 11:14:44 -0800 rebase: fix dir/file conflict detection when using in-mem merge stable
Martin von Zweigbergk <martinvonz@google.com> [Mon, 03 Dec 2018 11:14:44 -0800] rev 40456
rebase: fix dir/file conflict detection when using in-mem merge Differential Revision: https://phab.mercurial-scm.org/D5360
Mon, 03 Dec 2018 11:11:34 -0800 tests: show that in-mem rebase does not find path dir/file conflicts stable
Martin von Zweigbergk <martinvonz@google.com> [Mon, 03 Dec 2018 11:11:34 -0800] rev 40455
tests: show that in-mem rebase does not find path dir/file conflicts Differential Revision: https://phab.mercurial-scm.org/D5359
Mon, 03 Dec 2018 20:59:48 -0500 extdiff: register the configuration generated commands with a help category stable
Matt Harbison <matt_harbison@yahoo.com> [Mon, 03 Dec 2018 20:59:48 -0500] rev 40454
extdiff: register the configuration generated commands with a help category Otherwise, 'extdiff' shows up under file management and the rest of the commands are at the bottom under 'Uncategorized'.
Mon, 03 Dec 2018 09:36:40 -0800 rebase: abort in-mem rebase if there's a dirty merge state stable
Martin von Zweigbergk <martinvonz@google.com> [Mon, 03 Dec 2018 09:36:40 -0800] rev 40453
rebase: abort in-mem rebase if there's a dirty merge state In-memory merge uses the on-disk merge state, so we should not allow it run in-memory merge when the merge state is not clean. We should probably not use the on-disk merge state when running in-memory merge, but chaning that is not suitable for the stable branch. Differential Revision: https://phab.mercurial-scm.org/D5357
Fri, 30 Nov 2018 16:21:37 -0800 rebase: preserve working copy when redoing in-mem rebase on disk stable
Martin von Zweigbergk <martinvonz@google.com> [Fri, 30 Nov 2018 16:21:37 -0800] rev 40452
rebase: preserve working copy when redoing in-mem rebase on disk When in-memory rebase runs into conflicts, we retry it on disk. But before we do that, we abort the in-memory rebase. That is done because even though it's mostly in memory, there are still a few state files written (e.g. the merge state). We should make it not write those files so we don't need to abort, but for the stable branch, let's explicitly clear the state we need to clear instead of running the usual abort code. Differential Revision: https://phab.mercurial-scm.org/D5356
Fri, 30 Nov 2018 15:08:43 -0800 tests: show that in-mem rebase falling back loses state stable
Martin von Zweigbergk <martinvonz@google.com> [Fri, 30 Nov 2018 15:08:43 -0800] rev 40451
tests: show that in-mem rebase falling back loses state Both working copy changes and the merge state is lost when in-memory rebase falls back to on-disk mode. Differential Revision: https://phab.mercurial-scm.org/D5355
Mon, 03 Dec 2018 21:45:15 +0900 commandserver: get around ETIMEDOUT raised by selectors2 stable
Yuya Nishihara <yuya@tcha.org> [Mon, 03 Dec 2018 21:45:15 +0900] rev 40450
commandserver: get around ETIMEDOUT raised by selectors2 selector.select() should exits with an empty event list on timed out, but selectors2 raises OSError if timeout expires while recovering from EINTR. Spotted while debugging new chg feature.
Mon, 03 Dec 2018 21:31:19 +0900 selectors2: backport minimal fix of timeout handling from 2.0.1 stable
Yuya Nishihara <yuya@tcha.org> [Mon, 03 Dec 2018 21:31:19 +0900] rev 40449
selectors2: backport minimal fix of timeout handling from 2.0.1 The original code would raise TypeError since OSError() doesn't support keyword arguments. We can't simply import the selectors 2.0.1, which still spawns "uname -p" through platform.system(). We could switch to the unreleased version, but I decided to not right now to minimize the change.
Wed, 14 Nov 2018 10:12:43 -0500 tests: sniff for libfuzzer actually being available in test-fuzz-targets.t stable
Augie Fackler <augie@google.com> [Wed, 14 Nov 2018 10:12:43 -0500] rev 40448
tests: sniff for libfuzzer actually being available in test-fuzz-targets.t When I upgraded the FreeBSD buildbot to 11.2 it seems we picked up clang6, but the default clang on FreeBSD doesn't include libfuzzer. I can't find a way to sniff for libfuzzer without running a compile, so here we are. Differential Revision: https://phab.mercurial-scm.org/D5270
Wed, 14 Nov 2018 10:11:37 -0500 tests: sniff for /usr/local/bin/gmake and use it in test-fuzz-targets.t stable
Augie Fackler <augie@google.com> [Wed, 14 Nov 2018 10:11:37 -0500] rev 40447
tests: sniff for /usr/local/bin/gmake and use it in test-fuzz-targets.t This isn't as robust as it probably should be, but for now it'll get the job done on the buildbots. Differential Revision: https://phab.mercurial-scm.org/D5269
Thu, 29 Nov 2018 16:25:37 -0500 tests: stabilize test-inherit-mode.t on FreeBSD and macOS (issue6026) stable
Augie Fackler <augie@google.com> [Thu, 29 Nov 2018 16:25:37 -0500] rev 40446
tests: stabilize test-inherit-mode.t on FreeBSD and macOS (issue6026) Symbolic links are funny permissions-wise, but on the linked issue Yuya has convinced me that we can ignore this permissions issue on macOS (FreeBSD allows setting permissions bits but ignores them) and we'll be in fine shape.
Wed, 28 Nov 2018 12:52:23 -0800 wireprotov2peer: wait for initial object before resolving future stable
Gregory Szorc <gregory.szorc@gmail.com> [Wed, 28 Nov 2018 12:52:23 -0800] rev 40445
wireprotov2peer: wait for initial object before resolving future As part of rolling out wireprotov2 with redirect support, I encountered an edge case with regards to future resolution. Essentially, the initial response frame from the server did not fully decode the initial CBOR object. The frame wasn't marked as EOS. In the previous code, we resolved the future for the request to response.objects(), which mapped to the commandresponse instance which would eventually produce a redirect. Upon receiving subsequent data, the initial CBOR object containing the redirect would be decoded and we'd process the redirect. However, the future would already have been resolved with the initial commandresponse.objects() and the client iterating over the objects wouldn't receive any objects from the redirect because the redirect was populating a different commandresponse instance! This commit changes the logic so we don't resolve futures until the initial CBOR response object is fully decoded or until EOS occurs. In cases where there is an empty or partial frame associated with a redirect, the future will now resolve with the commandresponse containing the proper series of decoded objects.
Wed, 28 Nov 2018 10:37:43 -0800 wireprotov2peer: always return a bool from _processredirect() stable
Gregory Szorc <gregory.szorc@gmail.com> [Wed, 28 Nov 2018 10:37:43 -0800] rev 40444
wireprotov2peer: always return a bool from _processredirect() Without this, we may stop servicing the redirect response if the future has already been resolved. And the future will often be resolved very early, since many consumers iterate the decoded CBOR object stream and expect data to lazily arrive.
Tue, 20 Nov 2018 18:47:19 -0500 tests: stabilize the recent checkexec changes on Windows stable
Matt Harbison <matt_harbison@yahoo.com> [Tue, 20 Nov 2018 18:47:19 -0500] rev 40443
tests: stabilize the recent checkexec changes on Windows This goes with bd0874977a5e.
Thu, 15 Nov 2018 03:09:23 +0100 checkexec: create destination directory if necessary stable
Boris Feld <boris.feld@octobus.net> [Thu, 15 Nov 2018 03:09:23 +0100] rev 40442
checkexec: create destination directory if necessary Since 460733327640, a "share" use the cache of the source repository. A side effect is that no `.hg/cache` directory exists in the "share" anymore. As a result, the checkexec logic can't use it to create its temporary file and have to use the working copy for that. This is suboptimal, it pollutes the working copy and prevents them to keep the file around in cache. We do not want to use the cache directory for the share target, it might be on a different file system. So instead, we (try to) create the directory if it is missing. This is a simple change that fixes the current behavior regression on stable. On default, we should probably ensure the proper directories are created when initializing the repository. We should also introduce a 'wcache' directory to hold cache file related to the working copy. This would clarify the cache situation regarding shares. The tests catch a couple of other affected cases.
Thu, 15 Nov 2018 22:59:38 +0900 graft: do not try to skip rev derived from ancestor more than once (issue6024) stable
Yuya Nishihara <yuya@tcha.org> [Thu, 15 Nov 2018 22:59:38 +0900] rev 40441
graft: do not try to skip rev derived from ancestor more than once (issue6024) We check 'x in revs' in other cases, so let's do the same. The test case credits to Tom Prince.
Fri, 16 Nov 2018 18:37:26 -0500 subrepo: print the status line before creating the peer for better diagnostics stable
Matt Harbison <matt_harbison@yahoo.com> [Fri, 16 Nov 2018 18:37:26 -0500] rev 40440
subrepo: print the status line before creating the peer for better diagnostics I ran into a problem where I tried updating to a different branch, and the process appeared to hang. It turned out that the subrepo revision wasn't available locally, and I must have originally cloned it from an `hg serve -S` on a machine that currently wasn't serving anything. It took 2+ minutes to timeout, and didn't mention what it was connecting to even then. There are a couple of other issues in this scenario too. - The repo is dirty after the failed checkout because the top level repo is updated first. We should probably make 2 passes- top down to pull everything needed, and then do an update once everything is in place. - Something must be reading .hgsubstate from wdir because if the same merge command is run after the timeout, a prompt is issued that the local and remote subrepo diverged, instead of hanging. But it lists the local version and remote version as having the same hash.
Wed, 14 Nov 2018 11:52:13 -0500 tests: allow for 100% of profiled time in sleep in test-profile.t stable
Augie Fackler <augie@google.com> [Wed, 14 Nov 2018 11:52:13 -0500] rev 40439
tests: allow for 100% of profiled time in sleep in test-profile.t I'm getting an annoying failure in this test on our builder, and I *think* what's happening is that the profiler is taking _just_ long enough to start that we're spending 100% of the profiled time in the sleep function, which was causing the leading space to not be printed since the 100 was in the first column of output. Differential Revision: https://phab.mercurial-scm.org/D5272
Wed, 14 Nov 2018 15:06:21 +0800 copystore: provide unit to ui.makeprogress() stable
Anton Shestakov <av6@dwimlabs.net> [Wed, 14 Nov 2018 15:06:21 +0800] rev 40438
copystore: provide unit to ui.makeprogress()
Wed, 14 Nov 2018 15:07:02 +0800 verify: provide unit to ui.makeprogress() stable
Anton Shestakov <av6@dwimlabs.net> [Wed, 14 Nov 2018 15:07:02 +0800] rev 40437
verify: provide unit to ui.makeprogress()
Tue, 13 Nov 2018 19:47:48 -0500 tests: fix wireproto redirection test on systems without tls1.2 stable
Augie Fackler <augie@google.com> [Tue, 13 Nov 2018 19:47:48 -0500] rev 40436
tests: fix wireproto redirection test on systems without tls1.2 Our automated package builder has some ancient configuration that lacks modern TLS, which is how we noticed this. Tested: the test now passes on both macOS High Sierra (has tls1.2) and Ubuntu Trusty (which does not).
Sat, 10 Nov 2018 22:25:12 -0500 phabricator: ensure the command summaries are available in extension help stable
Matt Harbison <matt_harbison@yahoo.com> [Sat, 10 Nov 2018 22:25:12 -0500] rev 40435
phabricator: ensure the command summaries are available in extension help Previously, `hg help phabricator` listed the 3 supported commands at the bottom of the extension help, but said "no help text available".
Fri, 09 Nov 2018 23:49:39 +0000 hgweb: cast bytearray to bytes stable
Gregory Szorc <gregory.szorc@gmail.com> [Fri, 09 Nov 2018 23:49:39 +0000] rev 40434
hgweb: cast bytearray to bytes PEP-3333 seems to indicate that bytes is the only allowed type that can be used to express the output of a WSGI application. And some WSGI environments seem to enforce this (mod_wsgi does). This commit universally casts bytearray instances to bytes to appease the WSGI specification. I found this because wireprotov2 is emitting bytearray instances. I'd like to keep things that way because the way it builds a data structure, bytearray is more efficient. I'd rather keep the low-level code efficient (and using bytearray) and cast at the edges than impose a performance penalty on code that may run outside WSGI contexts.
Thu, 08 Nov 2018 20:04:07 -0500 help: unjumble the list of default config values for `internals.config` stable
Matt Harbison <matt_harbison@yahoo.com> [Thu, 08 Nov 2018 20:04:07 -0500] rev 40433
help: unjumble the list of default config values for `internals.config`
Mon, 05 Nov 2018 15:01:45 -0800 tweakdefaults: remove commands.resolve.mark-check=abort, it is too broken stable
Kyle Lippincott <spectral@google.com> [Mon, 05 Nov 2018 15:01:45 -0800] rev 40432
tweakdefaults: remove commands.resolve.mark-check=abort, it is too broken See issue6020 for the current case. I don't want to continue attempting to fix this on the stable branch, so I'm removing from tweakdefaults and will send fixes meant for the default branch and 4.9. Differential Revision: https://phab.mercurial-scm.org/D5225
Fri, 02 Nov 2018 11:57:45 -0700 resolve: when resolve.mark-check=abort, downgrade to warning if pats specified stable
Kyle Lippincott <spectral@google.com> [Fri, 02 Nov 2018 11:57:45 -0700] rev 40431
resolve: when resolve.mark-check=abort, downgrade to warning if pats specified Previously, with --config resolve.mark-check=abort, running `hg resolve -m foo` would abort and emit a message saying to use --all. This command does not work, though: `hg resolve -m foo --all`, and it's really weird for --all to be the "--force" flag. My original goal with the option was to make it so that `hg resolve -m` (no filename arguments) was safer, which is why --all is used; in my mind, `hg resolve -m foo` should always mark it as resolved, and `--all` is how you specify "all the files", so that's why I chose `hg resolve -m --all` as the way out of `hg resolve -m` aborting. This commit makes all of this work the way it was meant to in my head :) Differential Revision: https://phab.mercurial-scm.org/D5218
Fri, 02 Nov 2018 14:18:29 -0400 Added signature for changeset a91a2837150b stable
Augie Fackler <raf@durin42.com> [Fri, 02 Nov 2018 14:18:29 -0400] rev 40430
Added signature for changeset a91a2837150b
Fri, 02 Nov 2018 14:18:26 -0400 Added tag 4.8 for changeset a91a2837150b stable
Augie Fackler <raf@durin42.com> [Fri, 02 Nov 2018 14:18:26 -0400] rev 40429
Added tag 4.8 for changeset a91a2837150b
Sun, 28 Oct 2018 21:16:36 +0900 rust: fix signature of rustlazyancestors_init() function stable 4.8
Yuya Nishihara <yuya@tcha.org> [Sun, 28 Oct 2018 21:16:36 +0900] rev 40428
rust: fix signature of rustlazyancestors_init() function Obviously, sizeof(int) != mem::size_of::<usize>() on amd64, though the argument would be passed in 64-bit register anyway.
Fri, 02 Nov 2018 21:25:35 +0900 tests: require SQLite 3.8.3+ as sqlitestore relies on "WITH" clause stable
Yuya Nishihara <yuya@tcha.org> [Fri, 02 Nov 2018 21:25:35 +0900] rev 40427
tests: require SQLite 3.8.3+ as sqlitestore relies on "WITH" clause The test fails on gcc112 because the SQLite is too old. https://sqlite.org/changes.html#version_3_8_3
Fri, 19 Oct 2018 22:09:53 +0800 relnotes: various tweaks for release notes stable
Anton Shestakov <av6@dwimlabs.net> [Fri, 19 Oct 2018 22:09:53 +0800] rev 40426
relnotes: various tweaks for release notes Stop filtering out commits that are expected to be covered by releasenotes extension: now we want two lists, one for WhatsNew and one for ReleaseX.Y. Use `only(stoprev, startrev)` to make `relnotes -h` output be actually true about what revisions are included. More filter rules, mostly obvious. More classifying rules to have less things in "unsorted". Looks like nargs=1 was just making args.startrev and args.stoprev be lists for no reason. BC and API sections are renamed to what we're using on the WhatsNew page, and also just skipped if empty.
Thu, 01 Nov 2018 12:52:16 +0100 delta: skip "empty delta" optimisation for non-general case (issue6006) stable
Boris Feld <boris.feld@octobus.net> [Thu, 01 Nov 2018 12:52:16 +0100] rev 40425
delta: skip "empty delta" optimisation for non-general case (issue6006) Non-general delta repository cannot delta against anything than prev. So even if the delta to prev is empty we should use it. This is similar to the change made in bafa1c4bb7a8. Differential Revision: https://phab.mercurial-scm.org/D5201
Thu, 01 Nov 2018 16:32:16 -0700 narrow: fix copies._fullcopytracing() narrowspec filtering in graft case stable
Martin von Zweigbergk <martinvonz@google.com> [Thu, 01 Nov 2018 16:32:16 -0700] rev 40424
narrow: fix copies._fullcopytracing() narrowspec filtering in graft case I broke this too in 707c3804e607 (narrow: move copies overrides to core, 2018-09-28). Hopefully I'm done fixing things broken by that commit now. Differential Revision: https://phab.mercurial-scm.org/D5213
Thu, 01 Nov 2018 16:28:11 -0700 tests: demonstrate broken copies._fullcopytracing() stable
Martin von Zweigbergk <martinvonz@google.com> [Thu, 01 Nov 2018 16:28:11 -0700] rev 40423
tests: demonstrate broken copies._fullcopytracing() Turns out copies._fullcopytracing() was also broken. Differential Revision: https://phab.mercurial-scm.org/D5212
Thu, 01 Nov 2018 13:20:12 -0700 narrow: make copies.pathcopies() filter with narrowspec again stable
Martin von Zweigbergk <martinvonz@google.com> [Thu, 01 Nov 2018 13:20:12 -0700] rev 40422
narrow: make copies.pathcopies() filter with narrowspec again I broke this in 707c3804e607 (narrow: move copies overrides to core, 2018-09-28). Differential Revision: https://phab.mercurial-scm.org/D5203
Thu, 01 Nov 2018 11:24:45 -0700 tests: demonstrate broken copies.pathcopies() stable
Martin von Zweigbergk <martinvonz@google.com> [Thu, 01 Nov 2018 11:24:45 -0700] rev 40421
tests: demonstrate broken copies.pathcopies() Differential Revision: https://phab.mercurial-scm.org/D5202
Wed, 31 Oct 2018 20:32:42 +0100 setup: explain to distutils how we write rc versions stable
"Paul Morelle <paul.morelle@octobus.net" [Wed, 31 Oct 2018 20:32:42 +0100] rev 40420
setup: explain to distutils how we write rc versions When we use a rc version number (e.g. 4.8rc0), bdist_msi is using distutils.StrictVersion to parse it into a tuple of numbers. By default, StrictVersion.version_re only recognizes [ab] for alpha/beta, where mercurial may use '-rc' or 'rc'. This change makes StrictVersion parse correctly our version numbers, so that bdist_msi doesn't fail on rc versions.
Wed, 31 Oct 2018 12:08:37 -0700 changegroup: restore default node ordering (issue6001) stable
Boris Feld <boris.feld@octobus.net> [Wed, 31 Oct 2018 12:08:37 -0700] rev 40419
changegroup: restore default node ordering (issue6001) Changeset db5501d9 changed the default node ordering from "storage" to "linearize". While the new API is more explicit and cleaner, the "linearize" order is problematic on certain repositories like netbeans where it makes bundling slower the more nodes we bundle. Pushing and pulling 100 changesets was ~20% slower and pushing and pulling 1000 changesets was ~600% slower. A very quick analysis of profile traces showed that the pull operation was taking more time creating the delta. Putting back the old default order seems to be the safe option. With more time during the next cycle, we can understand better the impact of sorting with the DAG order by default, the source of the regression and how to mitigate it. /!\ We are still waiting for the full performance impact but with this patch, bundling and pulling locally (not on the performance workstation) 1000 changesets on the netbeans repository is as fast as before the regression. Differential Revision: https://phab.mercurial-scm.org/D5196
Mon, 29 Oct 2018 17:26:25 +0100 changegroup: introduce an explicit linear sorting stable
Boris Feld <boris.feld@octobus.net> [Mon, 29 Oct 2018 17:26:25 +0100] rev 40418
changegroup: introduce an explicit linear sorting We still need to linearize the revisions in some cases, introduce an explicit `linear` sorting before changing back the default order. Differential Revision: https://phab.mercurial-scm.org/D5195
Wed, 31 Oct 2018 21:16:54 +0900 fix: disable use of thread-based worker stable
Yuya Nishihara <yuya@tcha.org> [Wed, 31 Oct 2018 21:16:54 +0900] rev 40417
fix: disable use of thread-based worker getfixes() accesses to repo, changectx, filectx, etc., so I believe there are code paths triggering data race. Mercurial API isn't thread safe in general.
Wed, 31 Oct 2018 15:27:06 +0300 configitems: rename the config to prevent adding an alias in future stable
Pulkit Goyal <pulkit@yandex-team.ru> [Wed, 31 Oct 2018 15:27:06 +0300] rev 40416
configitems: rename the config to prevent adding an alias in future Right now the config option looks like: [experimental.server] stream-narrow-clones= which does not match how config options are generally defined in core. So let's rename this to: [experimental] server.stream-narrow-clones= before the new release so that we don't have to add an alias in future for this. Differential Revision: https://phab.mercurial-scm.org/D5198
Wed, 31 Oct 2018 11:02:08 +0100 sparse-revlog: only refine delta candidates in the sparse case (issue6006) stable
Boris Feld <boris.feld@octobus.net> [Wed, 31 Oct 2018 11:02:08 +0100] rev 40415
sparse-revlog: only refine delta candidates in the sparse case (issue6006) Starting with 5aef5afa8654, a valid delta parent might be "refined". This allows repository using sparse-revlog to produce better delta chain by using better intermediate snapshot base. However, this refining step was performed in all cases, including for repository not using sparse-revlog. This could produce a strange chain in the general delta case and corrupted repository in the non-general delta case. We now skip this step unless sparse-revlog is in use. In issue 6006, Yuya Nishihara provided a test case using an external repository, so we did not include it. Finding "laboratory" condition to reproduce this case and implementing an efficient test reproducing it is a bit tricky. We do not foresee to have the time to provide one by the release date. Differential Revision: https://phab.mercurial-scm.org/D5197
Mon, 29 Oct 2018 16:23:42 -0400 http: work around custom http client classes that refuse extra attrs stable
Augie Fackler <augie@google.com> [Mon, 29 Oct 2018 16:23:42 -0400] rev 40414
http: work around custom http client classes that refuse extra attrs I have no idea what is going on with our custom http client code at Google, but it chokes on these extra attributes we're tucking on http clients. Since it feels more than a little wrong to just stuff extra data on a client, let's degrade gracefully when the client class refuses the attributes.
Thu, 25 Oct 2018 21:33:43 +0800 crecord: make nextsametype() check that parent item exists (issue6009) stable
Anton Shestakov <av6@dwimlabs.net> [Thu, 25 Oct 2018 21:33:43 +0800] rev 40413
crecord: make nextsametype() check that parent item exists (issue6009) Items that represent files in curses interface don't have parents.
Wed, 24 Oct 2018 10:05:13 -0400 help: describe what ui.tweakdefaults changes, concretely stable
Valentin Gatien-Baron <vgatien-baron@janestreet.com> [Wed, 24 Oct 2018 10:05:13 -0400] rev 40412
help: describe what ui.tweakdefaults changes, concretely Currently, one has to look at the code. A couple things are suboptimal: - probably not translatable - lines don't get wrapped (a couple are a bit too long) but it seems to better this way than without help at all. Differential Revision: https://phab.mercurial-scm.org/D5187
Thu, 25 Oct 2018 00:22:42 -0400 logexchange: convert paths to unix when detecting the active path stable
Matt Harbison <matt_harbison@yahoo.com> [Thu, 25 Oct 2018 00:22:42 -0400] rev 40411
logexchange: convert paths to unix when detecting the active path This fixes the problem in the tests[1] where Windows was showing the whole path as the remotename for local repositories. Somebody with a better understanding of this extension should probably take a deeper look. There may be other cases that need to be converted- specifically the `elif not instance` and the missing `else` cases in activepath(). I also noticed when adding debug prints that the absolute path is stored in the file, probably not normalized. (It's wrapped up in $TESTTMP.) [1] https://buildbot.mercurial-scm.org/builders/Win7%20x86_64%20hg%20tests/builds/1042/steps/run-tests.py%20%28python%202.7.13%29/logs/stdio
Wed, 24 Oct 2018 22:40:48 -0400 help: update the default value specified for `profiling.time-track` stable
Matt Harbison <matt_harbison@yahoo.com> [Wed, 24 Oct 2018 22:40:48 -0400] rev 40410
help: update the default value specified for `profiling.time-track` I tried conditionalizing this in a `.. container::` block, but that seemed to add an extra blank line between the main text and the parenthetical.
Wed, 24 Oct 2018 22:24:10 -0400 profiling: revert the default mode back to 'cpu' on Windows stable
Matt Harbison <matt_harbison@yahoo.com> [Wed, 24 Oct 2018 22:24:10 -0400] rev 40409
profiling: revert the default mode back to 'cpu' on Windows On Windows, os.times() only returns user and system times. Real elapsed time is 0. That results in no actual times reported, an end wall time of 0.000000, and seemingly randomly sorted stack frames. This at least provides test stability in test-profile.t. I kind of think that `default=pycompat.iswindows and 'cpu' or 'real'` would be a better way to set the default in configitems, but I didn't see any other examples of this, and thought maybe there's a reason for that. That might allow plugging the value into the help text automatically- the documented default wasn't updated in db0dba2d157d.
Wed, 17 Oct 2018 14:47:01 +0200 phase: add an archived phase stable
Boris Feld <boris.feld@octobus.net> [Wed, 17 Oct 2018 14:47:01 +0200] rev 40408
phase: add an archived phase This phase allows for hidden changesets in the "user space". It differs from the "internal" phase which is intended for internal by-product only. There have been discussions at the 4.8 sprint to use such phase to speedup cleanup after history rewriting operation. Shipping it in the same release as the 'internal-phase' groups the associated `requires` entry. The important bit is to have support for this phase in the earliest version of mercurial possible. Adding the UI to manipulate this new phase later seems fine. The current plan for archived usage and user interface are as follow. On a repository with internal-phase on and evolution off: * history rewriting command set rewritten changeset in the archived phase. (This mean updating the cleanupnodes method). * keep `hg unbundle .hg/strip-backup/X.hg` as a way to restore changeset for now (backup bundle need to contains phase data) * [maybe] add a `hg strip --soft` advance flag (a light way to expose the feature without getting in the way of a better UI) Mercurial 4.8 freeze is too close to get the above in by then. We don't introduce a new repository `requirement` as we reuse the one introduced with the 'archived' phase during the 4.8 cycle.
Tue, 23 Oct 2018 20:46:21 +0900 exewrapper: apply clang-format to silence test-check-clang-format.t stable
Yuya Nishihara <yuya@tcha.org> [Tue, 23 Oct 2018 20:46:21 +0900] rev 40407
exewrapper: apply clang-format to silence test-check-clang-format.t
Mon, 22 Oct 2018 14:48:14 -0400 Added signature for changeset 956ec6f1320d stable
Augie Fackler <raf@durin42.com> [Mon, 22 Oct 2018 14:48:14 -0400] rev 40406
Added signature for changeset 956ec6f1320d
Mon, 22 Oct 2018 14:48:11 -0400 Added tag 4.8rc0 for changeset 956ec6f1320d stable
Augie Fackler <raf@durin42.com> [Mon, 22 Oct 2018 14:48:11 -0400] rev 40405
Added tag 4.8rc0 for changeset 956ec6f1320d
Mon, 22 Oct 2018 14:46:06 -0400 merge to stable for 4.8 release freeze stable 4.8rc0
Augie Fackler <augie@google.com> [Mon, 22 Oct 2018 14:46:06 -0400] rev 40404
merge to stable for 4.8 release freeze
Mon, 22 Oct 2018 11:34:35 -0700 shortest: never emit 0-length prefix even if unique
Martin von Zweigbergk <martinvonz@google.com> [Mon, 22 Oct 2018 11:34:35 -0700] rev 40403
shortest: never emit 0-length prefix even if unique It turned out that the pure version of our code for finding the shortest unique nodeid prefix would return a 0-length string if that was unique (because there was at most one revision in the disambiguation set). That's kind of correct, but it can't be used as input, so we shouldn't return it. Let's just adjust the given minlength up to at least 1. This fixes test-template-functions.t, which was failing in pure mode. Differential Revision: https://phab.mercurial-scm.org/D5181
Mon, 22 Oct 2018 15:51:01 +0200 logtoprocess: sends the canonical command name to the subprocess
Boris Feld <boris.feld@octobus.net> [Mon, 22 Oct 2018 15:51:01 +0200] rev 40402
logtoprocess: sends the canonical command name to the subprocess One of the use-case of logtoprocess is to monitor command duration. With the current code, we only get whatever command name the user typed (either abbreviated or aliased). This makes analytics on the collected data more difficult. Stores the canonical command name in the request object. Pass the stored canonical name in the `req.ui.log("commandfinish", ...)` call as keyword argument to not break potential string formatting. Pass the value as the environment variable named `LTP_COMMAND` to the called script. Differential Revision: https://phab.mercurial-scm.org/D4820
Mon, 22 Oct 2018 15:47:30 +0200 logtoprocess: fix message formatting
Boris Feld <boris.feld@octobus.net> [Mon, 22 Oct 2018 15:47:30 +0200] rev 40401
logtoprocess: fix message formatting The logtoprocess used to try formatting the message using keyword options instead of always using the rest of the arguments. Update it to match blackbox behavior. Differential Revision: https://phab.mercurial-scm.org/D5180
Sat, 18 Aug 2018 01:44:38 +0200 profiling: move default mode to "real" time
Boris Feld <boris.feld@octobus.net> [Sat, 18 Aug 2018 01:44:38 +0200] rev 40400
profiling: move default mode to "real" time Mercurial operations involve a lot of disks or network access. These impact command runtime significantly and it seems important to report them in our default profiling output. Having the right default means that we don't forget them when asking people to produces profiling traces or when doing profiling ourselves. Moving to "real time" by default will remove the need to think about activating it on most occasions. The "CPU" time-based profiling is still accessible when necessary.
Fri, 05 Oct 2018 23:40:12 +0800 streamclone: abort when client needs to handle obsmarkers, but doesn't
Anton Shestakov <av6@dwimlabs.net> [Fri, 05 Oct 2018 23:40:12 +0800] rev 40399
streamclone: abort when client needs to handle obsmarkers, but doesn't When client doesn't have any of obsolescence markers exchange capabilities, then it's safe to say it can't handle obsmarkers. However, if it understands even one format version, then stream clones are fine -- client can use "obsmarkers" bundle2 part.
Fri, 05 Oct 2018 23:27:17 +0800 streamclone: include obsstore file into stream bundle if client can read it
Anton Shestakov <av6@dwimlabs.net> [Fri, 05 Oct 2018 23:27:17 +0800] rev 40398
streamclone: include obsstore file into stream bundle if client can read it
Fri, 19 Oct 2018 18:34:42 -0400 setup: build exewrapper with Unicode support on py3
Matt Harbison <matt_harbison@yahoo.com> [Fri, 19 Oct 2018 18:34:42 -0400] rev 40397
setup: build exewrapper with Unicode support on py3 I didn't see a compiler switch documented anywhere, but I diffed the command line for full VC++ project when toggling between MBCS and Unicode. This is all they do.
Fri, 19 Oct 2018 18:32:13 -0400 exewrapper: convert to _tcsxxx functions for Unicode compatability
Matt Harbison <matt_harbison@yahoo.com> [Fri, 19 Oct 2018 18:32:13 -0400] rev 40396
exewrapper: convert to _tcsxxx functions for Unicode compatability This fixes more than 50 tests on py3 on Windows when enabled, mostly hooks and such that invoked `hg` directly. 187 left to go. I skipped doing the abort printing with Unicode because of apparent issues with MinGW [1]. It may be moot though, as MinGW isn't listed as a supported compiler after 3.4 [2]. [1] https://stackoverflow.com/questions/17700797/printf-wprintf-s-s-ls-char-and-wchar-errors-not-announced-by-a-compil [2] https://wiki.python.org/moin/WindowsCompilers
Fri, 19 Oct 2018 18:23:14 -0400 exewrapper: drop an unused variable
Matt Harbison <matt_harbison@yahoo.com> [Fri, 19 Oct 2018 18:23:14 -0400] rev 40395
exewrapper: drop an unused variable
Thu, 18 Oct 2018 21:14:22 +0900 commands: restore compatibility for "^cmd" registration (issue6005)
Yuya Nishihara <yuya@tcha.org> [Thu, 18 Oct 2018 21:14:22 +0900] rev 40394
commands: restore compatibility for "^cmd" registration (issue6005) This is done at loading time, where ui is available.
Fri, 19 Oct 2018 12:30:49 +0200 exchangev2: support fetching shallow files history
Gregory Szorc <gregory.szorc@gmail.com> [Fri, 19 Oct 2018 12:30:49 +0200] rev 40393
exchangev2: support fetching shallow files history This commit teaches the exchangev2 client code to handle fetching shallow files data. Only shallow fetching of files data is supported: shallow fetching of changeset and manifest data is explicitly not yet supported. Previously, we would fetch file revisions for changesets that were received by the current pull operation. In the new model, we calculate the set of "relevant" changesets given the pull depth and only fetch files data for those changesets. We also teach the "filesdata" command invocation to vary parameters as needed. The implementation here is far from complete or optimal. Subsequent pulls will end up re-fetching a lot of files data. But the application of this data should mostly be a no-op on the client, so it isn't a big deal. Depending on the order file revisions are fetched in, revisions could get inserted with the wrong revision number relationships. I think the best way to deal with this is to remove revision numbers from storage and to either dynamically derive them (by reconstructing a DAG from nodes/parents) or remove revision numbers from the file storage interface completely. A missing API that we'll likely want to write pretty soon is "ensure files for revision(s) are present." We can kind of cajole exchangev2.pull() to do this. But it isn't very efficient. For example, in simple cases like widening the store to obtain data for a single revision, it is probably more efficient to walk the manifest and find exactly which file revisions are missing and to make explicit requests for just their data. In more advanced cases, asking the server for all files data may be more efficient, even though it requires sending data the client already has. There is tons of room for future experimentation here. And TBH I'm not sure what the final state will be. Anyway, this commit gets us pretty close to being able to have shallow and narrow checkouts with exchangev2/sqlite storage. Close enough that a minimal extension should be able to provide fill in the gaps until the code in core stabilizes and there is a user-facing way to trigger the narrow/shallow bits from `hg clone` without also implying using of the narrow extension... Differential Revision: https://phab.mercurial-scm.org/D5169
Wed, 17 Oct 2018 17:32:15 +0200 sqlitestore: support for storing revisions without their parents
Gregory Szorc <gregory.szorc@gmail.com> [Wed, 17 Oct 2018 17:32:15 +0200] rev 40392
sqlitestore: support for storing revisions without their parents This commit kinda/sorta implements the equivalent of ellipsis nodes for the SQLite storage backend. Without implementing full blown ellipsis nodes (and the necessary support for them in the wire protocol), we instead teach the store to rewrite the p1 and p2 nodes to nullid when the incoming parent isn't in the local store. This allows servers to remain dumb and send the real parent and have the clients deal with the missing parent problem. This obviously isn't ideal because a benefit of ellipsis nodes is we can insert a fake parent to ellide missing changesets. But neither solution is ideal because it drops the original parent from storage. We could probably teach the SQLite store to retain the original parent and handle missing parents at read time. However, parent revisions are stored as integers and it isn't trivial to store an "empty" revision in the store yet, which would be necessary to represent the "missing" parent. The store is somewhat intelligent in trying to remove the missing parents metadata when the revision is re-added. But, revision numbers will be all messed up in that case, so I'm not sure it is worth it. At some point we'll likely want to remove the concept of revision numbers from the database and have the store invent them at index generation time. Or even better, we can do away with revision numbers from the file storage interface completely. We'll get there eventually... Differential Revision: https://phab.mercurial-scm.org/D5168
Fri, 19 Oct 2018 15:38:25 +0200 wireprotov2: support exposing linknode of file revisions
Gregory Szorc <gregory.szorc@gmail.com> [Fri, 19 Oct 2018 15:38:25 +0200] rev 40391
wireprotov2: support exposing linknode of file revisions When supporting shallow file storage, clients may fetch file revisions by changeset. But they may not readily know which changeset introduced a specific file revision. The "linknode" is used to record which changeset introduces which file revision. This commit teaches the "filedata" and "filesdata" wire protocol commands to expose the linknode for file revisions. The implementation is likely wrong when hidden changesets are in play, since the linknode may refer to a hidden changeset. We can deal with this problem later. Differential Revision: https://phab.mercurial-scm.org/D5167
Fri, 19 Oct 2018 14:59:03 +0200 localrepo: support marking repos as having shallow file storage
Gregory Szorc <gregory.szorc@gmail.com> [Fri, 19 Oct 2018 14:59:03 +0200] rev 40390
localrepo: support marking repos as having shallow file storage Various operations against repositories need to know if repository storage is full or partial. For example, a checkout (including possibly a widening of a sparse checkout), needs to know if it can assume all file revisions are available or whether to look for missing revisions first. This commit lays the plumbing for doing that. We define a repo creation option that indicates that shallow file storage is desired. The SQLite store uses this creation option to add an extra repo requirement indicating file storage is shallow. A new repository feature has been added to indicate that file storage is shallow. The SQLite store adds this feature when the shallow file store requirement is present. Code can now look at repo.features to determine if repo file storage may be shallow and take additional actions if so. While we're here, we also teach the SQLite store to handle the narrow repo requirement, which gets added when making narrow clones. Differential Revision: https://phab.mercurial-scm.org/D5166
Wed, 26 Sep 2018 14:41:15 -0700 repository: teach addgroup() to receive data with missing parents
Gregory Szorc <gregory.szorc@gmail.com> [Wed, 26 Sep 2018 14:41:15 -0700] rev 40389
repository: teach addgroup() to receive data with missing parents The way the narrow extension works today, the server rewrites outgoing changegroup data to lie about parents when the parents data is missing. It adds the ellipsis flag to the revision so it can be recorded as such in the revlog. In the new wire protocol, such rewriting does not occur on the server (at least not yet anyway). Instead, it is up to the client to recognize when it has received a revision without its parents. This means rewriting will be performed on the client. Furthermore, the mechanism for storing a shallow revision may differ from store to store. For example, the revlog store uses the ellipsis flag to denote a revision's parents have been rewritten. But a non-revlog store may wish to store things differently. And, some stores may not even support receiving shallow revision data! Therefore, it makes sense for the store itself to be making decisions about what to do when they receive revision data without their parents. This commit teaches the addgroup() bulk insert method to accept a boolean argument that indicates whether the incoming data may lack parent revisions. This flag can be set when receiving "shallow" data from a remote. The revlog implementation of this method has been taught to rewrite the missing parent(s) to nullid and to add the ellipsis flag to the revision when a missing parent is encountered. But it only does this if ellipsis flags are enabled on the repo and the incoming data is marked as possibly shallow. An error occurs otherwise. Differential Revision: https://phab.mercurial-scm.org/D5165
Fri, 19 Oct 2018 13:44:25 +0200 commands: support passing depth to hg.clone()
Gregory Szorc <gregory.szorc@gmail.com> [Fri, 19 Oct 2018 13:44:25 +0200] rev 40388
commands: support passing depth to hg.clone() This will allow extensions to add --depth or other arguments to control depth fetching. Differential Revision: https://phab.mercurial-scm.org/D5164
Wed, 03 Oct 2018 14:57:29 -0700 filelog: add a hasnode() method (API)
Gregory Szorc <gregory.szorc@gmail.com> [Wed, 03 Oct 2018 14:57:29 -0700] rev 40387
filelog: add a hasnode() method (API) Missing in the file storage interface is the ability to query whether a specified value is a known node. This commit defines that interface member and implements it on the revlog and sqlite file stores. Storage unit tests have been added. The revlog implementation is a bit more complicated because index lookups don't consistently raise the same exception. For SQLite, we can simply look for a key in a dict. Differential Revision: https://phab.mercurial-scm.org/D5163
Sun, 21 Oct 2018 22:26:00 -0400 lfs: consult the narrow matcher when extracting pointers from ctx (issue5794)
Matt Harbison <matt_harbison@yahoo.com> [Sun, 21 Oct 2018 22:26:00 -0400] rev 40386
lfs: consult the narrow matcher when extracting pointers from ctx (issue5794) I added a testcase for lfs to all narrow tests, and the following failed: test-narrow-acl.t test-narrow-exchange.t test-narrow-patterns.t test-narrow-strip.t test-narrow-trackedcmd.t test-narrow-widen.t test-narrow.t The first two still have errors in the pretxnchangegroup on clone and (receiving a) push, which I'm still looking into (4d63f3bc1e1a fixed something in this area already). These two modified tests seem to cover the things that failed in the remaining narrow tests, i.e. `hg tracked` and `hg strip`, so I didn't bother enabling the testcases elsewhere. Maybe we should, but it's 68 tests total.
Sat, 20 Oct 2018 20:25:56 +0900 statprof: fix overflow while skipping boilerplate parts
Yuya Nishihara <yuya@tcha.org> [Sat, 20 Oct 2018 20:25:56 +0900] rev 40385
statprof: fix overflow while skipping boilerplate parts I got IndexError randomly because of stack[i] where i = len(stack).
Sat, 20 Oct 2018 20:15:48 +0900 statprof: fix indent level of fp.write() (issue6004)
Yuya Nishihara <yuya@tcha.org> [Sat, 20 Oct 2018 20:15:48 +0900] rev 40384
statprof: fix indent level of fp.write() (issue6004) It was changed at 9d3034348c4f by mistake.
(0) -30000 -10000 -3000 -1000 -512 +512 +1000 +3000 +10000 tip