##// END OF EJS Templates
largefiles: access to specific fields only if largefiles enabled (issue4547)...
largefiles: access to specific fields only if largefiles enabled (issue4547) Even if largefiles extension is enabled in a repository, "repo" object, which isn't "largefiles.reposetup()"-ed, is passed to overridden functions in the cases below unexpectedly, because extensions are enabled for each repositories strictly. (1) clone without -U: (2) pull with -U: (3) pull with --rebase: combination of "enabled@src", "disabled@dst" and "not-required@src" cause this situation. largefiles requirement @src @dst @src result -------- -------- --------------- -------------------- enabled disabled not-required aborted unexpectedly required requirement error (intentional) -------- -------- --------------- -------------------- enabled enabled * success -------- -------- --------------- -------------------- disabled enabled * success (only for "pull") -------- -------- --------------- -------------------- disabled disabled not-required success required requirement error (intentional) -------- -------- --------------- -------------------- (4) update/revert with a subrepo disabling largefiles In these cases, overridden functions cause accessing to largefiles specific fields of not "largefiles.reposetup()"-ed "repo" object, and execution is aborted. - (1), (2), (4) cause accessing to "_lfstatuswriters" in "getstatuswriter()" invoked via "updatelfiles()" - (3) causes accessing to "_lfcommithooks" in "overriderebase()" For safe accessing to these fields, this patch examines whether passed "repo" object is "largefiles.reposetup()"-ed or not before accessing to them. This patch chooses examining existence of newly introduced "_largefilesenabled" instead of "_lfcommithooks" and "_lfstatuswriters" directly, because the former is better name for the generic "largefiles is enabled in this repo" mark than the latter. In the future, all other overridden functions should avoid largefiles specific processing for efficiency, and "_largefilesenabled" is better also for such purpose. BTW, "lfstatus" can't be used for such purpose, because some code paths set it forcibly regardless of existence of it in specified "repo" object.

File last commit:

r20045:b3684fd2 default
r24158:d414c28d stable
Show More
test-filecache.py.out
60 lines | 1.1 KiB | text/plain | TextLexer
/ tests / test-filecache.py.out
Idan Kamara
scmutil: introduce filecache...
r14928 basic:
Siddharth Agarwal
scmutil.filecache: support watching over multiple files
r20045 * neither file exists
Idan Kamara
scmutil: introduce filecache...
r14928 creating
Siddharth Agarwal
scmutil.filecache: support watching over multiple files
r20045 * neither file still exists
Siddharth Agarwal
test-filecache.py: add markers to the output for each event...
r20041 * empty file x created
Idan Kamara
scmutil: introduce filecache...
r14928 creating
Siddharth Agarwal
test-filecache.py: add markers to the output for each event...
r20041 * file x changed size
Idan Kamara
scmutil: introduce filecache...
r14928 creating
Siddharth Agarwal
scmutil.filecache: support watching over multiple files
r20045 * nothing changed with either file
Siddharth Agarwal
test-filecache.py: add markers to the output for each event...
r20041 * file x changed inode
Idan Kamara
scmutil: introduce filecache...
r14928 creating
Siddharth Agarwal
scmutil.filecache: support watching over multiple files
r20045 * empty file y created
creating
* file y changed size
creating
* file y changed inode
creating
* both files changed inode
creating
Idan Kamara
scmutil: introduce filecache...
r14928
fakeuncacheable:
Siddharth Agarwal
scmutil.filecache: support watching over multiple files
r20045 * neither file exists
Idan Kamara
scmutil: introduce filecache...
r14928 creating
Siddharth Agarwal
scmutil.filecache: support watching over multiple files
r20045 * neither file still exists
Idan Kamara
scmutil: introduce filecache...
r14928 creating
Siddharth Agarwal
test-filecache.py: add markers to the output for each event...
r20041 * empty file x created
Idan Kamara
scmutil: introduce filecache...
r14928 creating
Siddharth Agarwal
test-filecache.py: add markers to the output for each event...
r20041 * file x changed size
Idan Kamara
scmutil: introduce filecache...
r14928 creating
Siddharth Agarwal
scmutil.filecache: support watching over multiple files
r20045 * nothing changed with either file
Idan Kamara
scmutil: introduce filecache...
r14928 creating
Siddharth Agarwal
test-filecache.py: add markers to the output for each event...
r20041 * file x changed inode
Idan Kamara
scmutil: introduce filecache...
r14928 creating
Siddharth Agarwal
scmutil.filecache: support watching over multiple files
r20045 * empty file y created
creating
* file y changed size
creating
* file y changed inode
creating
* both files changed inode
creating
Idan Kamara
destroyed: keep the filecache in sync with __dict__ (issue3335) (issue3693) (issue3743)...
r18313 repository tip rolled back to revision -1 (undo commit)
working directory now based on revision -1
repository tip rolled back to revision -1 (undo commit)
working directory now based on revision -1
Idan Kamara
filecache: create an entry in _filecache when __set__ is called for a missing one...
r18316
setbeforeget:
Siddharth Agarwal
scmutil.filecache: support watching over multiple files
r20045 * neither file exists
Siddharth Agarwal
test-filecache.py: make setbeforeget test clearer...
r20040 string set externally
Siddharth Agarwal
test-filecache.py: add markers to the output for each event...
r20041 * file x created
Idan Kamara
filecache: create an entry in _filecache when __set__ is called for a missing one...
r18316 creating
Siddharth Agarwal
test-filecache.py: make setbeforeget test clearer...
r20040 string from function
Siddharth Agarwal
scmutil.filecache: support watching over multiple files
r20045 * string set externally again
string 2 set externally
* file y created
creating
string from function