Rev 3816: Use the .all_packs() function rather than .packs in http://bzr.arbash-meinel.com/branches/bzr/1.9-dev/pack_retry_153786

John Arbash Meinel john at arbash-meinel.com
Sun Oct 26 15:25:03 GMT 2008


At http://bzr.arbash-meinel.com/branches/bzr/1.9-dev/pack_retry_153786

------------------------------------------------------------
revno: 3816
revision-id: john at arbash-meinel.com-20081026152455-ab2z1w4hfysx8sa6
parent: john at arbash-meinel.com-20081026151330-rbwnhhrup7wg60kf
committer: John Arbash Meinel <john at arbash-meinel.com>
branch nick: pack_retry_153786
timestamp: Sun 2008-10-26 10:24:55 -0500
message:
  Use the .all_packs() function rather than .packs
-------------- next part --------------
=== modified file 'bzrlib/repofmt/pack_repo.py'
--- a/bzrlib/repofmt/pack_repo.py	2008-10-26 15:13:30 +0000
+++ b/bzrlib/repofmt/pack_repo.py	2008-10-26 15:24:55 +0000
@@ -642,7 +642,6 @@
             except errors.NoSuchFile:
                 # A pack file went missing, try reloading in case it was just
                 # someone else repacking the repo.
-                import pdb; pdb.set_trace()
                 if not self._pack_collection.reload_pack_names():
                     raise
                 # If we got to here, that means we can retry, but we don't want

=== modified file 'bzrlib/tests/test_repository.py'
--- a/bzrlib/tests/test_repository.py	2008-10-26 15:13:30 +0000
+++ b/bzrlib/tests/test_repository.py	2008-10-26 15:24:55 +0000
@@ -1062,7 +1062,6 @@
             # bit, but that runs into concurrancy issues depending on the
             # platform
             print 'activating'
-            import pdb; pdb.set_trace()
             call_obj()
             for count, val in enumerate(orig_readv(relpath, *args, **kwargs)):
                 yield val
@@ -1090,7 +1089,7 @@
         self.addCleanup(alt_repo.unlock)
 
         packer = pack_repo.Packer(repo._pack_collection,
-                                  repo._pack_collection.packs,
+                                  repo._pack_collection.all_packs(),
                                   '.testpack')
         self.munge_function_to_trigger(packer, attr,
                                        packer.packs[1], alt_repo.pack)
@@ -1110,18 +1109,7 @@
 
     def test__copy_signature_texts_retries(self):
         return # there isn't a separate _copy_signature_texts function yet
-        repo, revs = self.make_repo_with_three_packs()
-        alt_repo = repository.Repository.open('.')
-        alt_repo.lock_write()
-        self.addCleanup(alt_repo.unlock)
-
-        packer = pack_repo.Packer(repo._pack_collection,
-                                  repo._pack_collection.packs,
-                                  '.testpack')
-        # Munge the middle pack so that while reading, it triggers a
-        # full-repack from the other repository
-        self.munge_function_to_trigger(packer, '_copy_signature_texts',
-                                       packer.packs[1], alt_repo.pack)
+        packer = self.setup_retry_function('_copy_signature_texts')
         packer.pack()
 
 



More information about the bazaar-commits mailing list