Mercurial > hg
view tests/test-empty.t @ 29201:a109bf7e0dc2
util: make atomictempfile avoid ambiguity of file stat if needed
Ambiguity check is executed at close(), only if:
- atomictempfile is created with checkambig=True, and
- target file exists before renaming
This restriction avoids performance decrement by needless examination
of file stat (for example, filelog doesn't need exact cache
validation, even though it uses atomictempfile to write changes out).
See description of filestat class for detail about why the logic in
this patch works as expected.
This patch is a part of preparation for "Exact Cache Validation Plan":
https://www.mercurial-scm.org/wiki/ExactCacheValidationPlan
author | FUJIWARA Katsunori <foozy@lares.dti.ne.jp> |
---|---|
date | Thu, 19 May 2016 00:20:38 +0900 |
parents | ab2362e1672e |
children | f1186c292d03 |
line wrap: on
line source
Create an empty repo: $ hg init a $ cd a Try some commands: $ hg log $ hg grep wah [1] $ hg manifest $ hg verify checking changesets checking manifests crosschecking files in changesets and manifests checking files 0 files, 0 changesets, 0 total revisions Check the basic files created: $ ls .hg 00changelog.i requires store Should be empty: $ ls .hg/store Poke at a clone: $ cd .. $ hg clone a b updating to branch default 0 files updated, 0 files merged, 0 files removed, 0 files unresolved $ cd b $ hg verify checking changesets checking manifests crosschecking files in changesets and manifests checking files 0 files, 0 changesets, 0 total revisions $ ls .hg 00changelog.i hgrc requires store Should be empty: $ ls .hg/store $ cd ..