Mercurial > hg
view contrib/revsetbenchmarks.txt @ 21917:ac3b3a2d976d
largefiles: avoid unnecessary creation of .hg/largefiles when opening lfdirstate
Previously, the directory '.hg/largefiles' would always be created if it didn't
exist when the lfdirstate was opened. If there were no standin files, no
dirstate file would be created in the directory. The end result was that
enabling the largefiles extension globally, but not explicitly adding a
largefile would result in the repository eventually sprouting this directory.
Creation of this directory effectively changes readonly operations like summary
and status into operations that require write access. Without write access,
commands that would succeed without the extension loaded would abort with a
surprising error when the extension is loaded, but not actively used:
$ hg sum -R /tmp/thg --config extensions.largefiles=
parent: 16541:00dc703d5aed
repowidget: specify incoming bundle by plain file path to avoid url parsing
branch: default
abort: Permission denied: '/tmp/thg/.hg/largefiles'
This change is simpler than changing the callers of openlfdirstate() to use the
'create' parameter that was introduced in ae57920ac188, and probably how that
should have been implemented in the first place.
author | Matt Harbison <matt_harbison@yahoo.com> |
---|---|
date | Thu, 17 Jul 2014 20:17:17 -0400 |
parents | cb0e28d61905 |
children | f486001f9d6f |
line wrap: on
line source
all() draft() ::tip draft() and ::tip ::tip and draft() 0::tip roots(0::tip) author(lmoscovicz) author(mpm) author(lmoscovicz) or author(mpm) author(mpm) or author(lmoscovicz) tip:0 max(tip:0) min(0:tip) 0:: min(0::) roots((tip~100::) - (tip~100::tip)) ::p1(p1(tip)):: public() :10000 and public() draft() :10000 and draft() max(::(tip~20) - obsolete())