Sat, 04 Aug 2018 21:31:46 -0400 localrepo: better error when a repo exists but we lack permissions
Valentin Gatien-Baron <valentin.gatienbaron@gmail.com> [Sat, 04 Aug 2018 21:31:46 -0400] rev 38986
localrepo: better error when a repo exists but we lack permissions Claiming "repository foo not found" when the repository does exist causes confusion regularly ("where is the typo?"). Differential Revision: https://phab.mercurial-scm.org/D4122
Mon, 06 Aug 2018 11:32:16 -0700 changegroup: extract _revisiondeltanormal() to standalone function
Gregory Szorc <gregory.szorc@gmail.com> [Mon, 06 Aug 2018 11:32:16 -0700] rev 38985
changegroup: extract _revisiondeltanormal() to standalone function It wasn't accessing anything important on the cgpacker that warranted it being a method instead of a function. Differential Revision: https://phab.mercurial-scm.org/D4142
Mon, 06 Aug 2018 11:13:25 -0700 changegroup: inline _revchunk() into group()
Gregory Szorc <gregory.szorc@gmail.com> [Mon, 06 Aug 2018 11:13:25 -0700] rev 38984
changegroup: inline _revchunk() into group() _revchunk() was pretty minimal. I think having all the code for generating data composing the changegroup in one function makes things easier to understand. As part of the refactor, we now call the _revisiondelta* functions explicitly. This paves the road to refactor their argument signatures. Differential Revision: https://phab.mercurial-scm.org/D4141
Mon, 06 Aug 2018 11:06:22 -0700 changegroup: pass mfdicts properly
Gregory Szorc <gregory.szorc@gmail.com> [Mon, 06 Aug 2018 11:06:22 -0700] rev 38983
changegroup: pass mfdicts properly With the narrow code part of core, the hacky pass-argument-via- attribute-on-self can be accomplished with a regular function argument. Differential Revision: https://phab.mercurial-scm.org/D4140
Mon, 06 Aug 2018 11:33:05 -0700 changegroup: pass sorted revisions into group() (API)
Gregory Szorc <gregory.szorc@gmail.com> [Mon, 06 Aug 2018 11:33:05 -0700] rev 38982
changegroup: pass sorted revisions into group() (API) Currently, group() receives a list of nodes and calls _sortgroup() to sort them and turn them into revs. Since the sorting behavior varies depending on the type of data being transferred, I think it makes sense to perform the sorting before group() is invoked. This commit extracts _sortgroup() to a pair of standalone functions. It then moves the calling of these functions to the 3 call sites of group(). group() now receives an iterable of revs instead of nodes. Differential Revision: https://phab.mercurial-scm.org/D4139
Fri, 03 Aug 2018 18:40:41 -0700 changegroup: pull _fileheader out of cgpacker
Gregory Szorc <gregory.szorc@gmail.com> [Fri, 03 Aug 2018 18:40:41 -0700] rev 38981
changegroup: pull _fileheader out of cgpacker It doesn't need any state from the packer. Differential Revision: https://phab.mercurial-scm.org/D4138
Mon, 06 Aug 2018 09:26:02 -0700 changegroup: factor changelogdone into an argument
Gregory Szorc <gregory.szorc@gmail.com> [Mon, 06 Aug 2018 09:26:02 -0700] rev 38980
changegroup: factor changelogdone into an argument The variable was basically tracking whether the current operation is being performed against the changelog or something else. So let's just pass such a flag to everything that needs to access it. I'm still not a huge fan of building changelog awareness into low-level functions like revision delta generation. But passing an argument is strictly better than state on the packer instance. Differential Revision: https://phab.mercurial-scm.org/D4137
Fri, 03 Aug 2018 18:31:00 -0700 changegroup: record changelogdone after fully consuming its data
Gregory Szorc <gregory.szorc@gmail.com> [Fri, 03 Aug 2018 18:31:00 -0700] rev 38979
changegroup: record changelogdone after fully consuming its data Setting this as a side-effect of calling _close() is wonky. There's only one group for changelog data. So we can wait until after all data has been emitted before recording it. Differential Revision: https://phab.mercurial-scm.org/D4136
Mon, 06 Aug 2018 09:24:35 -0700 changegroup: key off changelogdone
Gregory Szorc <gregory.szorc@gmail.com> [Mon, 06 Aug 2018 09:24:35 -0700] rev 38978
changegroup: key off changelogdone We use self._changelogdone for similar checks. Let's make things consistent. Differential Revision: https://phab.mercurial-scm.org/D4135
Mon, 06 Aug 2018 10:43:05 -0700 perf: call _generatechangelog() instead of group()
Gregory Szorc <gregory.szorc@gmail.com> [Mon, 06 Aug 2018 10:43:05 -0700] rev 38977
perf: call _generatechangelog() instead of group() Now that we have a separate function for generating just the changelog bits, the perf command should call it so it gets more accurate behavior. This changes the results of this command on my hg repo significantly: ! wall 1.390502 comb 1.390000 user 1.370000 sys 0.020000 (best of 8) ! wall 1.768750 comb 1.760000 user 1.760000 sys 0.000000 (best of 6) Profiling seems to reveal that ~20% of execution time is spent in progress bar accounting and printing! If we run with progress.disable=true: ! wall 1.639134 comb 1.650000 user 1.630000 sys 0.020000 (best of 7) A nice speedup. But profiling still shows a good chunk of time being spent in progress bar accounting code. The reason is that the progress bar is conditionally enabled via an argument to cgpacker.group(). The previous code in perf.py calling into group() did not enable the progress bar but _generatechangelog() always does. I think it is important for the perf* commands to capture real-world use cases. And this code always runs with an active progress bar. So the regression is acceptable. That being said, terminal printing performance can vary substantially. I don't think perf* commands should test terminal printing unless explicitly desired. So I've disabled progress bar printing in this command. Differential Revision: https://phab.mercurial-scm.org/D4134
Fri, 03 Aug 2018 17:59:56 -0700 changegroup: factor changelog chunk generation into own function
Gregory Szorc <gregory.szorc@gmail.com> [Fri, 03 Aug 2018 17:59:56 -0700] rev 38976
changegroup: factor changelog chunk generation into own function We have separate functions for generating manifests and filelogs. Let's split changelog into its own function so things are consistent. As part of this, we refactor the code slightly. Before, the changelog linknode callback was updating state on variables inherited via a closure. Since the closure is now separate from generate(), we need to a way pass state between generate() and _generatechangelog(). The return value of _generatechangelog() is a 2-tuple where the first item is a dict containing accumulated state. We then alias some of its members into the scope of generate() to reduce code churn. I will be converting other functions to a similar pattern in future commits. Differential Revision: https://phab.mercurial-scm.org/D4133
Fri, 03 Aug 2018 14:16:14 -0700 changegroup: pass function to resolve delta parents into constructor
Gregory Szorc <gregory.szorc@gmail.com> [Fri, 03 Aug 2018 14:16:14 -0700] rev 38975
changegroup: pass function to resolve delta parents into constructor Previously, _deltaparent() encapsulated the logic for all 3 delta parent modes of operation. The choice of delta parent is static for the lifetime of the packer and can be passed into the packer as a callable. So do that. Differential Revision: https://phab.mercurial-scm.org/D4132
Tue, 07 Aug 2018 10:24:49 -0700 changegroup: restore original behavior of _nextclrevtolocalrev
Gregory Szorc <gregory.szorc@gmail.com> [Tue, 07 Aug 2018 10:24:49 -0700] rev 38974
changegroup: restore original behavior of _nextclrevtolocalrev 0548f696795b accidentally changed the behavior of cgpacker._close(). The old behavior moved _nextclrevtolocalrev to _clrevtolocalrev only when _nextclrevtolocalrev was present and then removed _nextclrevtolocalrev. The bad behavior performed this move then cleared _clrevtolocalrev because it was the same object as _nextclrevtolocalrev. This commit restores the previous behavior. Surprisingly, no tests changed as a result of this bad logic. I'm not sure why. Differential Revision: https://phab.mercurial-scm.org/D4155
Thu, 09 Aug 2018 12:03:39 -0400 py3: whitelist another test caught by the ratchet
Augie Fackler <augie@google.com> [Thu, 09 Aug 2018 12:03:39 -0400] rev 38973
py3: whitelist another test caught by the ratchet Differential Revision: https://phab.mercurial-scm.org/D4173
Thu, 09 Aug 2018 11:56:24 -0400 debugcommands: force import of fileset in debugfileset
Augie Fackler <augie@google.com> [Thu, 09 Aug 2018 11:56:24 -0400] rev 38972
debugcommands: force import of fileset in debugfileset It looks like Python 3's lazy importer is better than Python 2's for this command, and as a result we had no symbols in the filesetlang symbol table, which resulted in some really mysterious test-fileset.t failures around withstatus optimizations. Inserting this explicit import and forcing its evaluation fixes the test failure. Differential Revision: https://phab.mercurial-scm.org/D4172
Tue, 07 Aug 2018 17:22:33 -0700 linelog: optimize replacelines
Jun Wu <quark@fb.com> [Tue, 07 Aug 2018 17:22:33 -0700] rev 38971
linelog: optimize replacelines The optimization to avoid calling `annotate` inside `replacelines` is significant for practical use patterns. Before this patch: hg perflinelogedits ! wall 6.778478 comb 6.710000 user 6.700000 sys 0.010000 (best of 3) After this patch: hg perflinelogedits ! wall 0.136573 comb 0.140000 user 0.130000 sys 0.010000 (best of 63) Differential Revision: https://phab.mercurial-scm.org/D4150
Tue, 07 Aug 2018 17:17:01 -0700 linelog: extract `len(self._program)` to a local function
Jun Wu <quark@fb.com> [Tue, 07 Aug 2018 17:17:01 -0700] rev 38970
linelog: extract `len(self._program)` to a local function This is a micro optimization prepared for following changes where `len(self._program)` is used in a loop. Differential Revision: https://phab.mercurial-scm.org/D4149
Mon, 06 Aug 2018 18:56:24 -0700 perf: add a command to benchmark linelog edits
Jun Wu <quark@fb.com> [Mon, 06 Aug 2018 18:56:24 -0700] rev 38969
perf: add a command to benchmark linelog edits The use pattern of creating a linelog is usually by calling "replacelines" multiple times. Add a command to benchmark it. Differential Revision: https://phab.mercurial-scm.org/D4148
Mon, 06 Aug 2018 18:56:24 -0700 linelog: update internal help text
Jun Wu <quark@fb.com> [Mon, 06 Aug 2018 18:56:24 -0700] rev 38968
linelog: update internal help text This clarifies the details asked by @martinvonz on D3990. Differential Revision: https://phab.mercurial-scm.org/D4147
Tue, 07 Aug 2018 21:15:27 -0700 fix: determine fixer tool failure by exit code instead of stderr
Danny Hooper <hooper@google.com> [Tue, 07 Aug 2018 21:15:27 -0700] rev 38967
fix: determine fixer tool failure by exit code instead of stderr This seems like the more natural thing, and it probably should have been this way to beign with. It is more flexible because it allows tools to emit diagnostic information while also modifying a file. An example would be an automatic code formatter that also prints any remaining lint issues. Differential Revision: https://phab.mercurial-scm.org/D4158
Thu, 09 Aug 2018 13:13:09 +0300 status: advertise --abort instead of 'update -C .' to abort graft
Pulkit Goyal <pulkit@yandex-team.ru> [Thu, 09 Aug 2018 13:13:09 +0300] rev 38966
status: advertise --abort instead of 'update -C .' to abort graft Recent release got us a --abort flag for 'hg graft' command which is nice UI and we should advertise that to stop the graft instead of 'update -C .' which is kind of ugly. Differential Revision: https://phab.mercurial-scm.org/D4169
Thu, 09 Aug 2018 12:32:11 +0300 status: advertise --abort instead of 'update -C .' to abort a merge
Pulkit Goyal <pulkit@yandex-team.ru> [Thu, 09 Aug 2018 12:32:11 +0300] rev 38965
status: advertise --abort instead of 'update -C .' to abort a merge status has a part where it shows the conflict information and how to continue or abort. Couple of release ago, we got merge --abort and we should advertise that instead of 'hg update -C .' which is kind of ugly. I know we need to unify the logic here. Differential Revision: https://phab.mercurial-scm.org/D4168
Thu, 09 Aug 2018 12:20:28 +0300 narrow: add '()' to ellipsis in the revset help
Pulkit Goyal <pulkit@yandex-team.ru> [Thu, 09 Aug 2018 12:20:28 +0300] rev 38964
narrow: add '()' to ellipsis in the revset help ellipsis is a revset function and was missing () after it's name in the help text. This might confuse users as they try `hg log -r 'ellipsis'`. Differential Revision: https://phab.mercurial-scm.org/D4167
Thu, 09 Aug 2018 10:11:10 -0400 tests: make all the string constants in test-match.py be bytes
Augie Fackler <augie@google.com> [Thu, 09 Aug 2018 10:11:10 -0400] rev 38963
tests: make all the string constants in test-match.py be bytes Done with python3 contrib/byteify-strings.py tests/test-match.py -i # skip-blame just bytes prefixes Differential Revision: https://phab.mercurial-scm.org/D4171
Thu, 09 Aug 2018 10:10:09 -0400 linelog: fix bytes/str issue in exception raise on Python 3
Augie Fackler <augie@google.com> [Thu, 09 Aug 2018 10:10:09 -0400] rev 38962
linelog: fix bytes/str issue in exception raise on Python 3 Differential Revision: https://phab.mercurial-scm.org/D4170
Thu, 09 Aug 2018 13:13:00 +0200 absorb: following UI conventions
David Demelier <markand@malikania.fr> [Thu, 09 Aug 2018 13:13:00 +0200] rev 38961
absorb: following UI conventions https://www.mercurial-scm.org/wiki/UIGuideline#adding_new_options
Wed, 08 Aug 2018 19:29:02 +0530 grep: search all commits in allfiles mode
Sangeet Kumar Mishra <mail2sangeetmishra@gmail.com> [Wed, 08 Aug 2018 19:29:02 +0530] rev 38960
grep: search all commits in allfiles mode All the commits are added to the 'wanted' set when allfiles mode is enabled. Differential Revision: https://phab.mercurial-scm.org/D4157
Wed, 08 Aug 2018 17:07:27 -0700 dirstate: add comment on why we don't need to check if something is a dir/file
Kyle Lippincott <spectral@google.com> [Wed, 08 Aug 2018 17:07:27 -0700] rev 38959
dirstate: add comment on why we don't need to check if something is a dir/file Differential Revision: https://phab.mercurial-scm.org/D4161
Wed, 08 Aug 2018 17:03:05 -0700 match: add missing "return set()", add FIXME to test to doc a bug
Kyle Lippincott <spectral@google.com> [Wed, 08 Aug 2018 17:03:05 -0700] rev 38958
match: add missing "return set()", add FIXME to test to doc a bug These were both brought up during the codereview of D4130. Differential Revision: https://phab.mercurial-scm.org/D4160
Wed, 08 Aug 2018 16:53:17 -0700 match: correct doc for _rootsdirsandparents after 5a7df82de142
Kyle Lippincott <spectral@google.com> [Wed, 08 Aug 2018 16:53:17 -0700] rev 38957
match: correct doc for _rootsdirsandparents after 5a7df82de142 Differential Revision: https://phab.mercurial-scm.org/D4159
(0) -30000 -10000 -3000 -1000 -300 -100 -50 -30 +30 +50 +100 +300 +1000 +3000 +10000 tip