destroyed: keep the filecache in sync with __dict__ (
issue3335) (
issue3693) (
issue3743)
We need to make sure that if X is in the filecache then it's also in the
filecache owner's __dict__, otherwise it will go out of sync:
repo.X # first access to X, records stat info in
# filecache and updates __dict__
repo._filecache.clear() # removes X from _filecache but it's still in __dict__
repo.invalidate() # iterates over _filecache and removes entries
# from __dict__, but X isn't in _filecache, so
# it's kept in __dict__
repo.X # X is fetched from __dict__, bypassing the filecache
$ cat >> $HGRCPATH <<EOF
> [extensions]
> graphlog=
> rebase=
>
> [alias]
> tglog = log -G --template "{rev}: '{desc}' {branches}\n"
> EOF
$ hg init repo
$ cd repo
$ echo A > a
$ echo >> a
$ hg ci -Am A
adding a
$ echo B > a
$ echo >> a
$ hg ci -m B
$ echo C > a
$ echo >> a
$ hg ci -m C
$ hg up -q -C 0
$ echo D >> a
$ hg ci -Am AD
created new head
$ hg tglog
@ 3: 'AD'
|
| o 2: 'C'
| |
| o 1: 'B'
|/
o 0: 'A'
$ hg rebase -s 1 -d 3
merging a
merging a
saved backup bundle to $TESTTMP/repo/.hg/strip-backup/*-backup.hg (glob)
$ hg tglog
@ 3: 'C'
|
o 2: 'B'
|
o 1: 'AD'
|
o 0: 'A'
$ cd ..