Rev 1454: Convert to new API. in http://people.samba.org/bzr/jelmer/bzr-svn/trunk
Jelmer Vernooij
jelmer at samba.org
Tue Jul 8 14:45:33 BST 2008
At http://people.samba.org/bzr/jelmer/bzr-svn/trunk
------------------------------------------------------------
revno: 1454
revision-id: jelmer at samba.org-20080708134532-ziqy0wcjc43r2911
parent: jelmer at samba.org-20080708132143-ge6ulosbu931e1gc
committer: Jelmer Vernooij <jelmer at samba.org>
branch nick: 0.4
timestamp: Tue 2008-07-08 15:45:32 +0200
message:
Convert to new API.
modified:
tests/test_fetch.py test_fetch.py-20070624210302-luvgwjmlfysk5qeq-1
=== modified file 'tests/test_fetch.py'
--- a/tests/test_fetch.py 2008-07-07 22:46:41 +0000
+++ b/tests/test_fetch.py 2008-07-08 13:45:32 +0000
@@ -1502,35 +1502,38 @@
self.assertEqual(mapping.generate_file_id(repos.uuid, 1, "trunk", u""), tree.inventory.root.file_id)
def test_fetch_odd(self):
- repos_url = self.make_client('d', 'dc')
-
- self.build_tree({'dc/trunk': None,
- 'dc/trunk/hosts': 'hej1'})
- self.client_add("dc/trunk")
- self.client_commit("dc", "created trunk and added hosts") #1
- self.client_update("dc")
-
- self.build_tree({'dc/trunk/hosts': 'hej2'})
- self.client_commit("dc", "rev 2") #2
- self.client_update("dc")
-
- self.build_tree({'dc/trunk/hosts': 'hej3'})
- self.client_commit("dc", "rev 3") #3
- self.client_update("dc")
-
- self.build_tree({'dc/branches': None})
- self.client_add("dc/branches")
- self.client_commit("dc", "added branches") #4
- self.client_update("dc")
-
- self.client_copy("dc/trunk", "dc/branches/foobranch")
- self.client_commit("dc", "added branch foobranch") #5
- self.client_update("dc")
-
- self.build_tree({'dc/branches/foobranch/hosts': 'foohosts'})
- self.client_commit("dc", "foohosts") #6
-
- repos = remote.SvnRemoteAccess(SvnRaTransport("svn+"+repos_url), format.SvnRemoteFormat()).find_repository()
+ repos_url = self.make_repository('d')
+
+ dc = self.get_commit_editor(repos_url)
+ trunk = dc.add_dir("trunk")
+ trunk.add_file("trunk/hosts").modify('hej1')
+ dc.close()
+
+ dc = self.get_commit_editor(repos_url)
+ trunk = dc.open_dir("trunk")
+ trunk.open_file("trunk/hosts").modify("hej2")
+ dc.close()
+
+ dc = self.get_commit_editor(repos_url)
+ trunk = dc.open_dir("trunk")
+ trunk.open_file("trunk/hosts").modify("hej3")
+ dc.close()
+
+ dc = self.get_commit_editor(repos_url)
+ dc.add_dir("branches")
+ dc.close()
+
+ dc = self.get_commit_editor(repos_url)
+ dc.open_dir("branches").add_dir("branches/foobranch", "trunk")
+ dc.close()
+
+ dc = self.get_commit_editor(repos_url)
+ branches = dc.open_dir("branches")
+ foobranch = branches.open_dir("branches/foobranch")
+ foobranch.open_file("branches/foobranch/hosts").modify('foohosts')
+ dc.close()
+
+ repos = remote.SvnRemoteAccess(SvnRaTransport(repos_url), format.SvnRemoteFormat()).find_repository()
set_branching_scheme(repos, TrunkBranchingScheme())
mapping = repos.get_mapping()
More information about the bazaar-commits
mailing list