Sat, 04 Jun 2016 16:53:44 +0200 largefiles: move basestore._openstore into new module to remove cycle
liscju <piotr.listkiewicz@gmail.com> [Sat, 04 Jun 2016 16:53:44 +0200] rev 29305
largefiles: move basestore._openstore into new module to remove cycle
Thu, 02 Jun 2016 22:39:01 +0100 revset: make filteredset.__nonzero__ respect the order of the filteredset
Kostia Balytskyi <ikostia@fb.com> [Thu, 02 Jun 2016 22:39:01 +0100] rev 29304
revset: make filteredset.__nonzero__ respect the order of the filteredset This fix allows __nonzero__ to respect the direction of iteration of the whole filteredset. Here's the case when it matters. Imagine that we have a very large repository and we want to execute a command like: $ hg log --rev '(tip:0) and user(ikostia)' --limit 1 (we want to get the latest commit by me). Mercurial will evaluate a filteredset lazy data structure, an instance of the filteredset class, which will know that it has to iterate in a descending order (isdescending() will return True if called). This means that when some code iterates over the instance of this filteredset, the 'and user(ikostia)' condition will be first checked on the latest revision, then on the second latest and so on, allowing Mercurial to print matches as it founds them. However, cmdutil.getgraphlogrevs contains the following code: revs = _logrevs(repo, opts) if not revs: return revset.baseset(), None, None The "not revs" expression is evaluated by calling filteredset.__nonzero__, which in its current implementation will try to iterate the filteredset in ascending order until it finds a revision that matches the 'and user(..' condition. If the condition is only true on late revisions, a lot of useless iterations will be done. These iterations could be avoided if __nonzero__ followed the order of the filteredset, which in my opinion is a sensible thing to do here. The problem gets even worse when instead of 'user(ikostia)' some more expensive check is performed, like grepping the commit diff. I tested this fix on a very large repo where tip is my commit and my very first commit comes fairly late in the revision history. Results of timing of the above command on that very large repo. -with my fix: real 0m1.795s user 0m1.657s sys 0m0.135s -without my fix: real 1m29.245s user 1m28.223s sys 0m0.929s I understand that this is a very specific kind of problem that presents itself very rarely, only on very big repositories and with expensive checks and so on. But I don't see any disadvantages to this kind of fix either.
Fri, 03 Jun 2016 00:44:20 +0900 phases: make writing phaseroots file out avoid ambiguity of file stat
FUJIWARA Katsunori <foozy@lares.dti.ne.jp> [Fri, 03 Jun 2016 00:44:20 +0900] rev 29303
phases: make writing phaseroots file out avoid ambiguity of file stat Cached attribute repo._phasecache uses stat of '.hg/phaseroots' file to examine validity of cached contents. If writing '.hg/phaseroots' file out keeps ctime, mtime and size of it, change is overlooked, and old contents cached before change isn't invalidated as expected. To avoid ambiguity of file stat, this patch writes '.hg/phaseroots' file out with checkambig=True. This patch is a part of "Exact Cache Validation Plan": https://www.mercurial-scm.org/wiki/ExactCacheValidationPlan
Fri, 03 Jun 2016 00:44:20 +0900 dirstate: make writing branch file out avoid ambiguity of file stat
FUJIWARA Katsunori <foozy@lares.dti.ne.jp> [Fri, 03 Jun 2016 00:44:20 +0900] rev 29302
dirstate: make writing branch file out avoid ambiguity of file stat Cached attribute dirstate._branch uses stat of '.hg/branch' file to examine validity of cached contents. If writing '.hg/branch' file out keeps ctime, mtime and size of it, change is overlooked, and old contents cached before change isn't invalidated as expected. To avoid ambiguity of file stat, this patch writes '.hg/branch' file out with checkambig=True. This patch is a part of "Exact Cache Validation Plan": https://www.mercurial-scm.org/wiki/ExactCacheValidationPlan
Fri, 03 Jun 2016 00:44:20 +0900 dirstate: make writing dirstate file out avoid ambiguity of file stat
FUJIWARA Katsunori <foozy@lares.dti.ne.jp> [Fri, 03 Jun 2016 00:44:20 +0900] rev 29301
dirstate: make writing dirstate file out avoid ambiguity of file stat Cached attribute repo.dirstate uses stat of '.hg/dirstate' file to examine validity of cached contents. If writing '.hg/dirstate' file out keeps ctime, mtime and size of it, change is overlooked, and old contents cached before change isn't invalidated as expected. To avoid ambiguity of file stat, this patch writes '.hg/dirstate' file out with checkambig=True. The former diff hunk changes the code path for "dirstate.write()", and the latter changes the code path for "dirstate.savebackup()". This patch is a part of "Exact Cache Validation Plan": https://www.mercurial-scm.org/wiki/ExactCacheValidationPlan
Fri, 03 Jun 2016 00:44:20 +0900 bookmarks: make writing files out avoid ambiguity of file stat
FUJIWARA Katsunori <foozy@lares.dti.ne.jp> [Fri, 03 Jun 2016 00:44:20 +0900] rev 29300
bookmarks: make writing files out avoid ambiguity of file stat Cached attribute repo._bookmarks uses stat of '.hg/bookmarks' and '.hg/bookmarks.current' files to examine validity of cached contents. If writing these files out keeps ctime, mtime and size of them, change is overlooked, and old contents cached before change isn't invalidated as expected. To avoid ambiguity of file stat, this patch writes '.hg/bookmarks' and '.hg/bookmarks.current' files out with checkambig=True. This patch is a part of "Exact Cache Validation Plan": https://www.mercurial-scm.org/wiki/ExactCacheValidationPlan
Fri, 03 Jun 2016 00:44:20 +0900 transaction: avoid ambiguity of file stat at closing transaction
FUJIWARA Katsunori <foozy@lares.dti.ne.jp> [Fri, 03 Jun 2016 00:44:20 +0900] rev 29299
transaction: avoid ambiguity of file stat at closing transaction Files below, which might be changed at closing transaction, are used to examine validity of cached properties. If changing keeps ctime, mtime and size of a file, change is overlooked, and old contents cached before change isn't invalidated as expected. - .hg/bookmarks - .hg/dirstate - .hg/phaseroots To avoid ambiguity of file stat, this patch writes files out with checkambig=True at closing transaction. checkambig becomes True only at closing (= 'not suffix'), because stat information of '.pending' file isn't used to examine validity of cached properties. This patch is a part of "Exact Cache Validation Plan": https://www.mercurial-scm.org/wiki/ExactCacheValidationPlan
Fri, 03 Jun 2016 00:44:20 +0900 util: add __ne__ to filestat class for consistency
FUJIWARA Katsunori <foozy@lares.dti.ne.jp> [Fri, 03 Jun 2016 00:44:20 +0900] rev 29298
util: add __ne__ to filestat class for consistency This is follow up for ca4065028e00, which introduced filestat class.
Sat, 16 Apr 2016 16:01:24 -0700 style: remove namespace class
Pierre-Yves David <pierre-yves.david@ens-lyon.org> [Sat, 16 Apr 2016 16:01:24 -0700] rev 29297
style: remove namespace class For better or worse, our coding do not use use class for pure namespacing. We remove the class introduced in a5009789960c.
Sat, 16 Apr 2016 15:59:30 -0700 style: don't use capital letter for constant
Pierre-Yves David <pierre-yves.david@ens-lyon.org> [Sat, 16 Apr 2016 15:59:30 -0700] rev 29296
style: don't use capital letter for constant For better or worse, our coding do not use all caps for constants. We rename constant name introduced in a5009789960c.
(0) -10000 -3000 -1000 -300 -100 -10 +10 +100 +300 +1000 +3000 +10000 tip