Rev 2737: Make the temporary back for autopacking vs pack to pack fetching distinguishable. in http://people.ubuntu.com/~robertc/baz2.0/repository

Robert Collins robertc at robertcollins.net
Fri Aug 24 22:41:04 BST 2007


At http://people.ubuntu.com/~robertc/baz2.0/repository

------------------------------------------------------------
revno: 2737
revision-id: robertc at robertcollins.net-20070824214001-twzxfyr522gew8u6
parent: robertc at robertcollins.net-20070824065606-9mfmnd3rync2r6i6
committer: Robert Collins <robertc at robertcollins.net>
branch nick: repository
timestamp: Sat 2007-08-25 07:40:01 +1000
message:
  Make the temporary back for autopacking vs pack to pack fetching distinguishable.
modified:
  bzrlib/repofmt/knitrepo.py     knitrepo.py-20070206081537-pyy4a00xdas0j4pf-1
  bzrlib/repofmt/pack_repo.py    pack_repo.py-20070813041115-gjv5ma7ktfqwsjgn-1
  bzrlib/repository.py           rev_storage.py-20051111201905-119e9401e46257e3
=== modified file 'bzrlib/repofmt/knitrepo.py'
--- a/bzrlib/repofmt/knitrepo.py	2007-08-13 04:45:41 +0000
+++ b/bzrlib/repofmt/knitrepo.py	2007-08-24 21:40:01 +0000
@@ -162,6 +162,9 @@
         operation and will be removed in the future.
         :return: a dictionary of revision_id->revision_parents_list.
         """
+        if 'evil' in debug.debug_flags:
+            mutter_callsite(2,
+                "get_revision_graph scales with size of history.")
         # special case NULL_REVISION
         if revision_id == _mod_revision.NULL_REVISION:
             return {}

=== modified file 'bzrlib/repofmt/pack_repo.py'
--- a/bzrlib/repofmt/pack_repo.py	2007-08-24 06:56:06 +0000
+++ b/bzrlib/repofmt/pack_repo.py	2007-08-24 21:40:01 +0000
@@ -181,7 +181,7 @@
         return True
 
     def create_pack_from_packs(self, revision_index_map, inventory_index_map,
-        text_index_map, signature_index_map, revision_ids=None):
+        text_index_map, signature_index_map, suffix, revision_ids=None):
         """Create a new pack by reading data from other packs.
 
         This does little more than a bulk copy of data. One key difference
@@ -206,7 +206,7 @@
         if getattr(self.repo, '_open_pack_tuple', None) is not None:
             raise errors.BzrError('call to create_pack_from_packs while '
                 'another pack is being written.')
-        random_name = self.repo.control_files._lock.nonce + '.autopack'
+        random_name = self.repo.control_files._lock.nonce + suffix
         if 'fetch' in debug.debug_flags:
             plain_pack_list = ['%s%s' % (transport.base, name) for
                 transport, name in revision_index_map.itervalues()]
@@ -471,7 +471,7 @@
         # select signature keys
         signature_index_map = self._signature_index_map(pack_details)
         self.create_pack_from_packs(revision_index_map, inv_index_map,
-            text_index_map, signature_index_map)
+            text_index_map, signature_index_map, '.autopack')
 
     def _copy_nodes(self, nodes, index_map, writer, write_index):
         # plan a readv on each source pack:

=== modified file 'bzrlib/repository.py'
--- a/bzrlib/repository.py	2007-08-24 06:56:06 +0000
+++ b/bzrlib/repository.py	2007-08-24 21:40:01 +0000
@@ -1999,7 +1999,8 @@
             inventory_index_map,
             text_index_map,
             signature_index_map,
-            revision_ids
+            '.fetch',
+            revision_ids,
             )
         if pack is not None:
             self.target._packs.save()



More information about the bazaar-commits mailing list