Sun, 03 Feb 2019 19:10:39 +0530 revset: add expectsize to check the size of a set
Navaneeth Suresh <navaneeths1998@gmail.com> [Sun, 03 Feb 2019 19:10:39 +0530] rev 41680
revset: add expectsize to check the size of a set `expectsize(<set>, <int>)` revset fails if `<set>` is not exactly `<int>` elements. `expectsize(<set>, <min>:<max>)` revset fails if `<set>` is not exactly between `<min>` and `<max>` inclusive. This then allows an alias for `hg next` to be `update -r one(children(.))` with sane failure behavior, and also makes some other scripting tasks a little less difficult. (Summary from WeShouldDoThat) Differential Revision: https://phab.mercurial-scm.org/D5813
Mon, 11 Feb 2019 11:18:37 -0500 merge with stable
Augie Fackler <augie@google.com> [Mon, 11 Feb 2019 11:18:37 -0500] rev 41679
merge with stable
Mon, 11 Feb 2019 15:41:08 +0300 branchmap: decode a label only once
Pulkit Goyal <pulkit@yandex-team.ru> [Mon, 11 Feb 2019 15:41:08 +0300] rev 41678
branchmap: decode a label only once This moves decoding of a label out of for loop. Minor speed up expected in cases when one branch has multiple heads. For example: someone using bookmarks as branches and hence ending up with multiple heads on default branch. Differential Revision: https://phab.mercurial-scm.org/D5932
Mon, 11 Feb 2019 15:34:35 +0300 branchmap: move __init__ up in branchcache class
Pulkit Goyal <pulkit@yandex-team.ru> [Mon, 11 Feb 2019 15:34:35 +0300] rev 41677
branchmap: move __init__ up in branchcache class Making __init__ the first function defined helps understanding the class much better. Differential Revision: https://phab.mercurial-scm.org/D5931
Sat, 09 Feb 2019 22:50:53 -0800 match: delete unused root and cwd arguments from {always,never,exact}() (API)
Martin von Zweigbergk <martinvonz@google.com> [Sat, 09 Feb 2019 22:50:53 -0800] rev 41676
match: delete unused root and cwd arguments from {always,never,exact}() (API) Differential Revision: https://phab.mercurial-scm.org/D5930
Sun, 10 Feb 2019 14:35:36 -0800 match: delete unused root and cwd arguments to constructors (API)
Martin von Zweigbergk <martinvonz@google.com> [Sun, 10 Feb 2019 14:35:36 -0800] rev 41675
match: delete unused root and cwd arguments to constructors (API) Most matchers no longer need the root and cwd arguments. patternmatcher and includematcher still need the root argument for subincludes. Differential Revision: https://phab.mercurial-scm.org/D5929
Sun, 10 Feb 2019 21:33:21 -0800 dirstate: call and cache os.getcwd() in constructor
Martin von Zweigbergk <martinvonz@google.com> [Sun, 10 Feb 2019 21:33:21 -0800] rev 41674
dirstate: call and cache os.getcwd() in constructor I'm about to make scmutil.matchfiles() not pass the root and cwd paths to match.exact(), since they no longer have any effect. That turned out to have the surprising effect of making some tests (test-rebase-scenario-global.t and test-removeemptydirs.t) crash when the working directory was removed. The problem was that my patch removed the call to repo.getcwd(), which caused the current working directory to not be cached in the dirstate as early as it was before. This patch fixes that by caching the current working directory in the dirstate constructor. Differential Revision: https://phab.mercurial-scm.org/D5928
Sun, 10 Feb 2019 14:16:37 -0800 cleanup: prefer matchmod.{always,never}() over accessing matchers directly
Martin von Zweigbergk <martinvonz@google.com> [Sun, 10 Feb 2019 14:16:37 -0800] rev 41673
cleanup: prefer matchmod.{always,never}() over accessing matchers directly We have these factory methods so we should use them. Differential Revision: https://phab.mercurial-scm.org/D5927
Sun, 10 Feb 2019 14:16:33 -0800 match: allow passing in badfn to always() and never()
Martin von Zweigbergk <martinvonz@google.com> [Sun, 10 Feb 2019 14:16:33 -0800] rev 41672
match: allow passing in badfn to always() and never() So that no callers are required to access the matchers themselves. Differential Revision: https://phab.mercurial-scm.org/D5926
Sun, 10 Feb 2019 14:04:08 -0800 py3: use raw strings and %d for formatting
Gregory Szorc <gregory.szorc@gmail.com> [Sun, 10 Feb 2019 14:04:08 -0800] rev 41671
py3: use raw strings and %d for formatting Before the string compares on Python 3 failed because we were comparing bytes to str. Using raw strings ensures we are always comparing str. While we're here, also use %d to format integers. Differential Revision: https://phab.mercurial-scm.org/D5925
Thu, 31 Jan 2019 15:35:51 -0800 diff: make --stat respect ui.relative-paths
Martin von Zweigbergk <martinvonz@google.com> [Thu, 31 Jan 2019 15:35:51 -0800] rev 41670
diff: make --stat respect ui.relative-paths It would have been easy to make all diffs respect ui.relative-paths, but we don't want that since it makes the diff invalid. Perhaps it makes sense to do that with --noprefix since the point of that is to make paths that are easy to copy&paste, and the diff is already invalid anyway. But this patch just makes the --stat version respect the config option. The --stat view is not even close to a valid diff, so I think it makes sense to show the paths in more human-friendly form. Differential Revision: https://phab.mercurial-scm.org/D5896
Sat, 09 Feb 2019 23:48:19 -0800 match: delete unused argument "listsubrepos" from _buildmatch()
Martin von Zweigbergk <martinvonz@google.com> [Sat, 09 Feb 2019 23:48:19 -0800] rev 41669
match: delete unused argument "listsubrepos" from _buildmatch() Seems to have been unused since 9f9ffe5f687c (match: compose 'set:' pattern as matcher, 2018-06-10). Differential Revision: https://phab.mercurial-scm.org/D5924
Sat, 09 Feb 2019 16:46:11 -0800 match: delete unused rel() (API)
Martin von Zweigbergk <martinvonz@google.com> [Sat, 09 Feb 2019 16:46:11 -0800] rev 41668
match: delete unused rel() (API) Differential Revision: https://phab.mercurial-scm.org/D5923
Sat, 09 Feb 2019 16:43:20 -0800 largefiles: get cwd and relative paths from repo instead of matcher
Martin von Zweigbergk <martinvonz@google.com> [Sat, 09 Feb 2019 16:43:20 -0800] rev 41667
largefiles: get cwd and relative paths from repo instead of matcher As far as I can tell, the matcher returned from matchandpats() got its cwd from the context object, which in turn got it from the repo, so this should be equivalent. Differential Revision: https://phab.mercurial-scm.org/D5922
Sat, 09 Feb 2019 14:37:58 -0800 scmutil: remove special handling of pats==("",) in matchandpats() (API)
Martin von Zweigbergk <martinvonz@google.com> [Sat, 09 Feb 2019 14:37:58 -0800] rev 41666
scmutil: remove special handling of pats==("",) in matchandpats() (API) I don't know under what circumstances we used to pass that value, but we don't seem to do it now. Differential Revision: https://phab.mercurial-scm.org/D5921
Fri, 08 Feb 2019 13:33:40 -0800 scmutil: respect ui.relative-paths in default match.badfn
Martin von Zweigbergk <martinvonz@google.com> [Fri, 08 Feb 2019 13:33:40 -0800] rev 41665
scmutil: respect ui.relative-paths in default match.badfn We should probably be passing in a uipathfn here instead, so the caller can get consistent output (between match.badfn and whatever else it prints). I think we should ideally remove the badfn from the matcher completely, but that's a different story. This patch is at least not making it worse. Differential Revision: https://phab.mercurial-scm.org/D5916
Fri, 08 Feb 2019 13:00:28 -0800 cmdutil: migrate previously missed instances to uipathfn
Martin von Zweigbergk <martinvonz@google.com> [Fri, 08 Feb 2019 13:00:28 -0800] rev 41664
cmdutil: migrate previously missed instances to uipathfn I seem to have missed these two instances in 15f63ac122ea (files: respect ui.relative-paths, 2019-01-29) and 7068c6b0114b (revert: respect ui.relative-paths, 2019-02-05). Differential Revision: https://phab.mercurial-scm.org/D5915
Fri, 08 Feb 2019 13:54:20 -0800 cat: respect ui.relative-paths for "skipping missing subrepository"
Martin von Zweigbergk <martinvonz@google.com> [Fri, 08 Feb 2019 13:54:20 -0800] rev 41663
cat: respect ui.relative-paths for "skipping missing subrepository" Differential Revision: https://phab.mercurial-scm.org/D5914
Fri, 08 Feb 2019 13:51:29 -0800 addremove: use uipathfn instead of m.rel() for recorded similatity message
Martin von Zweigbergk <martinvonz@google.com> [Fri, 08 Feb 2019 13:51:29 -0800] rev 41662
addremove: use uipathfn instead of m.rel() for recorded similatity message When no path arguments are given to addremove, it generally prints absolute paths. However, before this patch, we would always print the "recording removal of foo as rename to bar (78% similar)" message with relative paths. Differential Revision: https://phab.mercurial-scm.org/D5913
Thu, 07 Feb 2019 14:22:11 -0800 forget: use relative paths for --interactive
Martin von Zweigbergk <martinvonz@google.com> [Thu, 07 Feb 2019 14:22:11 -0800] rev 41661
forget: use relative paths for --interactive Seems more consistent. Differential Revision: https://phab.mercurial-scm.org/D5912
Fri, 08 Feb 2019 13:20:46 -0800 automv: respect ui.relative-paths
Martin von Zweigbergk <martinvonz@google.com> [Fri, 08 Feb 2019 13:20:46 -0800] rev 41660
automv: respect ui.relative-paths Differential Revision: https://phab.mercurial-scm.org/D5910
Fri, 08 Feb 2019 13:27:54 -0800 debugwalk: avoid match.rel() and use repo.pathto() instead
Martin von Zweigbergk <martinvonz@google.com> [Fri, 08 Feb 2019 13:27:54 -0800] rev 41659
debugwalk: avoid match.rel() and use repo.pathto() instead I'm about to delete match.rel() Differential Revision: https://phab.mercurial-scm.org/D5909
Fri, 08 Feb 2019 13:27:26 -0800 match: delete unused abs() (API)
Martin von Zweigbergk <martinvonz@google.com> [Fri, 08 Feb 2019 13:27:26 -0800] rev 41658
match: delete unused abs() (API) Differential Revision: https://phab.mercurial-scm.org/D5908
Fri, 08 Feb 2019 13:00:05 -0800 copy: respect ui.relative-paths in copy/rename
Martin von Zweigbergk <martinvonz@google.com> [Fri, 08 Feb 2019 13:00:05 -0800] rev 41657
copy: respect ui.relative-paths in copy/rename Differential Revision: https://phab.mercurial-scm.org/D5907
Fri, 08 Feb 2019 12:00:44 -0800 match: delete unused uipath() and _uipathrelative (API)
Martin von Zweigbergk <martinvonz@google.com> [Fri, 08 Feb 2019 12:00:44 -0800] rev 41656
match: delete unused uipath() and _uipathrelative (API) Differential Revision: https://phab.mercurial-scm.org/D5906
Fri, 08 Feb 2019 11:56:39 -0800 diff: respect ui.relative-paths for warning about path outside --root
Martin von Zweigbergk <martinvonz@google.com> [Fri, 08 Feb 2019 11:56:39 -0800] rev 41655
diff: respect ui.relative-paths for warning about path outside --root I set legacyrelativevalue=True rather than being based on what patterns the user passed (as the current match.uipath() does). I think it simply doesn't really matter for this message (there are not even any tests for it). Differential Revision: https://phab.mercurial-scm.org/D5905
Thu, 07 Feb 2019 23:29:14 -0800 largefiles: use uipathfn instead of match.{rel,uipath}() (API)
Martin von Zweigbergk <martinvonz@google.com> [Thu, 07 Feb 2019 23:29:14 -0800] rev 41654
largefiles: use uipathfn instead of match.{rel,uipath}() (API) All callers now pass in a uipathfn, so we can just use that instead of choosing the right match function. This also means that when we make add/remove respect ui.relative-paths, it will work for largefiles too. Differential Revision: https://phab.mercurial-scm.org/D5904
Fri, 08 Feb 2019 13:08:01 -0800 forget: pass around uipathfn and use instead of m.rel() (API)
Martin von Zweigbergk <martinvonz@google.com> [Fri, 08 Feb 2019 13:08:01 -0800] rev 41653
forget: pass around uipathfn and use instead of m.rel() (API) Differential Revision: https://phab.mercurial-scm.org/D5911
Thu, 07 Feb 2019 23:25:39 -0800 addremove: pass around uipathfn and use instead of m.uipath() (API)
Martin von Zweigbergk <martinvonz@google.com> [Thu, 07 Feb 2019 23:25:39 -0800] rev 41652
addremove: pass around uipathfn and use instead of m.uipath() (API) Differential Revision: https://phab.mercurial-scm.org/D5903
Thu, 07 Feb 2019 23:19:33 -0800 remove: pass around uipathfn and use instead of m.rel() (API)
Martin von Zweigbergk <martinvonz@google.com> [Thu, 07 Feb 2019 23:19:33 -0800] rev 41651
remove: pass around uipathfn and use instead of m.rel() (API) Same as previous commit, but now for remove. Differential Revision: https://phab.mercurial-scm.org/D5902
(0) -30000 -10000 -3000 -1000 -300 -100 -50 -30 +30 +50 +100 +300 +1000 +3000 +10000 tip