Thu, 02 Aug 2018 13:35:13 -0700 help: add quotes to a few commands we point to
Martin von Zweigbergk <martinvonz@google.com> [Thu, 02 Aug 2018 13:35:13 -0700] rev 38810
help: add quotes to a few commands we point to I didn't know that 'hg help "revsets.x or y"' was valid syntax, so the quoting is extra useful here to make it clear that that is an actual command. Differential Revision: https://phab.mercurial-scm.org/D4059
Wed, 01 Aug 2018 23:25:35 -0400 linelog: port to Python 3
Augie Fackler <augie@google.com> [Wed, 01 Aug 2018 23:25:35 -0400] rev 38809
linelog: port to Python 3 Differential Revision: https://phab.mercurial-scm.org/D4051
Sat, 28 Jul 2018 17:42:36 -0700 exchange: move simple narrow changegroup generation from extension
Gregory Szorc <gregory.szorc@gmail.com> [Sat, 28 Jul 2018 17:42:36 -0700] rev 38808
exchange: move simple narrow changegroup generation from extension The narrow extension completely replaced the function generating the changegroup part when a narrow changegroup was requested. Previous commits have taught the in-core changegroup code how to filter files based on a matcher. This commit teaches the in-core bundle2 part generation code to construct a matcher based on arguments. It will also emit a bundle2 part describing the narrow spec. I believe the changegroup part generation code in the narrow extension is now limited to ellipsis serving mode. i.e. core is now capable of narrow changegroup generation when ellipsis mode is disabled. Differential Revision: https://phab.mercurial-scm.org/D4014
Sat, 28 Jul 2018 17:33:20 -0700 exchange: make narrow ACL presence imply narrow=True
Gregory Szorc <gregory.szorc@gmail.com> [Sat, 28 Jul 2018 17:33:20 -0700] rev 38807
exchange: make narrow ACL presence imply narrow=True And refactor the logic for determining when to invoke our custom changegroup part function so it is only conditional on narrow being set. This makes it more obvious under which conditions we should invoke the custom implementation. Also use raw strings so **kwargs works on Python 3. Differential Revision: https://phab.mercurial-scm.org/D4013
Sat, 28 Jul 2018 14:52:46 -0700 changegroup: inline prune() logic from narrow
Gregory Szorc <gregory.szorc@gmail.com> [Sat, 28 Jul 2018 14:52:46 -0700] rev 38806
changegroup: inline prune() logic from narrow prune() needs to ellide manifests that aren't part of the narrow matcher. The code is violating storage abstractions, so a comment has been added. Keep in mind the impetus for moving this code to core is so changegroup code can be refactored to be storage agnostic. Differential Revision: https://phab.mercurial-scm.org/D4012
Sun, 22 Jul 2018 15:50:45 +0900 fileset: extract language processing part to new module (API)
Yuya Nishihara <yuya@tcha.org> [Sun, 22 Jul 2018 15:50:45 +0900] rev 38805
fileset: extract language processing part to new module (API) I'll add a couple more functions that work on parsed tree. % wc -l mercurial/fileset*.py 559 mercurial/fileset.py 135 mercurial/filesetlang.py 694 total
Sat, 21 Jul 2018 15:23:56 +0900 fileset: flatten 'or' nodes to unnest unionmatchers
Yuya Nishihara <yuya@tcha.org> [Sat, 21 Jul 2018 15:23:56 +0900] rev 38804
fileset: flatten 'or' nodes to unnest unionmatchers This also makes it easier to compile a union of basic patterns into a single regexp pattern.
Sat, 21 Jul 2018 15:14:38 +0900 fileset: flatten arguments list
Yuya Nishihara <yuya@tcha.org> [Sat, 21 Jul 2018 15:14:38 +0900] rev 38803
fileset: flatten arguments list Just prepares for flattening 'or' nodes. This change would have no impact on performance.
Sat, 21 Jul 2018 15:05:40 +0900 debugfileset: add option to show matcher representation
Yuya Nishihara <yuya@tcha.org> [Sat, 21 Jul 2018 15:05:40 +0900] rev 38802
debugfileset: add option to show matcher representation
Sat, 21 Jul 2018 14:52:36 +0900 debugfileset: backport --show-stage option from debugrevspec
Yuya Nishihara <yuya@tcha.org> [Sat, 21 Jul 2018 14:52:36 +0900] rev 38801
debugfileset: backport --show-stage option from debugrevspec I'll add some static optimizations to fileset.
Sun, 22 Jul 2018 16:03:48 +0900 lfs: remove callstatus property from 'lfs()' fileset
Yuya Nishihara <yuya@tcha.org> [Sun, 22 Jul 2018 16:03:48 +0900] rev 38800
lfs: remove callstatus property from 'lfs()' fileset It was added at 91aac8e6604d, but is no longer needed since a fileset expression is now compiled into an "open" matcher. See ff5b6fca1082 for details.
Thu, 05 Jul 2018 10:42:48 +0530 rebase: support "history-editing-backup" config option
Sushil khanchi <sushilkhanchi97@gmail.com> [Thu, 05 Jul 2018 10:42:48 +0530] rev 38799
rebase: support "history-editing-backup" config option If you don't want to store any backup while rebasing, you can use `history-editing-backup` config option. [ui] history-editing-backup = # True or False Current status of list of commands which supports this config: 1. histedit 2. rebase Differential Revision: https://phab.mercurial-scm.org/D3887
Wed, 01 Aug 2018 16:06:53 +0200 extensions: add detailed loading information
Martijn Pieters <mj@zopatista.com> [Wed, 01 Aug 2018 16:06:53 +0200] rev 38798
extensions: add detailed loading information This lets you track down what exactly is happening during extension loading, and how long various steps took.
Wed, 01 Aug 2018 16:05:41 +0200 util: create a context manager to handle timing
Martijn Pieters <mj@zopatista.com> [Wed, 01 Aug 2018 16:05:41 +0200] rev 38797
util: create a context manager to handle timing The context manager is pulled out of the timed decorator function, and refactored to provide a stats instance, with added tests.
Wed, 01 Aug 2018 23:08:18 -0400 linelog: fix import statements to pass the import checker on py3
Augie Fackler <augie@google.com> [Wed, 01 Aug 2018 23:08:18 -0400] rev 38796
linelog: fix import statements to pass the import checker on py3 Differential Revision: https://phab.mercurial-scm.org/D4050
Mon, 30 Jul 2018 10:42:37 -0400 linelog: add a Python implementation of the linelog datastructure
Augie Fackler <augie@google.com> [Mon, 30 Jul 2018 10:42:37 -0400] rev 38795
linelog: add a Python implementation of the linelog datastructure This datastructure was originally developed by Jun Wu at Facebook, inspired by SCCS weaves. It's useful as a cache for blame information, but also is the magic that makes `hg absorb` easy to implement. In service of importing the code to Mercurial, I wanted to actually /understand/ it, and once I did I decided to take a run at implementing it. The help/internals/linelog.txt document is the README from Jun Wu's implementaiton. It all applies to our linelog implementation. Differential Revision: https://phab.mercurial-scm.org/D3990
Sat, 28 Jul 2018 11:40:31 -0700 changegroup: move file matcher from narrow extension
Gregory Szorc <gregory.szorc@gmail.com> [Sat, 28 Jul 2018 11:40:31 -0700] rev 38794
changegroup: move file matcher from narrow extension Sparse changegroup generation requires the use of a matcher to filter which files are relevant. This commit moves the file matcher from the narrow extension to core and updates the narrow extension to use it. I'm not sure why the narrow extension was storing the matcher as a callable that resolved to a matcher. So I changed it to be a simple matcher instance. In addition, code from narrow to intersect the matcher with the local narrow spec is now performed automatically when the changegroup packer is created. If a matcher is not passed into getbundler() an alwaysmatcher() is assumed. This ensures that a matcher is always defined for all operations. Differential Revision: https://phab.mercurial-scm.org/D4011
Thu, 26 Jul 2018 17:11:03 -0700 resolve: add option to warn/abort on -m with unresolved conflict markers
Kyle Lippincott <spectral@google.com> [Thu, 26 Jul 2018 17:11:03 -0700] rev 38793
resolve: add option to warn/abort on -m with unresolved conflict markers When a user is dropped out of Mercurial to a terminal to resolve files, we emit messages like: conflicts while merging file1! (edit, then use 'hg resolve --mark') conflicts while merging file2! (edit, then use 'hg resolve --mark') We don't mention a file name in the hint, so some users might do something like `$EDITOR file1; hg resolve --mark`, see that it says "(no more unresolved files)" and forget to deal with file2 before running the next command. Even if we did mention a file name in the hint, it's too easy to forget it (maybe the merge spans a couple days or something). This option lets us inform the user that they might have missed something. In the scenario above, the output would be something like: warning: the following files still have conflict markers: file2 (no more unresolved files) Differential Revision: https://phab.mercurial-scm.org/D4035
Mon, 02 Jul 2018 18:39:48 -0700 exchange: refactor control flow of _getbundlechangegrouppart()
Gregory Szorc <gregory.szorc@gmail.com> [Mon, 02 Jul 2018 18:39:48 -0700] rev 38792
exchange: refactor control flow of _getbundlechangegrouppart() The use of early return makes the control flow of this function much easier to reason about IMO. Differential Revision: https://phab.mercurial-scm.org/D4010
Mon, 02 Jul 2018 18:32:20 -0700 exchange: move _computeellipsis() from narrow
Gregory Szorc <gregory.szorc@gmail.com> [Mon, 02 Jul 2018 18:32:20 -0700] rev 38791
exchange: move _computeellipsis() from narrow This is also referenced as part of the narrow changegroup code and therefore needs to move to core before we can integrate the narrow changegroup code into core. Differential Revision: https://phab.mercurial-scm.org/D4009
Mon, 02 Jul 2018 18:24:26 -0700 exchange: move narrow acl functionality into core
Gregory Szorc <gregory.szorc@gmail.com> [Mon, 02 Jul 2018 18:24:26 -0700] rev 38790
exchange: move narrow acl functionality into core This function is called by the custom changegroup generation code in the narrow extension. I want to move that changegroup code into core. That means we need to move this function. The code is kinda hacky in that assumes existence of REMOTE_USER, which is only present on authenticated HTTP requests. I've added a comment indicating that. Differential Revision: https://phab.mercurial-scm.org/D4008
Sat, 28 Jul 2018 10:41:23 -0700 exchange: move disabling of rev-branch-cache bundle part out of narrow
Gregory Szorc <gregory.szorc@gmail.com> [Sat, 28 Jul 2018 10:41:23 -0700] rev 38789
exchange: move disabling of rev-branch-cache bundle part out of narrow I'm attempting to refactor changegroup code in order to better support alternate storage backends. The narrow extension is performing a lot of monkeypatching to this code and it is making it difficult to reason about how everything works. I'm reasonably certain I would be unable to abstract storage without requiring extensive rework of narrow. I believe it is less effort to move narrow code into core so it can be accounted for when changegroup code is refactored. So I'll be doing that. The first part of this is integrating the disabling of the cache:rev-branch-cache bundle2 part into core. This doesn't seem like it is related to changegroup, but narrow's modifications to changegroup are invasive and also require taking its code for bundle generation and exchange into core in order for the changegroup code to work. Differential Revision: https://phab.mercurial-scm.org/D4007
Tue, 24 Jul 2018 10:47:42 -0700 dispatch: show a short error message when invalid global option given
Martin von Zweigbergk <martinvonz@google.com> [Tue, 24 Jul 2018 10:47:42 -0700] rev 38788
dispatch: show a short error message when invalid global option given Similar reasoning as the previous patch. Differential Revision: https://phab.mercurial-scm.org/D4025
Tue, 24 Jul 2018 10:22:07 -0700 dispatch: don't show list of commands on bogus command
Martin von Zweigbergk <martinvonz@google.com> [Tue, 24 Jul 2018 10:22:07 -0700] rev 38787
dispatch: don't show list of commands on bogus command If a command is ambiguous, you get this: $ hg ve hg: command 've' is ambiguous: verify version [255] If you typo a command, you get this: $ hg comit hg: unknown command 'comit' (did you mean one of commit, incoming, mycommit?) [255] But if you completely mistype a command so it no longer looks like any existing commands, you get a full list of commands. That might be useful the first time you use Mercurial, but after that it's probably more annoying than help, especially if you have the pager enabled and have a short terminal. Let's instead give a short hint telling the user to run `hg help` for more help. Differential Revision: https://phab.mercurial-scm.org/D4024
Tue, 24 Jul 2018 22:51:11 -0700 histedit: avoid repeating name of state file in a few places
Martin von Zweigbergk <martinvonz@google.com> [Tue, 24 Jul 2018 22:51:11 -0700] rev 38786
histedit: avoid repeating name of state file in a few places We can depend on the state object instead. Differential Revision: https://phab.mercurial-scm.org/D4006
Wed, 01 Aug 2018 13:10:07 -0700 py3: stop rewriting xrange() to pycompat.xrange()
Gregory Szorc <gregory.szorc@gmail.com> [Wed, 01 Aug 2018 13:10:07 -0700] rev 38785
py3: stop rewriting xrange() to pycompat.xrange() We now require the use of pycompat.xrange() in source. One less feature in the module importer gets us one step closer to Python 3 native source code. Differential Revision: https://phab.mercurial-scm.org/D4034
Wed, 01 Aug 2018 13:08:00 -0700 check-code: ban use of bare xrange()
Gregory Szorc <gregory.szorc@gmail.com> [Wed, 01 Aug 2018 13:08:00 -0700] rev 38784
check-code: ban use of bare xrange() We want everyone to use pycompat.xrange(). Differential Revision: https://phab.mercurial-scm.org/D4033
Wed, 01 Aug 2018 13:00:45 -0700 global: use pycompat.xrange()
Gregory Szorc <gregory.szorc@gmail.com> [Wed, 01 Aug 2018 13:00:45 -0700] rev 38783
global: use pycompat.xrange() On Python 3, our module importer automatically rewrites xrange() to pycompat.xrange(). We want to move away from the custom importer on Python 3. This commit converts all instances of xrange() to use pycompat.xrange(). Differential Revision: https://phab.mercurial-scm.org/D4032
Wed, 01 Aug 2018 12:57:15 -0700 pycompat: add xrange alias for Python 2
Gregory Szorc <gregory.szorc@gmail.com> [Wed, 01 Aug 2018 12:57:15 -0700] rev 38782
pycompat: add xrange alias for Python 2 We assign xrange on Python 3 but not Python 2. Adding the missing symbol on Python 2 allows us to use `pycompat.xrange` to get a generator range function. Differential Revision: https://phab.mercurial-scm.org/D4031
Tue, 31 Jul 2018 19:37:54 +0200 manifest: persist the manifestfulltext cache
Martijn Pieters <mj@zopatista.com> [Tue, 31 Jul 2018 19:37:54 +0200] rev 38781
manifest: persist the manifestfulltext cache Reconstructing the manifest from the revlog takes time, so much so that there already is a LRU cache to avoid having to load a manifest multiple times. This patch persists that LRU cache in the .hg/cache directory, so we can re-use this cache across hg commands. Commit benchmark (run on Macos 10.13 on a 2017-model Macbook Pro with Core i7 2.9GHz and flash drive), testing without and with patch run 5 times, baseline is r2a227782e754: * committing to an existing file, against the mozilla-central repository. Baseline real time average 1.9692, with patch 1.3786. A new debugcommand "hg debugmanifestfulltextcache" lets you inspect the cache, clear it, or add specific manifest nodeids to it. When calling repo.updatecaches(), the manifest(s) for the working copy parents are added to the cache. The hg perfmanifest command has an additional --clear-disk switch to clear this cache when testing manifest loading performance. Using this command to test performance on the firefox repository for revision f947d902ed91, whose manifest has a delta chain length of 60540, we see: $ hg perfmanifest f947d902ed91 --clear-disk ! wall 0.972253 comb 0.970000 user 0.850000 sys 0.120000 (best of 10) $ hg debugmanifestfulltextcache -a `hg log --debug -r f947d902ed91 | grep manifest | cut -d: -f3` Cache contains 1 manifest entries, in order of most to least recent: id: 0294517df4aad07c70701db43bc7ff24c3ce7dbc, size 25.6 MB Total cache data size 25.6 MB, on-disk 0 bytes $ hg perfmanifest f947d902ed91 ! wall 0.036748 comb 0.040000 user 0.020000 sys 0.020000 (best of 100) Worst-case scenario: a manifest text loaded from a single delta; in the firefox repository manifest node 9a1246ff762e is the chain base for the manifest attached to revision f947d902ed91. Loading this from a full cache file is just as fast as without the cache; the extra node ids ensure a big full cache: $ for node in 9a1246ff762e 1a1922c14a3e 54a31d11a36a 0294517df4aa; do > hgd debugmanifestfulltextcache -a $node > /dev/null > done $ hgd perfmanifest -m 9a1246ff762e ! wall 0.077513 comb 0.080000 user 0.030000 sys 0.050000 (best of 100) $ hgd perfmanifest -m 9a1246ff762e --clear-disk ! wall 0.078547 comb 0.080000 user 0.070000 sys 0.010000 (best of 100)
(0) -30000 -10000 -3000 -1000 -300 -100 -50 -30 +30 +50 +100 +300 +1000 +3000 +10000 tip