Sat, 05 Dec 2015 17:52:50 -0800 setup.py: don't rewrite @LIBDIR@ when creating wheels
Gregory Szorc <gregory.szorc@gmail.com> [Sat, 05 Dec 2015 17:52:50 -0800] rev 27269
setup.py: don't rewrite @LIBDIR@ when creating wheels This is necessary to produce wheels that install properly. More details are captured in an in-line comment. After this patch, produced wheels can be installed via `pip install` and appear to "just work," including on Windows.
Fri, 04 Dec 2015 00:24:48 -0800 setup.py: attempt to build and install hg.exe on Windows
Gregory Szorc <gregory.szorc@gmail.com> [Fri, 04 Dec 2015 00:24:48 -0800] rev 27268
setup.py: attempt to build and install hg.exe on Windows Currently, packaging Mercurial on Windows will produce a Scripts\hg Python script and a Scripts\hg.bat batch script. The py2exe distribution contains a hg.exe which loads a Python interpretter and invokes the "hg" Python script. Running a exe directly has benefits over batch scripts because batch scripts do things like muck around with command arguments. This patch implements a custom "build_scripts" command which attempts to build hg.exe on Windows. If hg.exe is built, it is marked as a "script" file and installed into the Scripts\ directory on Windows. Since hg.exe is redundant and better than hg.bat, if hg.exe is built, hg.bat is not installed. Since some environments don't support compiling C programs, we treat hg.exe as optional and catch failures building it. This is not ideal. However, I reckon most Windows users will not be installing Mercurial from source: they will get it from the MSI installer or via `pip install Mercurial`, which will download a wheel that has hg.exe in it. So, I don't think this is a big deal.
Thu, 03 Dec 2015 23:01:59 -0500 merge.graft: add option to keep second parent
Andrew Halberstadt <ahalberstadt@mozilla.com> [Thu, 03 Dec 2015 23:01:59 -0500] rev 27267
merge.graft: add option to keep second parent Currently merge.graft re-writes the dirstate so only a single parent is kept. For some cases, like evolving a merge commit, this behaviour is not desired. More specifically, this is needed to fix issue4389.
Sat, 05 Dec 2015 21:11:04 -0800 ui: support declaring path push urls as sub-options
Gregory Szorc <gregory.szorc@gmail.com> [Sat, 05 Dec 2015 21:11:04 -0800] rev 27266
ui: support declaring path push urls as sub-options Power users often want to apply per-path configuration options. For example, they may want to declare an alternate URL for push operations or declare a revset of revisions to push when `hg push` is used (as opposed to attempting to push all revisions by default). This patch establishes the use of sub-options (config options with ":" in the name) to declare additional behavior for paths. New sub-options are declared by using the new ``@ui.pathsuboption`` decorator. This decorator serves multiple purposes: * Declaring which sub-options are registered * Declaring how a sub-option maps to an attribute on ``path`` instances (this is needed to `hg paths` can render sub-options and values properly) * Validation and normalization of config options to attribute values * Allows extensions to declare new sub-options without monkeypatching * Allows extensions to overwrite built-in behavior for sub-option handling As convenient as the new option registration decorator is, extensions (and even core functionality) may still need an additional hook point to perform finalization of path instances. For example, they may wish to validate that multiple options/attributes aren't conflicting with each other. This hook point could be added later, if needed. To prove this new functionality works, we implement the "pushurl" path sub-option. This option declares the URL that `hg push` should use by default. We require that "pushurl" is an actual URL. This requirement might be controversial and could be dropped if there is opposition. However, objectors should read the complicated code in ui.path.__init__ and commands.push for resolving non-URL values before making a judgement. We also don't allow #fragment in the URLs. I intend to introduce a ":pushrev" (or similar) option to define a revset to control which revisions are pushed when "-r <rev>" isn't passed into `hg push`. This is much more powerful than #fragment and I don't think #fragment is useful enough to continue supporting. The [paths] section of the "config" help page has been updated significantly. `hg paths` has been taught to display path sub-options. The docs mention that "default-push" is now deprecated. However, there are several references to it that need to be cleaned up. A large part of this is converting more consumers to the new paths API. This will happen naturally as more path sub-options are added and more and more components need to access them.
Sun, 06 Dec 2015 12:31:46 -0800 ui: pass ui instance to path.__init__
Gregory Szorc <gregory.szorc@gmail.com> [Sun, 06 Dec 2015 12:31:46 -0800] rev 27265
ui: pass ui instance to path.__init__ It will be used in a subsequent patch.
Sun, 06 Dec 2015 11:49:02 -0800 ui: store pushloc as separate attribute
Gregory Szorc <gregory.szorc@gmail.com> [Sun, 06 Dec 2015 11:49:02 -0800] rev 27264
ui: store pushloc as separate attribute The magic @property is going to interfere with the ability to print path sub-options. We only access it in one location and it is trivial to in-line, so do that.
Sat, 05 Dec 2015 23:37:46 -0800 commands: add debugdeltachain command
Gregory Szorc <gregory.szorc@gmail.com> [Sat, 05 Dec 2015 23:37:46 -0800] rev 27263
commands: add debugdeltachain command We have debug commands for displaying overall revlog statistics (debugrevlog) and for dumping a revlog index (debugindex). As part of investigating various aspects of revlog behavior and performance, I found it important to have an understanding of how revlog delta chains behave in practice. This patch implements a "debugdeltachain" command. For each revision in a revlog, it dumps information about the delta chain. Which delta chain it is part of, length of the delta chain, distance since base revision, info about base revision, size of the delta chain, etc. The generic formatting facility is used, which means we can templatize output and get machine readable output like JSON. This command has already uncovered some weird history in mozilla-central I didn't know about. So I think it's valuable.
Sat, 24 Oct 2015 19:56:39 +0100 histedit: pick an appropriate base changeset by default (BC)
Gregory Szorc <gregory.szorc@gmail.com> [Sat, 24 Oct 2015 19:56:39 +0100] rev 27262
histedit: pick an appropriate base changeset by default (BC) Previously, `hg histedit` required a revision argument specifying which revision to use as the base for the current histedit operation. There was an undocumented and experimental "histedit.defaultrev" option that supported defining a single revision to be used if no argument is passed. Mercurial knows what changesets can be edited. And in most scenarios, people want to edit this history of everything on the current head that is rewritable. Making histedit do this by default and not require an explicit argument or additional configuration is a major usability win and will enable more people to use histedit. This patch changes the behavior of the experimental and undocumented "histedit.defaultrev" config option to select an appropriate base revision by default. Comprehensive tests exercising the edge cases in the new, somewhat complicated default revset have been added. Surprisingly, no tests broke. I guess we were never testing the behavior with no ANCESTOR argument (it used to fail with "abort: histedit requires exactly one ancestor revision"). The new behavior is much more user friendly. The functionality for choosing the default base revision has been moved to destutil.py, where it can easily be modified by extensions.
Sat, 05 Dec 2015 23:50:13 +0900 rebase: remove extra "if" from check of collapsing named branches
Yuya Nishihara <yuya@tcha.org> [Sat, 05 Dec 2015 23:50:13 +0900] rev 27261
rebase: remove extra "if" from check of collapsing named branches
Sat, 05 Dec 2015 23:48:22 +0900 rebase: drop redundant functions to keep branch and graft source explicitly
Yuya Nishihara <yuya@tcha.org> [Sat, 05 Dec 2015 23:48:22 +0900] rev 27260
rebase: drop redundant functions to keep branch and graft source explicitly All entries in extra dict are propagated by default since 88fde8db5307.
Sat, 05 Dec 2015 23:41:11 +0900 color: drop useless override of ui.popbuffer()
Yuya Nishihara <yuya@tcha.org> [Sat, 05 Dec 2015 23:41:11 +0900] rev 27259
color: drop useless override of ui.popbuffer() Because labels are applied at write() time since 717b75ae5bb0, colorui.popbuffer() is useless and it doesn't update _bufferapplylabels correctly. Removing it should fix the problem.
Fri, 04 Dec 2015 14:22:15 -0800 repoview: bypass changelog method to computed cache key
Pierre-Yves David <pierre-yves.david@fb.com> [Fri, 04 Dec 2015 14:22:15 -0800] rev 27258
repoview: bypass changelog method to computed cache key Getting the data necessary for the cache key using the changelog/revlog method adds a significant overhead. Given how simple the underlying implementation is and often this code is ran, it makes sense to violate layering and directly compute the data. Testing `hg log` on Mozilla-central, this reduce the time spent on changelog cache validation by an extra half: before: 12.2s of 69s after: 6.1s of 62s Total speed up from this patch and it's parent is 3x (With stupid python profiler overhead) The global speedup without profiler overhead is still there, Before: 51s After: 39s (-23%)
Fri, 04 Dec 2015 14:04:24 -0800 repoview: stop recomputing cached key in all case
Pierre-Yves David <pierre-yves.david@fb.com> [Fri, 04 Dec 2015 14:04:24 -0800] rev 27257
repoview: stop recomputing cached key in all case As explained in the comment, we were computing the key of the cache value every time because of some obscure MQ test failure. I've dropped that code and ran the test again that failure is gone. I assume some transaction cleanup got rid of it. So we are dropping that code. This provide a significant speedup. Testing `hg log` on Mozilla-central this reduce the time spent on changelog cache validation by a third: before: 19.5s of 80s after: 12.2s of 69s (With stupid python profiler overhead)
Sat, 05 Dec 2015 21:40:38 -0800 commands.debugindexdot: use cmdutil.openrevlog()
Gregory Szorc <gregory.szorc@gmail.com> [Sat, 05 Dec 2015 21:40:38 -0800] rev 27256
commands.debugindexdot: use cmdutil.openrevlog() This pattern is used for all the other debug* commands that operate on revlogs. debugindexdot is an outlier. Make it conform.
Sat, 05 Dec 2015 21:47:39 -0800 commands: unify argument handling for revlog debug commands
Gregory Szorc <gregory.szorc@gmail.com> [Sat, 05 Dec 2015 21:47:39 -0800] rev 27255
commands: unify argument handling for revlog debug commands The same 3 options are used in a few locations and I'm about to add another. Might as well consolidate the pattern.
Sun, 06 Dec 2015 17:16:37 +0900 commit: fix rest syntax of examples
Yuya Nishihara <yuya@tcha.org> [Sun, 06 Dec 2015 17:16:37 +0900] rev 27254
commit: fix rest syntax of examples This fixes the formatting of help/commit page and silence test-gendoc.t.
Sat, 05 Dec 2015 20:24:39 -0800 ui: optionally ignore sub-options from configitems()
Gregory Szorc <gregory.szorc@gmail.com> [Sat, 05 Dec 2015 20:24:39 -0800] rev 27253
ui: optionally ignore sub-options from configitems() For convenience.
Sat, 05 Dec 2015 20:20:57 -0800 ui: add method to return option and all sub-options
Gregory Szorc <gregory.szorc@gmail.com> [Sat, 05 Dec 2015 20:20:57 -0800] rev 27252
ui: add method to return option and all sub-options Apparently ":" has been blessed as a generic separator for options and sub-options. We formalize this by introducing an API for obtaining an option and all its sub-options. This will be used in a subsequent patch for declaring sub-options for [paths].
Fri, 04 Dec 2015 17:46:56 -0800 revlog: don't consider nullrev when choosing delta base
Martin von Zweigbergk <martinvonz@google.com> [Fri, 04 Dec 2015 17:46:56 -0800] rev 27251
revlog: don't consider nullrev when choosing delta base In the most complex case, we try using the incoming delta base, then we try both parents, and then we try the previous revlog entry. If none of these result in a good delta, we natually use the null revision as base. However, we sometimes consider the nullrev before we have exhausted our other options. Specifically, when both parents are null, we use the nullrev as delta base if it produces a good delta (according to _isgooddelta()), and we fail to try the previous revlog entry as delta base. After 20a9226bdc8a (addrevision: use general delta when the incoming base delta is bad, 2015-12-01), it can also happen for non-merge commits when the incoming delta is not good. The Firefox repo (from many months back) shrinks a tiny bit with this patch: from 1.855GB to 1.830GB (1.4%). The hg repo itself shrinks even less: by less than 0.1%. There may be repos that get larger instead. This undoes the unexplained test change in 20a9226bdc8a.
Fri, 04 Dec 2015 17:14:14 -0800 revlog: make calls to _isgooddelta() consistent
Martin von Zweigbergk <martinvonz@google.com> [Fri, 04 Dec 2015 17:14:14 -0800] rev 27250
revlog: make calls to _isgooddelta() consistent We always want to call _isgooddelta() before accepting a delta. We mostly call the function right after building the delta, but not always. Instead, we have an extra call at the end of the big code block. Let's make it consistent, so we call _isgooddelta() right after builddelta() and exactly once per delta. That also lets us rely on "delta is None" to mean we didn't find a good delta.
Fri, 04 Dec 2015 16:45:06 -0800 revlog: clarify which revision is added to 'tested' when using cached delta
Martin von Zweigbergk <martinvonz@google.com> [Fri, 04 Dec 2015 16:45:06 -0800] rev 27249
revlog: clarify which revision is added to 'tested' when using cached delta The tested delta revisions are added to the 'tested' set. These are the same revisions we pass to builddelta(). However, in one case, we add builddelta(rev)[3] to the set intead of adding 'rev' itself. In that particular case, that element is the same as the function's input revision (because self._generaldelta is true), so the effect is the same. Still, let's just add the function's input revision to avoid confusing future readers.
Fri, 04 Dec 2015 17:22:26 -0800 revlog: remove unused variable 'chainlen'
Martin von Zweigbergk <martinvonz@google.com> [Fri, 04 Dec 2015 17:22:26 -0800] rev 27248
revlog: remove unused variable 'chainlen'
Sat, 05 Dec 2015 22:19:48 -0500 commit: adjust the quoting in the examples to be Windows friendly
Matt Harbison <matt_harbison@yahoo.com> [Sat, 05 Dec 2015 22:19:48 -0500] rev 27247
commit: adjust the quoting in the examples to be Windows friendly We should probably avoid strong quotes around command line args in the examples, since cmd.exe doesn't recognize them, and it will surprise a user who cargo cults them. I don't see a way to make a rule for this, since strong quoting is OK inside command line args, like within revsets.
Fri, 04 Dec 2015 15:12:11 -0800 wireproto: config options to disable bundle1
Gregory Szorc <gregory.szorc@gmail.com> [Fri, 04 Dec 2015 15:12:11 -0800] rev 27246
wireproto: config options to disable bundle1 bundle2 is the new and preferred wire protocol format. For various reasons, server operators may wish to force clients to use it. One reason is performance. If a repository is stored in generaldelta, the server must recompute deltas in order to produce the bundle1 changegroup. This can be extremely expensive. For mozilla-central, bundle generation typically takes a few minutes. However, generating a non-gd bundle from a generaldelta encoded mozilla-central requires over 30 minutes of CPU! If a large repository like mozilla-central were encoded in generaldelta and non-gd clients connected, they could easily flood a server by cloning. This patch gives server operators config knobs to control whether bundle1 is allowed for push and pull operations. The default is to support legacy bundle1 clients, making this patch backwards compatible.
Mon, 07 Dec 2015 17:39:31 +0100 dockerlib: short form for non-unique uid/gid for CentOS 5 compat (issue4977) stable
Mathias De Maré <mathias.demare@gmail.com> [Mon, 07 Dec 2015 17:39:31 +0100] rev 27245
dockerlib: short form for non-unique uid/gid for CentOS 5 compat (issue4977) CentOS 5 does not support '--non-unique', but does support the short '-o'.
Fri, 04 Dec 2015 13:31:01 -0800 exchange: standalone function to determine if bundle2 is requested
Gregory Szorc <gregory.szorc@gmail.com> [Fri, 04 Dec 2015 13:31:01 -0800] rev 27244
exchange: standalone function to determine if bundle2 is requested This will be used in a subsequent patch.
Fri, 04 Dec 2015 13:15:14 -0800 wireproto: add docstring for wirepeer
Gregory Szorc <gregory.szorc@gmail.com> [Fri, 04 Dec 2015 13:15:14 -0800] rev 27243
wireproto: add docstring for wirepeer
Fri, 04 Dec 2015 15:24:05 -0500 commit: add some help examples (issue4963)
Augie Fackler <augie@google.com> [Fri, 04 Dec 2015 15:24:05 -0500] rev 27242
commit: add some help examples (issue4963) Includes documenting --date now, which resolves the above issue.
Fri, 04 Dec 2015 11:39:03 -0500 changegroup: restate file linknode callback using generator expressions
Augie Fackler <augie@google.com> [Fri, 04 Dec 2015 11:39:03 -0500] rev 27241
changegroup: restate file linknode callback using generator expressions I think this is slightly clearer, and it nicely avoids an extra nested function.
Fri, 04 Dec 2015 11:38:02 -0500 changegroup: clean up file lookup function
Augie Fackler <augie@google.com> [Fri, 04 Dec 2015 11:38:02 -0500] rev 27240
changegroup: clean up file lookup function One case is basically degenerate, so just extract it and make the function clearer.
(0) -10000 -3000 -1000 -300 -100 -50 -30 +30 +50 +100 +300 +1000 +3000 +10000 tip