Sat, 01 Jul 2017 22:38:42 -0700 show: implement "stack" view
Gregory Szorc <gregory.szorc@gmail.com> [Sat, 01 Jul 2017 22:38:42 -0700] rev 33199
show: implement "stack" view People often want to know what they are working on *now*. As part of this, they also commonly want to know how that work is related to other changesets in the repo so they can perform common actions like rebase, histedit, and merge. `hg show work` made headway into this space. However, it is geared towards a complete repo view as opposed to just the current line of work. If you have a lot of in-flight work or the repo has many heads, the output can be overwhelming. The closest thing Mercurial has to "show me the current thing I'm working on" that doesn't require custom revsets is `hg qseries`. And this requires MQ, which completely changes workflows and repository behavior and has horrible performance on large repos. But as sub-optimal as MQ is, it does some things right, such as expose a model of the repo that is easy for people to reason about. This simplicity is why I think a lot of people prefer to use MQ, despite its shortcomings. One common development workflow is to author a series of linear changesets, using bookmarks, branches, anonymous heads, or even topics (3rd party extension). I'll call this a "stack." You periodically rewrite history in place (using `hg histedit`) and reparent the stack against newer changesets (using `hg rebase`). This workflow can be difficult because there is no obvious way to quickly see the current "stack" nor its relation to other changesets. Figuring out arguments to `hg rebase` can be difficult and may require highlighting and pasting multiple changeset nodes to construct a command. The goal of this commit is to make stack based workflows simpler by exposing a view of the current stack and its relationship to other releant changesets, notably the parent of the base changeset in the stack and newer heads that the stack could be rebased or merged into. Introduced is the `hg show stack` view. Essentially, it finds all mutable changesets from the working directory revision in both directions, stopping at a merge or branch point. This limits the revisions to a DAG linear range. The stack is rendered as a concise list of changesets. Alongside the stack is a visualization of the DAG, similar to `hg log -G`. Newer public heads from the branch point of the stack are rendered above the stack. The presence of these heads helps people understand the DAG model and the relationship between the stack and changes made since the branch point of that stack. If the "rebase" command is available, a `hg rebase` command is printed for each head so a user can perform a simple copy and paste to perform a rebase. This view is alpha quality. There are tons of TODOs documented inline. But I think it is good enough for a first iteration.
Wed, 28 Jun 2017 21:30:46 -0400 tests: demonstrate inconsistencies with dirty state in various commands
Matt Harbison <matt_harbison@yahoo.com> [Wed, 28 Jun 2017 21:30:46 -0400] rev 33198
tests: demonstrate inconsistencies with dirty state in various commands Not only is the output of these commands inconsistent with respect to each other when a file is deleted, they are internally inconsistent depending upon whether the deleted file is in the top level repo or a subrepo. It seemed easier to show the problems, rather than describe them. The original goal was to fix the summary command with respect to deleted files. I haven't fixed any of the other issues yet, in case anybody believes the current subrepo behavior is correct. I think a natural understanding of clean/dirty is that they are two opposite values of a single binary repo state. If `hg update --clean -r .` changes a file, then naturally that repo was dirty, and `hg update --check` should have blocked it. Deleted files are special, in that they don't block a commit. But they make the filesystem content not the same as a clean checkout.
Sat, 01 Jul 2017 20:34:27 -0700 check-config: syntax to allow inconsistent config values
Gregory Szorc <gregory.szorc@gmail.com> [Sat, 01 Jul 2017 20:34:27 -0700] rev 33197
check-config: syntax to allow inconsistent config values The ignore regular expression has been updated to detect "inconsistent config." If present, we track which configs have that set and we suppress the conflicting defaults error for those options. I also added named groups to the regexp to aid readability. A comment was added to profiling.py to make a desired inconsistent value error go away.
Fri, 30 Jun 2017 03:28:02 +0200 configitems: register the 'badserver.closebeforeaccept' config
Pierre-Yves David <pierre-yves.david@octobus.net> [Fri, 30 Jun 2017 03:28:02 +0200] rev 33196
configitems: register the 'badserver.closebeforeaccept' config
Fri, 30 Jun 2017 03:27:54 +0200 configitems: register the 'badserver.closeaftersendbytes' config
Pierre-Yves David <pierre-yves.david@octobus.net> [Fri, 30 Jun 2017 03:27:54 +0200] rev 33195
configitems: register the 'badserver.closeaftersendbytes' config
Fri, 30 Jun 2017 03:27:44 +0200 configitems: register the 'badserver.closeafterrecvbytes' config
Pierre-Yves David <pierre-yves.david@octobus.net> [Fri, 30 Jun 2017 03:27:44 +0200] rev 33194
configitems: register the 'badserver.closeafterrecvbytes' config
Fri, 30 Jun 2017 03:27:36 +0200 configitems: register the 'badserver.closeafteraccept' config
Pierre-Yves David <pierre-yves.david@octobus.net> [Fri, 30 Jun 2017 03:27:36 +0200] rev 33193
configitems: register the 'badserver.closeafteraccept' config
Fri, 30 Jun 2017 03:28:18 +0200 configitems: register the 'blackbox.logsource' config
Pierre-Yves David <pierre-yves.david@octobus.net> [Fri, 30 Jun 2017 03:28:18 +0200] rev 33192
configitems: register the 'blackbox.logsource' config
Fri, 30 Jun 2017 03:28:11 +0200 configitems: register the 'blackbox.dirty' config
Pierre-Yves David <pierre-yves.david@octobus.net> [Fri, 30 Jun 2017 03:28:11 +0200] rev 33191
configitems: register the 'blackbox.dirty' config
Fri, 30 Jun 2017 03:27:24 +0200 configitems: register the 'automv.similarity' config
Pierre-Yves David <pierre-yves.david@octobus.net> [Fri, 30 Jun 2017 03:27:24 +0200] rev 33190
configitems: register the 'automv.similarity' config Default value has been ported.
Sat, 01 Jul 2017 20:58:34 +0200 acl: use configlist to retrieve the source config
Pierre-Yves David <pierre-yves.david@octobus.net> [Sat, 01 Jul 2017 20:58:34 +0200] rev 33189
acl: use configlist to retrieve the source config This is what the previous code was about.
Fri, 30 Jun 2017 03:27:07 +0200 configitems: register the 'acl.sources' config
Pierre-Yves David <pierre-yves.david@octobus.net> [Fri, 30 Jun 2017 03:27:07 +0200] rev 33188
configitems: register the 'acl.sources' config The existing default value is now formally declared. It seems like the whole config should be a list, but this is an adventure for the next changesets.
Fri, 30 Jun 2017 03:26:57 +0200 configitems: register the 'acl.config' config
Pierre-Yves David <pierre-yves.david@octobus.net> [Fri, 30 Jun 2017 03:26:57 +0200] rev 33187
configitems: register the 'acl.config' config
Wed, 28 Jun 2017 13:31:51 +0200 config: register the 'devel.legacy.exchange' config
Pierre-Yves David <pierre-yves.david@octobus.net> [Wed, 28 Jun 2017 13:31:51 +0200] rev 33186
config: register the 'devel.legacy.exchange' config
Fri, 30 Jun 2017 03:31:35 +0200 configitems: register the 'bundle.reorder' config
Pierre-Yves David <pierre-yves.david@octobus.net> [Fri, 30 Jun 2017 03:31:35 +0200] rev 33185
configitems: register the 'bundle.reorder' config
Fri, 30 Jun 2017 03:31:26 +0200 configitems: register the 'bundle.mainreporoot' config
Pierre-Yves David <pierre-yves.david@octobus.net> [Fri, 30 Jun 2017 03:31:26 +0200] rev 33184
configitems: register the 'bundle.mainreporoot' config
Fri, 30 Jun 2017 03:28:28 +0200 configitems: register the 'bookmarks.pushing' config
Pierre-Yves David <pierre-yves.david@octobus.net> [Fri, 30 Jun 2017 03:28:28 +0200] rev 33183
configitems: register the 'bookmarks.pushing' config
Fri, 30 Jun 2017 03:27:18 +0200 configitems: register the 'auth.cookiefile' config
Pierre-Yves David <pierre-yves.david@octobus.net> [Fri, 30 Jun 2017 03:27:18 +0200] rev 33182
configitems: register the 'auth.cookiefile' config
Fri, 30 Jun 2017 03:32:09 +0200 configitems: register the 'color.mode' config
Pierre-Yves David <pierre-yves.david@octobus.net> [Fri, 30 Jun 2017 03:32:09 +0200] rev 33181
configitems: register the 'color.mode' config
Sat, 01 Jul 2017 21:57:17 +0200 zeroconf: blindly forward extra argument to the core config method
Pierre-Yves David <pierre-yves.david@octobus.net> [Sat, 01 Jul 2017 21:57:17 +0200] rev 33180
zeroconf: blindly forward extra argument to the core config method The new default value handling is simpler if we let the original function handle everything.
Sat, 01 Jul 2017 20:16:54 +0200 configitem: fix default value for 'serverrequirecert'
Pierre-Yves David <pierre-yves.david@octobus.net> [Sat, 01 Jul 2017 20:16:54 +0200] rev 33179
configitem: fix default value for 'serverrequirecert'
Fri, 30 Jun 2017 01:47:49 +0900 localrepo: factor out base of filecache annotation class
FUJIWARA Katsunori <foozy@lares.dti.ne.jp> [Fri, 30 Jun 2017 01:47:49 +0900] rev 33178
localrepo: factor out base of filecache annotation class It isn't needed that storecache is derived from repofilecache. Changes in this patch allow repofilecache and storecache to do in own __init__() differently from each other.
Fri, 30 Jun 2017 01:47:48 +0900 manifest: apply checkambig=True only for root 00manifest.i
FUJIWARA Katsunori <foozy@lares.dti.ne.jp> [Fri, 30 Jun 2017 01:47:48 +0900] rev 33177
manifest: apply checkambig=True only for root 00manifest.i This is a fix for my 14ad8e2a4abe, which used 'bool(dir)' as checkambig value for revlog.__init__(). I can't remember why I did so in 14ad8e2a4abe, but this is obviously wrong, because only root indexfile is cached via filecache-ed property of localrepository.
Sat, 01 Jul 2017 19:35:17 -0700 revlog: address review feedback for deltachain C implementation
Gregory Szorc <gregory.szorc@gmail.com> [Sat, 01 Jul 2017 19:35:17 -0700] rev 33176
revlog: address review feedback for deltachain C implementation * Scope of "value" is reduced * index_baserev() is documented * Error is no longer redundantly set for -2 return values * Error values are compared <= -2 instead of == -2 to protect against odd failure scenarios
Sat, 01 Jul 2017 15:13:09 -0400 test-rebase-interruptions: stabilize for Windows
Matt Harbison <matt_harbison@yahoo.com> [Sat, 01 Jul 2017 15:13:09 -0400] rev 33175
test-rebase-interruptions: stabilize for Windows External hooks end up launching cmd.exe, which knows nothing about $VAR syntax. For some reason, I thought that Mercurial would substitute in the value, in order to paper over the platform difference. But I can't find that in the documentation, and there's at least one other use of this pattern [1]. [1] https://www.mercurial-scm.org/repo/hg/file/tip/tests/test-histedit-fold.t#l477
Fri, 30 Jun 2017 23:15:09 -0700 drawdag: inline transaction() function
Martin von Zweigbergk <martinvonz@google.com> [Fri, 30 Jun 2017 23:15:09 -0700] rev 33174
drawdag: inline transaction() function I suspect Jun wrote the method before he learnt that Python 2.7 allows multiple context managers in a single with-clause.
Sun, 25 Jun 2017 12:41:34 -0700 revlog: C implementation of delta chain resolution
Gregory Szorc <gregory.szorc@gmail.com> [Sun, 25 Jun 2017 12:41:34 -0700] rev 33173
revlog: C implementation of delta chain resolution I've seen revlog._deltachain() appear in a number of performance profiles. I suspect there are 2 reasons for this: 1. Delta chain resolution performs many index lookups, thus triggering population of index tuples. Creating possibly tens of thousands of PyObject will have overhead. 2. Delta chain resolution is a tight loop. By moving delta chain resolution to C, we can defer instantiation of full index entry tuples and make the loop faster courtesy of not running in Python. We can measure the impact to delta chain resolution via `hg perflogrevision` using the mozilla-central repo with a recent manifest having delta chain length of 33726: $ hg perfrevlogrevision -m 364895 ! full ! wall 0.367585 comb 0.370000 user 0.340000 sys 0.030000 (best of 27) ! wall 0.357581 comb 0.360000 user 0.350000 sys 0.010000 (best of 28) ! deltachain ! wall 0.010644 comb 0.010000 user 0.010000 sys 0.000000 (best of 270) ! wall 0.000292 comb 0.000000 user 0.000000 sys 0.000000 (best of 8729) $ hg perfrevlogrevision --cache -m 364895 ! deltachain ! wall 0.003904 comb 0.000000 user 0.000000 sys 0.000000 (best of 712) ! wall 0.000284 comb 0.000000 user 0.000000 sys 0.000000 (best of 9926) The first test measures savings from both not instantiating index entries and moving to C. The second test (which doesn't clear the index caches) essentially isolates the benefits of moving from Python to C. It still shows a 13.7x speedup (versus 36.4x). And there are multiple milliseconds of savings within the critical path for resolving revision data. I think that justifies the existence of C code. A more striking example of the benefits of this change can be demonstrated by timing `hg debugdeltachain -m` for the mozilla-central repo: $ time hg debugdeltachain -m > /dev/null before: 1057.4s after: 503.3s PyPy2.7 5.8.0: 220.0s It's worth noting that the C code isn't as optimal as it could be. We're still instantiating a new PyObject for every revision. A future optimization would be to reuse the PyObject on the cached index tuple. We could potentially also get wins by using a memory array of raw integers. There is also room for a delta chain cache on revlog instances. Of course, the best optimization is to implement revlog reading outside of Python so Python doesn't need to be concerned about the relatively expensive index entries and operations on them.
Wed, 28 Jun 2017 13:32:36 +0200 config: register the 'devel.strip-obsmarkers' config
Pierre-Yves David <pierre-yves.david@octobus.net> [Wed, 28 Jun 2017 13:32:36 +0200] rev 33172
config: register the 'devel.strip-obsmarkers' config The single explicit default that existed so far is converted to registered config value.
Wed, 28 Jun 2017 13:32:28 +0200 config: register the 'devel.serverrequirecert' config
Pierre-Yves David <pierre-yves.david@octobus.net> [Wed, 28 Jun 2017 13:32:28 +0200] rev 33171
config: register the 'devel.serverrequirecert' config
Wed, 28 Jun 2017 13:32:18 +0200 config: register the 'devel.serverexactprotocol' config
Pierre-Yves David <pierre-yves.david@octobus.net> [Wed, 28 Jun 2017 13:32:18 +0200] rev 33170
config: register the 'devel.serverexactprotocol' config
Wed, 28 Jun 2017 13:32:07 +0200 config: register the 'devel.servercafile' config
Pierre-Yves David <pierre-yves.david@octobus.net> [Wed, 28 Jun 2017 13:32:07 +0200] rev 33169
config: register the 'devel.servercafile' config
Wed, 28 Jun 2017 13:31:18 +0200 config: register the 'devel.disableloaddefaultcerts' config
Pierre-Yves David <pierre-yves.david@octobus.net> [Wed, 28 Jun 2017 13:31:18 +0200] rev 33168
config: register the 'devel.disableloaddefaultcerts' config
(0) -30000 -10000 -3000 -1000 -300 -100 -50 -32 +32 +50 +100 +300 +1000 +3000 +10000 tip