bundle2: lock the repo during unbundle test
authorPierre-Yves David <pierre-yves.david@fb.com>
Thu, 03 Apr 2014 17:25:47 -0700
changeset 20946 e910336539f7
parent 20945 18adc15635a1
child 20947 c33d7bf53812
bundle2: lock the repo during unbundle test We forgot the lock the repo. It's not too bad during tests, but the lock also still carry some transaction logic. (yes we need to get rid of this)
tests/test-bundle2.t
--- a/tests/test-bundle2.t	Sun Mar 02 18:52:16 2014 +0100
+++ b/tests/test-bundle2.t	Thu Apr 03 17:25:47 2014 -0700
@@ -72,11 +72,13 @@
   > def cmdunbundle2(ui, repo):
   >     """process a bundle2 stream from stdin on the current repo"""
   >     try:
+  >         lock = repo.lock()
   >         try:
   >             bundle2.processbundle(repo, sys.stdin)
   >         except KeyError, exc:
   >             raise util.Abort('missing support for %s' % exc)
   >     finally:
+  >         lock.release()
   >         remains = sys.stdin.read()
   >         ui.write('%i unread bytes\n' % len(remains))
   >