Tue, 26 Jun 2018 10:02:01 -0700 namespaces: let namespaces override singlenode() definition
Martin von Zweigbergk <martinvonz@google.com> [Tue, 26 Jun 2018 10:02:01 -0700] rev 38486
namespaces: let namespaces override singlenode() definition Some namespaces have multiple nodes per name (meaning that their namemap() returns multiple nodes). One such namespace is the "topics" namespace (from the evolve repo). We also have our own internal namespace at Google (for review units) that has multiple nodes per name. These namespaces may not want to use the default "pick highest revnum" resolution that we currently use when resolving a name to a single node. As an example, they may decide that `hg co <name>` should check out a commit that's last in some sense even if an earlier commit had just been amended and thus had a higher revnum [1]. This patch gives the namespace the option to continue to return multiple nodes and to override how the best node is picked. Allowing namespaces to override that may also be useful as an optimization (it may be cheaper for the namespace to find just that node). I have been arguing (in D3715) for using all the nodes returned from namemap() when resolving the symbol to a revset, so e.g. `hg log -r stable` would resolve to *all* nodes on stable, not just the one with the highest revnum (except that I don't actually think we should change it for the branch namespace because of BC). Most people seem opposed to that. If we decide not to do it, I think we can deprecate the namemap() function in favor of the new singlenode() (I find it weird to have namespaces, like the branch namespace, where namemap() isn't nodemap()'s inverse). I therefore think this patch makes sense regardless of what we decide on that issue. [1] Actually, even the branch namespace would have wanted to override singlenode() if it had supported multiple nodes. That's because closes branch heads are mostly ignored, so "hg co default" will not check out the highest-revnum node if that's a closed head. Differential Revision: https://phab.mercurial-scm.org/D3852
Wed, 27 Jun 2018 12:24:21 +0530 rebase: refactor dryrun implementation
Sushil khanchi <sushilkhanchi97@gmail.com> [Wed, 27 Jun 2018 12:24:21 +0530] rev 38485
rebase: refactor dryrun implementation This patch refactor dry-run code to make it easy to add additional functionality in dryrun. Otherwise we had to add every functionality through _origrebase() which does not seem a good implementation. Differential Revision: https://phab.mercurial-scm.org/D3849
Sun, 02 Jul 2017 00:32:09 -0400 hooks: allow Unix style environment variables on external Windows hooks
Matt Harbison <matt_harbison@yahoo.com> [Sun, 02 Jul 2017 00:32:09 -0400] rev 38484
hooks: allow Unix style environment variables on external Windows hooks This will help making common hooks between Windows and non-Windows platforms. Having to build the shellenviron dict here and in procutil.system() is a bit unfortunate, but the only other option is to fix up the command inside procutil.system(). It seems more important that the note about the hook being run reflects what is actually run. The patch from last summer added the hooks on the command line, but it looks like HG_ARGS has since learned about --config args, and the output was just confusing. Therefore, it's now loaded from a file in the histedit test for clarity.
Sun, 24 Jun 2018 01:13:09 -0400 windows: add a method to convert Unix style command lines to Windows style
Matt Harbison <matt_harbison@yahoo.com> [Sun, 24 Jun 2018 01:13:09 -0400] rev 38483
windows: add a method to convert Unix style command lines to Windows style This started as a copy/paste of `os.path.expandvars()`, but limited to a given dictionary of variables, converting `foo = foo + bar` to `foo += bar`, and adding 'b' string prefixes. Then code was added to make sure that a value being substituted in wouldn't itself be expanded by cmd.exe. But that left inconsistent results between `$var1` and `%var1%` when its value was '%foo%'- since neither were touched, `$var1` wouldn't expand but `%var1%` would. So instead, this just converts the Unix style to Windows style (if the variable exists, because Windows will leave `%missing%` as-is), and lets cmd.exe do its thing. I then dropped the %% -> % conversion (because Windows doesn't do this), and added the ability to escape the '$' with '\'. The escape character is dropped, for consistency with shell handling. After everything seemed stable and working, running the whole test suite flagged a problem near the end of test-bookmarks.t:1069. The problem is cmd.exe won't pass empty variables to its child, so defined but empty variables are now skipped. I can't think of anything better, and it seems like a pre-existing violation of the documentation, which calls out that HG_OLDNODE is empty on bookmark creation. Future additions could potentially be replacing strong quotes with double quotes (cmd.exe doesn't know what to do with the former), escaping a double quote, and some tilde expansion via os.path.expanduser(). I've got some doubts about replacing the strong quotes in case sh.exe is run, but it seems like the right thing to do the vast majority of the time. The original form of this was discussed about a year ago[1]. [1] https://www.mercurial-scm.org/pipermail/mercurial-devel/2017-July/100735.html
Thu, 28 Jun 2018 10:50:53 +0800 hgweb: add archive entries to graph page
Anton Shestakov <av6@dwimlabs.net> [Thu, 28 Jun 2018 10:50:53 +0800] rev 38482
hgweb: add archive entries to graph page Changelog page has them, so it makes sense to add them to graph page too.
Thu, 28 Jun 2018 07:41:08 +0800 hgweb: add z-index for search field tooltip
Anton Shestakov <av6@dwimlabs.net> [Thu, 28 Jun 2018 07:41:08 +0800] rev 38481
hgweb: add z-index for search field tooltip On graph page, search field tooltip sometimes goes down to the graph area, where it used to be covered by foreground element of graph entries (.fg) because they have z-index: 10. To prevent the tooltip from being covered, z-index: 15 is enough.
Wed, 27 Jun 2018 07:19:30 -0700 tests: pass "rev" argument to commands.update() as string
Martin von Zweigbergk <martinvonz@google.com> [Wed, 27 Jun 2018 07:19:30 -0700] rev 38480
tests: pass "rev" argument to commands.update() as string commands.update() normally gets its "rev" argument as a string, but test-basic.t was passing an integer. That happened to work, but we shouldn't rely on it. Differential Revision: https://phab.mercurial-scm.org/D3851
Wed, 27 Jun 2018 23:39:41 +0900 revset: fix heads() order to always follow the input set (BC)
Yuya Nishihara <yuya@tcha.org> [Wed, 27 Jun 2018 23:39:41 +0900] rev 38479
revset: fix heads() order to always follow the input set (BC) An argument expression should never affect the order of the result set. That's the rule of the revset predicates.
Wed, 27 Jun 2018 23:33:57 +0900 test-revset: show that order of heads() can be wrong
Yuya Nishihara <yuya@tcha.org> [Wed, 27 Jun 2018 23:33:57 +0900] rev 38478
test-revset: show that order of heads() can be wrong
Wed, 27 Jun 2018 10:21:07 -0400 stringutil: update list of re-special characters to include &~
Augie Fackler <augie@google.com> [Wed, 27 Jun 2018 10:21:07 -0400] rev 38477
stringutil: update list of re-special characters to include &~ I missed this because I was looking at the change that refactored re.escape, and these characters were added in https://github.com/python/cpython/commit/05cb728d68a278d11466f9a6c8258d914135c96c. Differential Revision: https://phab.mercurial-scm.org/D3850
(0) -30000 -10000 -3000 -1000 -300 -100 -10 +10 +100 +300 +1000 +3000 +10000 tip