Rev 5563: Test for more fallback keys, etc. in http://bazaar.launchpad.net/~jameinel/bzr/2.3-commit-to-stacked

John Arbash Meinel john at arbash-meinel.com
Mon Dec 6 22:24:56 GMT 2010


At http://bazaar.launchpad.net/~jameinel/bzr/2.3-commit-to-stacked

------------------------------------------------------------
revno: 5563
revision-id: john at arbash-meinel.com-20101206222425-tqx3gjmswtf3ciht
parent: john at arbash-meinel.com-20101206221152-fh2b2917wbuuvgn1
committer: John Arbash Meinel <john at arbash-meinel.com>
branch nick: 2.3-commit-to-stacked
timestamp: Mon 2010-12-06 16:24:25 -0600
message:
  Test for more fallback keys, etc.
  
  It works, I just don't quite know *why* it works.
  However, it also looks like RemoteRepositoryFormat-default is defaulting
  to a knitpack6 format, and not a 2a one, so I'm not confident, yet.
-------------- next part --------------
=== modified file 'bzrlib/tests/per_repository_reference/test_commit_with_stacking.py'
--- a/bzrlib/tests/per_repository_reference/test_commit_with_stacking.py	2010-12-06 22:11:52 +0000
+++ b/bzrlib/tests/per_repository_reference/test_commit_with_stacking.py	2010-12-06 22:24:25 +0000
@@ -133,6 +133,9 @@
         stacked_tree.add(['f3.txt'], ['f3.txt-id'])
         stacked_key = ('stacked-rev-id',)
         stacked_tree.commit('add f3', rev_id=stacked_key[0])
+        stacked_only_repo = self.get_only_repo(stacked_tree)
+        self.assertPresent([self.r2_key], stacked_only_repo.inventories,
+                           [self.r1_key, self.r2_key])
         # This ensures we get a Remote URL, rather than a local one.
         stacked2_url = urlutils.join(base_tree.branch.base, '../stacked2')
         stacked2_bzrdir = stacked_tree.bzrdir.sprout(stacked2_url,
@@ -148,13 +151,14 @@
         # it needs to pull the basis information from a fallback-of-fallback.
         self.build_tree(['stacked2/f3.txt'])
         stacked2_only_repo = self.get_only_repo(stacked2_tree)
-        self.assertPresent([], stacked2_only_repo.inventories, [self.r1_key])
+        self.assertPresent([], stacked2_only_repo.inventories,
+                           [self.r1_key, self.r2_key])
         stacked2_tree.add(['f3.txt'], ['f3.txt-id'])
         stacked2_tree.commit('add f3', rev_id='stacked2-rev-id')
         # We added data to this read-locked repo, so refresh it
         stacked2_only_repo.refresh_data()
-        self.assertPresent([self.r1_key],
-                           stacked2_only_repo.inventories, [self.r1_key])
+        self.assertPresent([self.r1_key], stacked2_only_repo.inventories,
+                           [self.r1_key, self.r2_key])
 
 # TOOD: We need to run the above tests for when the source and/or the target
 #       are remote repositories.



More information about the bazaar-commits mailing list