Rev 2614: Add test for partially fetching for InterKnitRepo. in file:///data/jelmer/bzr/shallow/

Jelmer Vernooij jelmer at samba.org
Fri Jul 13 17:53:21 BST 2007


At file:///data/jelmer/bzr/shallow/

------------------------------------------------------------
revno: 2614
revision-id: jelmer at samba.org-20070713165319-o3ljh4pqc7z08w0z
parent: jelmer at samba.org-20070713085323-7muz1iknfefj6kw3
committer: Jelmer Vernooij <jelmer at samba.org>
branch nick: shallow
timestamp: Fri 2007-07-13 19:53:19 +0300
message:
  Add test for partially fetching for InterKnitRepo.
modified:
  bzrlib/tests/test_repository.py test_repository.py-20060131075918-65c555b881612f4d
=== modified file 'bzrlib/tests/test_repository.py'
--- a/bzrlib/tests/test_repository.py	2007-05-18 11:42:33 +0000
+++ b/bzrlib/tests/test_repository.py	2007-07-13 16:53:19 +0000
@@ -448,6 +448,23 @@
                                                         repo_b).__class__)
 
 
+class TestInterKnitRepo(TestCaseWithTransport):
+    def test_fetch_partial(self):
+        """Test partial fetching."""
+        from_tree = self.make_branch_and_tree('tree', 
+            format='dirstate-tags')
+        self.build_tree(['tree/filename'])
+        from_tree.add('filename')
+        rev1 = from_tree.commit('commit filename')
+        from_tree.bzrdir.transport.clone('..').put_bytes('filename', 'volume')
+        rev2 = from_tree.commit('commit filename update')
+        to_repo = self.make_repository('to', format='dirstate-tags')
+        to_repo.fetch(from_tree.branch.repository, 
+                      limit_to_revisions=set([rev2]))
+        self.assertTrue(to_repo.has_revision(rev2))
+        self.assertFalse(to_repo.has_revision(rev1))
+
+
 class TestRepositoryConverter(TestCaseWithTransport):
 
     def test_convert_empty(self):




More information about the bazaar-commits mailing list