sapling/eden/scm
Durham Goode 8efe07f5b1 bookmarks: don't invalidate filecache during bookmark construction
Summary:
We're seeing an issue on the hg servers where the filecache assertion
that if a value is in obj.__dict__ it's also in obj._filecache is broken. This
occurred about 10% of the time in sandcastle jobs. The diff that caused this
went in in April (D21148446 (73c5cb89de)), so it's unclear why it's only cropping up now.

This is caused by the following steps:

1. repo._bookmarks is accessed while _bookmarks is in the _filecache but not in
the __dict__
2. This causes construction of _bookmarks, before it can set it to __dict__
3. Construction of _bookmarks calls repo.invalidate(clearfilecache=True), which
deletes _bookmarks from _filecache.
4. _bookmarks construction completes, and gets set to __dict__ (but now it's
missing from _filecache, so the invariant will fail next time someone checks).
5. Someone accesses _bookmarks later, and the assertion fires.

The fix is to just not clear the filecache during bookmark construction. The
main purpose of this invalidate was to let the changelog be reloaded, and I
think that will still happen since, if there are any new commits in the
changelog, the file size and time will change, triggering a reload next time the
_filecache entry is checked.

Reviewed By: quark-zju

Differential Revision: D24182914

fbshipit-source-id: fb49137e28d9224c6617d9c84faaf2f9de363aaf
2020-10-07 23:07:36 -07:00
..
contrib dispatch: run command in non-main thread 2020-09-18 18:47:24 -07:00
distutils_rust edenscm/hg: add GitHub Actions with CI for HG plus add fixes for getdeps (#25) 2020-07-10 12:07:45 -07:00
doc py3: fix test-help.t 2020-04-09 18:25:54 -07:00
edenscm bookmarks: don't invalidate filecache during bookmark construction 2020-10-07 23:07:36 -07:00
edenscmnative pydag: support hybrid commits backend 2020-10-06 19:13:03 -07:00
exec hgmain: check if EdenFS is running on Windows 2020-09-30 15:39:34 -07:00
hgcache_size_logger add hgcache size logger 2020-08-26 04:24:50 -07:00
i18n check-code: convert to Python 3 2020-05-07 09:07:50 -07:00
lib read_res: add --debug flag to cat command for printing entire message 2020-10-06 19:22:14 -07:00
newdoc newdoc: Add mutation and visibility documentation 2020-03-20 04:09:32 -07:00
pystubs repoview: further remove repoview references 2020-07-06 14:04:27 -07:00
slides Apply pyfmt to fbcode/eden 2020-10-04 04:51:00 -07:00
tests tests: remove some uses of rev numbers in templates 2020-10-07 21:22:58 -07:00
.editorconfig Move fb-mercurial sources into an eden/scm subdirectory. 2019-11-13 16:04:48 -08:00
.flake8 commitcloud: optimize revset for segmented changelog backend 2020-08-21 13:00:45 -07:00
.gitignore run-tests: make output format friendly for adhoc scripts 2020-06-10 19:29:59 -07:00
COPYING Move fb-mercurial sources into an eden/scm subdirectory. 2019-11-13 16:04:48 -08:00
gen_version.py version: a Rust crate providing version information 2020-05-18 09:00:40 -07:00
hgeditor Move fb-mercurial sources into an eden/scm subdirectory. 2019-11-13 16:04:48 -08:00
Makefile Back out "use python 3 for the eden_scm getdeps build" 2020-09-15 17:37:50 -07:00
README.rst Move fb-mercurial sources into an eden/scm subdirectory. 2019-11-13 16:04:48 -08:00
setup3.py lib: remove cdatapack 2020-10-02 10:47:23 -07:00
setup.py lib: remove cdatapack 2020-10-02 10:47:23 -07:00

Mercurial
=========

Mercurial is a fast, easy to use, distributed revision control tool
for software developers.

Basic install::

 $ make            # see install targets
 $ make install    # do a system-wide install
 $ hg debuginstall # sanity-check setup
 $ hg              # see help

Running without installing::

 $ make local      # build for inplace usage
 $ ./hg --version  # should show the latest version

See https://mercurial-scm.org/ for detailed installation
instructions, platform-specific notes, and Mercurial user information.