Thu, 02 Aug 2018 14:57:20 -0700 narrow: move .hg/narrowspec to .hg/store/narrowspec (BC)
Martin von Zweigbergk <martinvonz@google.com> [Thu, 02 Aug 2018 14:57:20 -0700] rev 38911
narrow: move .hg/narrowspec to .hg/store/narrowspec (BC) The narrowspec is more closely related to the store than to the working copy. For example, if the narrowspec changes, the set of revlogs also needs to change (the working copy may change, but that depends on which commit is checked out). Also, when using the share extension, the narrowspec needs to be shared along with the store. This patch therefore moves the narrowspec into the store/ directory. This is clearly a breaking change, but I haven't bothered trying to fall back to reading the narrowspec from the old location (.hg/), because there are very few users of narrow out there. (We'll add a temporary hack to our Google-internal extension to handle the migration.) Differential Revision: https://phab.mercurial-scm.org/D4099
Fri, 03 Aug 2018 13:53:02 -0700 narrow: drop checkambig=True when restoring backup
Martin von Zweigbergk <martinvonz@google.com> [Fri, 03 Aug 2018 13:53:02 -0700] rev 38910
narrow: drop checkambig=True when restoring backup IIUC, checkambig is about updating timestamps of the file while renaming. That's important for the dirstate, but we never check the timestamp of the narrowspec file. We can therefore avoid checking passing checkambig=True. Differential Revision: https://phab.mercurial-scm.org/D4098
Thu, 02 Aug 2018 14:30:40 -0700 narrow: remove a repo file-cache invalidation
Martin von Zweigbergk <martinvonz@google.com> [Thu, 02 Aug 2018 14:30:40 -0700] rev 38909
narrow: remove a repo file-cache invalidation It's unclear why this was needed. All tests pass without it. I asked Kyle Lippincott (who added the check) and he also doesn't remember what it was for. Differential Revision: https://phab.mercurial-scm.org/D4097
Fri, 03 Aug 2018 11:09:41 -0700 narrow: call narrowspec.{save,restore,clear}backup directly
Martin von Zweigbergk <martinvonz@google.com> [Fri, 03 Aug 2018 11:09:41 -0700] rev 38908
narrow: call narrowspec.{save,restore,clear}backup directly I want to move .hg/narrowspec to .hg/store/narrowspec and we need to decouple the narrowspec update from the dirstate update for that. This patch lets the callers call the narrowspec backup functions directly, in addition to the dirstate backup functions. The narrowspec methods are made to check if narrowing is enabled. For that, a repo instance was needed, which all the callers luckily already had available. Differential Revision: https://phab.mercurial-scm.org/D4096
Sat, 04 Aug 2018 23:15:06 -0700 index: don't add 1 to length variables
Martin von Zweigbergk <martinvonz@google.com> [Sat, 04 Aug 2018 23:15:06 -0700] rev 38907
index: don't add 1 to length variables A lot of "+ 1" and "-1" were mechanically added to ease the transition in 781b2720d2ac (index: don't include nullid in len(), 2018-07-20). Let's clean it up now. Differential Revision: https://phab.mercurial-scm.org/D4106
Sat, 04 Aug 2018 22:48:25 -0700 index: drop support for nullid at position len(index) in index_node
Martin von Zweigbergk <martinvonz@google.com> [Sat, 04 Aug 2018 22:48:25 -0700] rev 38906
index: drop support for nullid at position len(index) in index_node I think no callers exist since at least a3dacabd476b (index: don't allow index[len(index)] to mean nullid, 2018-07-20). Differential Revision: https://phab.mercurial-scm.org/D4105
Sat, 04 Aug 2018 23:15:03 -0700 index: return False for "len(index) in index"
Martin von Zweigbergk <martinvonz@google.com> [Sat, 04 Aug 2018 23:15:03 -0700] rev 38905
index: return False for "len(index) in index" Since we no longer accept index[len(index)], we should clearly make "len(index) in index" return False. This should have been part of a3dacabd476b (index: don't allow index[len(index)] to mean nullid, 2018-07-20) Differential Revision: https://phab.mercurial-scm.org/D4104
(0) -30000 -10000 -3000 -1000 -300 -100 -30 -10 -7 +7 +10 +30 +100 +300 +1000 +3000 +10000 tip