Show More
@@ -1241,8 +1241,14 b' 1) We want to make sure that the cached ' | |||||
1241 | bookmarks change |
|
1241 | bookmarks change | |
1242 | $ cd .. |
|
1242 | $ cd .. | |
1243 | $ cat >$TESTTMP/test_extension.py << EOF |
|
1243 | $ cat >$TESTTMP/test_extension.py << EOF | |
|
1244 | > from __future__ import absolute_import, print_function | |||
1244 | > import weakref |
|
1245 | > import weakref | |
1245 | > from mercurial import cmdutil, extensions, bookmarks, repoview |
|
1246 | > from mercurial import ( | |
|
1247 | > bookmarks, | |||
|
1248 | > cmdutil, | |||
|
1249 | > extensions, | |||
|
1250 | > repoview, | |||
|
1251 | > ) | |||
1246 | > def _bookmarkchanged(orig, bkmstoreinst, *args, **kwargs): |
|
1252 | > def _bookmarkchanged(orig, bkmstoreinst, *args, **kwargs): | |
1247 | > reporef = weakref.ref(bkmstoreinst._repo) |
|
1253 | > reporef = weakref.ref(bkmstoreinst._repo) | |
1248 | > def trhook(tr): |
|
1254 | > def trhook(tr): | |
@@ -1250,7 +1256,7 b' bookmarks change' | |||||
1250 | > hidden1 = repoview.computehidden(repo) |
|
1256 | > hidden1 = repoview.computehidden(repo) | |
1251 | > hidden = repoview.filterrevs(repo, 'visible') |
|
1257 | > hidden = repoview.filterrevs(repo, 'visible') | |
1252 | > if sorted(hidden1) != sorted(hidden): |
|
1258 | > if sorted(hidden1) != sorted(hidden): | |
1253 |
> print |
|
1259 | > print("cache inconsistency") | |
1254 | > bkmstoreinst._repo.currenttransaction().addpostclose('test_extension', trhook) |
|
1260 | > bkmstoreinst._repo.currenttransaction().addpostclose('test_extension', trhook) | |
1255 | > orig(bkmstoreinst, *args, **kwargs) |
|
1261 | > orig(bkmstoreinst, *args, **kwargs) | |
1256 | > def extsetup(ui): |
|
1262 | > def extsetup(ui): |
General Comments 0
You need to be logged in to leave comments.
Login now