Thu, 12 Dec 2019 22:30:59 -0800 releasenotes: extract helper for checking for incompatible arguments
Martin von Zweigbergk <martinvonz@google.com> [Thu, 12 Dec 2019 22:30:59 -0800] rev 43898
releasenotes: extract helper for checking for incompatible arguments This patch extracts a new check_incompatible_arguments() function similar to check_at_most_one_arg(). The difference is that the new function is for checking for arguments that are disallowed together with some other argument but not mutually exclusive among themselves. Differential Revision: https://phab.mercurial-scm.org/D7639
Thu, 12 Dec 2019 15:51:09 -0800 fix: use cmdutil.check_at_most_one_arg()
Martin von Zweigbergk <martinvonz@google.com> [Thu, 12 Dec 2019 15:51:09 -0800] rev 43897
fix: use cmdutil.check_at_most_one_arg() Differential Revision: https://phab.mercurial-scm.org/D7638
Tue, 17 Dec 2019 10:26:44 +0300 patchbomb: use cmdutil.check_at_most_one_arg()
Martin von Zweigbergk <martinvonz@google.com> [Tue, 17 Dec 2019 10:26:44 +0300] rev 43896
patchbomb: use cmdutil.check_at_most_one_arg() Differential Revision: https://phab.mercurial-scm.org/D7637
Thu, 12 Dec 2019 15:48:48 -0800 export: use cmdutil.check_at_most_one_arg()
Martin von Zweigbergk <martinvonz@google.com> [Thu, 12 Dec 2019 15:48:48 -0800] rev 43895
export: use cmdutil.check_at_most_one_arg() Differential Revision: https://phab.mercurial-scm.org/D7636
Thu, 12 Dec 2019 15:10:44 -0800 amend: use cmdutil.check_at_most_one_arg()
Martin von Zweigbergk <martinvonz@google.com> [Thu, 12 Dec 2019 15:10:44 -0800] rev 43894
amend: use cmdutil.check_at_most_one_arg() Differential Revision: https://phab.mercurial-scm.org/D7635
Thu, 12 Dec 2019 14:54:38 -0800 commit: use cmdutil.check_at_most_one_arg()
Martin von Zweigbergk <martinvonz@google.com> [Thu, 12 Dec 2019 14:54:38 -0800] rev 43893
commit: use cmdutil.check_at_most_one_arg() Differential Revision: https://phab.mercurial-scm.org/D7634
Thu, 12 Dec 2019 15:16:13 -0800 clone: extract helper for checking mutually exclusive args
Martin von Zweigbergk <martinvonz@google.com> [Thu, 12 Dec 2019 15:16:13 -0800] rev 43892
clone: extract helper for checking mutually exclusive args We have some duplicated code for aborting if the user provided mutually exclusive arguments. Extensions surely have more such code. We also have duplicated translations and inconsistent output in this area. This patch introduces a simpler helper for checking if more than one option among a given set was given on the command line. I've made the clone code call the function to show that it works. The function has no good way of checking arguments with hyphens in them. I'll add that later if necessary. The function still won't be applicable in all cases, but I think it's still better than nothing. Differential Revision: https://phab.mercurial-scm.org/D7633
Fri, 13 Dec 2019 14:40:52 -0800 dirstate: when calling rebuild(), avoid some N^2 codepaths
Kyle Lippincott <spectral@google.com> [Fri, 13 Dec 2019 14:40:52 -0800] rev 43891
dirstate: when calling rebuild(), avoid some N^2 codepaths I had a user repo with 200k files in it. Calling `hg debugrebuilddirstate` took tens of minutes (I didn't wait for it). In that situation, changedfiles==allfiles, and both are lists. This meant that we had to run an average of 100k comparisons, for each of 200k files, just to check whether a file needed to have normallookup called (it always did), or drop. While it's probably not a huge issue, in my very awkward synthetic benchmark I wrote (not using a benchmark library or anything), I was seeing some slowdowns for small-changedfiles and very-large-allfiles invocations, with an inflection somewhere around 10 items in changedfiles (regardless of the size of allfiles); above 10 items in changedfiles, the new code appears to always be faster. For the case of 50k files in changedfiles and the same items in allfiles, I'm seeing differences of 15s of just running comparisons vs. 0.003793s. I haven't bothered to run a comparison of 200k items in changedfiles and allfiles. :) Differential Revision: https://phab.mercurial-scm.org/D7665
(0) -30000 -10000 -3000 -1000 -300 -100 -30 -10 -8 +8 +10 +30 +100 +300 +1000 +3000 tip