tests/test-context.py
changeset 33706 01a1c4e66816
parent 32518 bb628fc85b0e
child 33865 af20468eb0a4
--- a/tests/test-context.py	Sun Aug 06 17:47:41 2017 -0700
+++ b/tests/test-context.py	Wed Jul 19 13:34:06 2017 -0700
@@ -179,3 +179,14 @@
             print('data mismatch')
     except Exception as ex:
         print('cannot read data: %r' % ex)
+
+with repo.wlock(), repo.lock(), repo.transaction('test'):
+    with open(b'4', 'wb') as f:
+        f.write(b'4')
+    repo.dirstate.normal('4')
+    repo.commit('4')
+    revsbefore = len(repo.changelog)
+    repo.invalidate(clearfilecache=True)
+    revsafter = len(repo.changelog)
+    if revsbefore != revsafter:
+        print('changeset lost by repo.invalidate()')