Rev 1184: Add test for dpush. in file:///data/jelmer/bzr-svn/dpush/
Jelmer Vernooij
jelmer at samba.org
Sat Jun 28 18:39:32 BST 2008
At file:///data/jelmer/bzr-svn/dpush/
------------------------------------------------------------
revno: 1184
revision-id: jelmer at samba.org-20080628173931-gpuo7fj9xcog50ou
parent: jelmer at samba.org-20080628160151-9f1e1vb6h0v9uc1w
committer: Jelmer Vernooij <jelmer at samba.org>
branch nick: dpush
timestamp: Sat 2008-06-28 19:39:31 +0200
message:
Add test for dpush.
modified:
tests/test_push.py test_push.py-20070201165715-g2ievcdfqi33wqsy-1
=== modified file 'tests/test_push.py'
--- a/tests/test_push.py 2008-06-27 18:43:40 +0000
+++ b/tests/test_push.py 2008-06-28 17:39:31 +0000
@@ -37,6 +37,38 @@
from bzrlib.plugins.svn.mapping import SVN_PROP_BZR_REVISION_ID
from bzrlib.plugins.svn.tests import TestCaseWithSubversionRepository
+class TestDPush(TestCaseWithSubversionRepository):
+ def setUp(self):
+ super(TestDPush, self).setUp()
+ self.repos_url = self.make_repository('d')
+
+ dc = self.commit_editor()
+ foo = dc.add_dir("foo")
+ foo.add_file("foo/bla").modify("data")
+ dc.close()
+
+ self.svndir = BzrDir.open(self.repos_url)
+ os.mkdir("dc")
+ self.bzrdir = self.svndir.sprout("dc")
+
+ def commit_editor(self):
+ return self.get_commit_editor(self.repos_url)
+
+ def test_change(self):
+ self.build_tree({'dc/foo/bla': 'other data'})
+ wt = self.bzrdir.open_workingtree()
+ newid = wt.commit(message="Commit from Bzr")
+
+ svnbranch = self.svndir.open_branch()
+ svnbranch.pull(self.bzrdir.open_branch())
+
+ c = ra.RemoteAccess(self.repos_url)
+ (entries, fetch_rev, props) = c.get_dir("", c.get_latest_revnum())
+ self.assertEquals(['svn:entry:committed-rev',
+ 'svn:entry:last-author', 'svn:entry:uuid',
+ 'svn:entry:committed-date'], props.keys())
+
+
class TestPush(TestCaseWithSubversionRepository):
def setUp(self):
super(TestPush, self).setUp()
More information about the bazaar-commits
mailing list