changeset 20946:e910336539f7

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)
author Pierre-Yves David <pierre-yves.david@fb.com>
date Thu, 03 Apr 2014 17:25:47 -0700
parents 18adc15635a1
children c33d7bf53812
files tests/test-bundle2.t
diffstat 1 files changed, 2 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- 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))
   >