Mon, 12 Sep 2016 10:55:43 -0700 manifest: change manifestctx to not inherit from manifestdict
Durham Goode <durham@fb.com> [Mon, 12 Sep 2016 10:55:43 -0700] rev 29926
manifest: change manifestctx to not inherit from manifestdict If manifestctx inherits from manifestdict, it requires some weird logic to lazily load the dict if a piece of information is asked for. This ended up being complicated and unintuitive to use. Let's move the dict creation to .read(). This will make even more sense once we start adding readdelta() and other similar methods to manifestctx.
Mon, 12 Sep 2016 14:29:09 -0700 manifest: make one use of _mancache avoid manifestctxs
Durham Goode <durham@fb.com> [Mon, 12 Sep 2016 14:29:09 -0700] rev 29925
manifest: make one use of _mancache avoid manifestctxs In a future patch we will change manifestctx and treemanifestctx to no longer derive from manifestdict and treemanifest, respectively. This means that consumers of the _mancache will now need to be aware of the different between the two, until we get rid of the manifest entirely and the _mancache becomes only filled with ctxs. This fixes one case of it that can be fixed by using the other cache. Future patches will address the others uses using the upcoming manifestctx.read() function.
Sun, 21 Aug 2016 13:16:21 +0900 debugrevspec: add option to verify optimized result
Yuya Nishihara <yuya@tcha.org> [Sun, 21 Aug 2016 13:16:21 +0900] rev 29924
debugrevspec: add option to verify optimized result This provides a convenient way to diff "hg debugrevspec" outputs generated with/without --no-optimized option.
Sun, 21 Aug 2016 12:40:02 +0900 debugrevspec: add option to skip optimize() and evaluate unoptimized tree
Yuya Nishihara <yuya@tcha.org> [Sun, 21 Aug 2016 12:40:02 +0900] rev 29923
debugrevspec: add option to skip optimize() and evaluate unoptimized tree This will help debugging optimizer bugs. Maybe '--no-optimized' can be changed to '--optimized' (default: True) when flags series landed.
Thu, 08 Sep 2016 22:44:10 +0900 revset: remove showwarning option from expandaliases()
Yuya Nishihara <yuya@tcha.org> [Thu, 08 Sep 2016 22:44:10 +0900] rev 29922
revset: remove showwarning option from expandaliases() Now all callers pass showwarning=ui.warn, so we no longer need the option to suppress warnings.
Sun, 21 Aug 2016 12:45:43 +0900 debugrevspec: evaluate tree built by itself
Yuya Nishihara <yuya@tcha.org> [Sun, 21 Aug 2016 12:45:43 +0900] rev 29921
debugrevspec: evaluate tree built by itself Prepares for new option to evaluate an unoptimized tree. Since a revset expression is no longer parsed twice, alias warnings should be displayed at the first parsing stages. That's why showwarning=ui.warn is added.
Mon, 12 Sep 2016 03:06:29 +0900 localrepo: make _refreshfilecachestats unfiltered method to refresh correctly
FUJIWARA Katsunori <foozy@lares.dti.ne.jp> [Mon, 12 Sep 2016 03:06:29 +0900] rev 29920
localrepo: make _refreshfilecachestats unfiltered method to refresh correctly Before this patch, if transaction is started via "filtered repo" object, _refreshfilecachestats() at closing transaction doesn't refresh file stat of any @filecache properties correctly, because: - _refreshfilecachestats() omits refreshing file stat of a @filecache property, if it doesn't appear in self.__dict__ - if transaction is started via "filtered repo", _refreshfilecachestats() is applied on "filtered repo" because repo.transaction() adds "self._refreshfilecachestats" to post close procedures. repo.transaction() isn't unfiltered method, and "self" in it means "filtered repo" in this case. Transactions started by explicit repo.transaction() easily causes this situation. - _refreshfilecachestats() applied on "filtered repo" omits whole refreshing because @filecache properties are stored into "unfiltered repo", and appear only in self.__dict__ of "unfiltered repo". This incorrect refreshing causes unnecessary reloading from files. To refresh file stat of @filecache properties at closing transaction correctly, this patch makes _refreshfilecachestats() unfiltered method. This patch chooses making _refreshfilecachestats() unfiltered method instead of making transaction() unfiltered method, to reduce unexpected side effect.
Mon, 12 Sep 2016 03:06:29 +0900 streamclone: clear caches after writing changes into files for visibility
FUJIWARA Katsunori <foozy@lares.dti.ne.jp> [Mon, 12 Sep 2016 03:06:29 +0900] rev 29919
streamclone: clear caches after writing changes into files for visibility Before this patch, streamclone-ed changes are invisible via @filecache properties to in-process procedures before closing transaction (e.g. pretxnclose python hook), if corresponded property is cached before consumev1(). Strictly speaking, caching should occur inside (store) lock for transaction. repo.invalidate() after closing transaction is too late to force @filecache properties to be reloaded from changed files at next access. For visibility of streamclone-ed changes to in-process procedures before closing transaction, this patch clears caches just after writing changes into files. BTW, regardless of changing in this patch, clearing cached properties in consumev1() causes inconsistency, if (1) transaction is started and (2) any @filecache property is changed before consumev1(). This patch also adds the comment to fix this (potential) inconsistency in the future.
Mon, 12 Sep 2016 03:06:28 +0900 localrepo: make invalidate avoid invalidating store inside transaction (API)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp> [Mon, 12 Sep 2016 03:06:28 +0900] rev 29918
localrepo: make invalidate avoid invalidating store inside transaction (API) Before this patch, invalidate() discards in-memory fncache changes, even inside transaction scope. Such changes should be written out at closing transaction. Otherwise, fncache might overlook newly added files. A file overlooked by fncache isn't accessible via store vfs, even if it actually exists in store. On the other hand, a non-existing file in fncache is less harmful, because fncachestore always examines whether a file actually exists or not before access. Therefore, discarding in-memory changes can be safely omitted. It is typical case that repo.invalidate() in streamclone is executed inside nested transaction. This patch makes invalidate() avoid invalidating store inside transaction. This patch focuses on describing only how invalidate() changes own behavior according to activity of transaction. Describing other detail of invalidate() in docstr will be done in another series, which refactors invalidate*() functions.
Mon, 12 Sep 2016 03:06:28 +0900 streamclone: force @filecache properties to be reloaded from file
FUJIWARA Katsunori <foozy@lares.dti.ne.jp> [Mon, 12 Sep 2016 03:06:28 +0900] rev 29917
streamclone: force @filecache properties to be reloaded from file Before this patch, consumev1() invokes repo.invalidate() after closing transaction, to force @filecache properties to be reloaded from files at next access, because streamclone writes data into files directly. But this doesn't work as expected in the case below: 1. at closing transaction, repo._refreshfilecachestats() refreshes file stat of each @filecache properties with streamclone-ed files This means that in-memory properties are treated as valid. 2. but streamclone doesn't changes in-memory properties This means that in-memory properties are actually invalid. 3. repo.invalidate() just forces to examine file stat of @filecache properties at the first access after it Such examination should concludes that reloading from file isn't needed, because file stat was already refreshed at (1). Therefore, invalid in-memory cached properties (2) are unintentionally treated as valid (1). This patch invokes repo.invalidate() with clearfilecache=True, to force @filecache properties to be reloaded from file at next access. BTW, it is accidental that repo.invalidate() without clearfilecache=True in streamclone case seems to work as expected before this patch. If transaction is started via "filtered repo" object, repo._refreshfilecachestats() tries to refresh file stat of each @filecache properties on "filtered repo" object, even though all of them are stored into "unfiltered repo" object. In this case, repo._refreshfilecachestats() does nothing unintentionally, but this unexpected behavior causes reloading @filecache properties after repo.invalidate(). This is reason why this patch should be applied before making _refreshfilecachestats() correctly refresh file stat of @filecache properties.
(0) -10000 -3000 -1000 -300 -100 -10 +10 +100 +300 +1000 +3000 +10000 tip