Rev 1497: Add check to make sure file revids are preserved. in http://people.samba.org/bzr/jelmer/bzr-svn/trunk
Jelmer Vernooij
jelmer at samba.org
Wed Jul 23 19:57:40 BST 2008
At http://people.samba.org/bzr/jelmer/bzr-svn/trunk
------------------------------------------------------------
revno: 1497
revision-id: jelmer at samba.org-20080723185739-qyj5t8x4db5cxxrp
parent: jelmer at samba.org-20080723160627-a78rtwh0248oo5e4
committer: Jelmer Vernooij <jelmer at samba.org>
branch nick: 0.4
timestamp: Wed 2008-07-23 20:57:39 +0200
message:
Add check to make sure file revids are preserved.
modified:
tests/test_push.py test_push.py-20070201165715-g2ievcdfqi33wqsy-1
=== modified file 'tests/test_push.py'
--- a/tests/test_push.py 2008-07-23 00:48:04 +0000
+++ b/tests/test_push.py 2008-07-23 18:57:39 +0000
@@ -292,6 +292,34 @@
self.assertEqual(Branch.open("dc").revision_history(),
Branch.open("b").revision_history())
+ def test_fetch_preserves_file_revid(self):
+ self.build_tree({'dc/file': 'data'})
+ wt = self.bzrdir.open_workingtree()
+ wt.add('file')
+ self.build_tree({'dc/foo/bla': 'data43243242'})
+ revid = wt.commit(message="Commit from Bzr")
+
+ self.svndir.open_branch().pull(self.bzrdir.open_branch())
+
+ os.mkdir("b")
+ repos = self.svndir.sprout("b")
+
+ b = Branch.open("b")
+
+ def check_tree_revids(rtree):
+ self.assertEqual(rtree.inventory.root.revision, revid)
+ self.assertEqual(rtree.inventory[rtree.path2id("file")].revision,
+ revid)
+ self.assertEqual(rtree.inventory[rtree.path2id("foo")].revision,
+ revid)
+ self.assertEqual(rtree.inventory[rtree.path2id("foo/bla")].revision,
+ revid)
+
+ check_tree_revids(b.repository.revision_tree(b.last_revision()))
+
+ bc = self.svndir.open_branch()
+ check_tree_revids(bc.repository.revision_tree(bc.last_revision()))
+
def test_message(self):
self.build_tree({'dc/file': 'data'})
wt = self.bzrdir.open_workingtree()
More information about the bazaar-commits
mailing list