Sat, 23 Sep 2017 13:46:12 -0700 alias: make alias command lazily resolved
Jun Wu <quark@fb.com> [Sat, 23 Sep 2017 13:46:12 -0700] rev 34313
alias: make alias command lazily resolved With many aliases, resolving them could have some visible overhead. Below is part of traceprof [1] output of `hg bookmark --hidden`: (time unit: ms) 37 \ addaliases dispatch.py:526 37 | __init__ (60 times) dispatch.py:402 33 | findcmd (108 times) cmdutil.py:721 16 | findpossible (49 times) cmdutil.py:683 It may get better by optimizing `findcmd` to do a bisect, but we don't really need to resolve an alias if it's not used, so let's make those command entries lazy. After this patch, `addalias` takes less than 1ms. .. perf:: improved performance when many aliases are defined [1]: https://bitbucket.org/facebook/hg-experimental/src/9aca0dbdbdfc48457e5d2581ca2d6e662fced2e6/hgext3rd/traceprof.pyx Differential Revision: https://phab.mercurial-scm.org/D805
Sat, 23 Sep 2017 13:31:09 -0700 alias: test duplicated definition earlier
Jun Wu <quark@fb.com> [Sat, 23 Sep 2017 13:31:09 -0700] rev 34312
alias: test duplicated definition earlier This patch moves the old definition checking logic introduced by f4b7be3f8430 earlier. So that the test itself does not depend on `aliasdef`. The check is to avoid wrapping a same alias multiple times. It can be done by checking the config name and value (`definition` in code), without constructing a `cmdalias` instance. This makes the next patch easier to review. Differential Revision: https://phab.mercurial-scm.org/D804
Sun, 24 Sep 2017 19:37:55 +0530 uncommit: add a test for uncommit with uncommitondirtywdir config in merge
Pulkit Goyal <7895pulkit@gmail.com> [Sun, 24 Sep 2017 19:37:55 +0530] rev 34311
uncommit: add a test for uncommit with uncommitondirtywdir config in merge Differential Revision: https://phab.mercurial-scm.org/D809
(0) -30000 -10000 -3000 -1000 -300 -100 -30 -10 -3 +3 +10 +30 +100 +300 +1000 +3000 +10000 tip