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
util: add __ne__ to filestat class for consistency
This is follow up for
ca4065028e00, which introduced filestat class.
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.
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.