Rev 442: Set parent URLs in svn-import. (#94406) in sftp://people.samba.org/~/bzr/bzr-svn/0.3/
Jelmer Vernooij
jelmer at samba.org
Tue Apr 3 21:33:06 BST 2007
At sftp://people.samba.org/~/bzr/bzr-svn/0.3/
------------------------------------------------------------
revno: 442
revision-id: jelmer at samba.org-20070403203246-0tnykd16qpi4uy3n
parent: jelmer at samba.org-20070403125101-53li3xzbpbsxryb3
committer: Jelmer Vernooij <jelmer at samba.org>
branch nick: 0.3
timestamp: Tue 2007-04-03 22:32:46 +0200
message:
Set parent URLs in svn-import. (#94406)
modified:
NEWS news-20061231030336-h9fhq245ie0de8bs-1
convert.py svn2bzr.py-20051018015439-cb4563bff29e632d
tests/test_convert.py test_convert.py-20060705203611-b1l0bapeku6foco0-1
=== modified file 'NEWS'
--- a/NEWS 2007-03-15 16:09:51 +0000
+++ b/NEWS 2007-04-03 20:32:46 +0000
@@ -4,6 +4,8 @@
* Don't do extra checkout before push if possible. (#91885)
+ * Set parent URLs in svn-import. (#94406)
+
bzr-svn 0.3.2 2007-03-13
BUG FIXES
=== modified file 'convert.py'
--- a/convert.py 2007-04-03 12:51:01 +0000
+++ b/convert.py 2007-04-03 20:32:46 +0000
@@ -127,12 +127,14 @@
target_dir.open_repository()
except NoRepositoryPresent:
target_dir.create_repository()
+ source_branch_url = urlutils.join(url, branch)
try:
target_branch = target_dir.open_branch()
except NotBranchError:
target_branch = target_dir.create_branch()
+ target_branch.set_parent(source_branch_url)
if not revid in target_branch.revision_history():
- source_branch = Branch.open(urlutils.join(url, branch))
+ source_branch = Branch.open(source_branch_url)
target_branch.pull(source_branch)
if working_trees and not target_dir.has_workingtree():
target_dir.create_workingtree()
=== modified file 'tests/test_convert.py'
--- a/tests/test_convert.py 2007-03-25 14:41:44 +0000
+++ b/tests/test_convert.py 2007-04-03 20:32:46 +0000
@@ -70,6 +70,14 @@
self.build_tree({'dc/trunk/file': 'otherdata'})
self.client_commit("dc", "change")
+ def test_sets_parent_urls(self):
+ convert_repository(self.repos_url, "e", TrunkBranchingScheme(),
+ all=False, create_shared_repo=True)
+ self.assertEquals(self.repos_url+"/trunk",
+ Branch.open("e/trunk").get_parent())
+ self.assertEquals(self.repos_url+"/branches/abranch",
+ Branch.open("e/branches/abranch").get_parent())
+
def test_fetch_alive(self):
self.build_tree({'dc/branches/somebranch/somefile': 'data'})
self.client_add("dc/branches/somebranch")
More information about the bazaar-commits
mailing list