Rev 351: Don't consider files when checking for branches. in http://people.samba.org/bzr/jelmer/bzr-svn/bzr.dev
Jelmer Vernooij
jelmer at samba.org
Mon Jan 1 16:08:14 GMT 2007
------------------------------------------------------------
revno: 351
revision-id: jelmer at samba.org-20070101160712-hwasoj85vlmrxqmu
parent: jelmer at samba.org-20070101154147-gihfok8g1dpayxcf
committer: Jelmer Vernooij <jelmer at samba.org>
branch nick: main
timestamp: Mon 2007-01-01 17:07:12 +0100
message:
Don't consider files when checking for branches.
modified:
NEWS news-20061231030336-h9fhq245ie0de8bs-1
TODO todo-20060729211917-2kpobww0zyvvo0j2-1
checkout.py workingtree.py-20060306120941-b083cb0fdd4a69de
convert.py svn2bzr.py-20051018015439-cb4563bff29e632d
fetch.py fetch.py-20060625004942-x2lfaib8ra707a8p-1
tests/test_convert.py test_convert.py-20060705203611-b1l0bapeku6foco0-1
=== modified file 'NEWS'
--- a/NEWS 2006-12-31 20:57:48 +0000
+++ b/NEWS 2007-01-01 16:07:12 +0000
@@ -30,6 +30,8 @@
* Don't consider SvnRepositories for writing for regular Bazaar
branches. (#77023)
+ * Don't try to import files as branches.
+
IMPROVEMENTS
* Implemented SvnRepository.all_revision_ids().
=== modified file 'TODO'
--- a/TODO 2007-01-01 15:41:47 +0000
+++ b/TODO 2007-01-01 16:07:12 +0000
@@ -1,3 +1,4 @@
+- shouldn't consider files for branches
- allow remote locations in svn-import
- fix "bzr status" in checkouts
- faster "bzr status" in checkouts
=== modified file 'checkout.py'
--- a/checkout.py 2007-01-01 06:17:51 +0000
+++ b/checkout.py 2007-01-01 16:07:12 +0000
@@ -462,11 +462,9 @@
return "Subversion Working Copy"
def initialize(self, a_bzrdir, revision_id=None):
- # FIXME
raise NotImplementedError(self.initialize)
def open(self, a_bzrdir):
- # FIXME
raise NotImplementedError(self.initialize)
=== modified file 'convert.py'
--- a/convert.py 2007-01-01 06:30:20 +0000
+++ b/convert.py 2007-01-01 16:07:12 +0000
@@ -39,6 +39,8 @@
from repository import SvnRepository
from transport import SvnRaTransport
+import svn.core
+
def load_dumpfile(dumpfile, outputdir):
import svn
from svn.core import SubversionException
@@ -96,6 +98,8 @@
try:
i = 0
for (branch, revnum, exists) in existing_branches:
+ if source_repos.transport.check_path("/"+branch, revnum) == svn.core.svn_node_file:
+ continue
pb.update("%s:%d" % (branch, revnum), i, len(existing_branches))
revid = source_repos.generate_revision_id(revnum, branch)
@@ -108,7 +112,8 @@
except NotBranchError:
source_branch = Branch.open("%s/%s" % (url, branch))
os.makedirs(target_dir)
- source_branch.bzrdir.sprout(target_dir)
+ source_branch.bzrdir.sprout(target_dir,
+ source_branch.last_revision())
i+=1
finally:
pb.finished()
=== modified file 'fetch.py'
--- a/fetch.py 2007-01-01 15:41:47 +0000
+++ b/fetch.py 2007-01-01 16:07:12 +0000
@@ -42,6 +42,7 @@
map(s.update, strings)
return s.hexdigest()
+
class RevisionBuildEditor(svn.delta.Editor):
def __init__(self, source, target, branch_path, prev_inventory, revid, svn_revprops, id_map):
self.branch_path = branch_path
@@ -405,5 +406,3 @@
mutter('test %r' % source)
return isinstance(source, SvnRepository)
-
-
=== modified file 'tests/test_convert.py'
--- a/tests/test_convert.py 2006-12-31 03:39:10 +0000
+++ b/tests/test_convert.py 2007-01-01 16:07:12 +0000
@@ -49,6 +49,16 @@
newrepos = Repository.open("e")
self.assertFalse(newrepos.has_revision("svn-v%d:2@%s-branches%%2fsomebranch" % (MAPPING_VERSION, oldrepos.uuid)))
+ def test_fetch_filebranch(self):
+ self.build_tree({'dc/branches/somebranch': 'data'})
+ self.client_add("dc/branches/somebranch")
+ self.client_commit("dc", "add a branch")
+ convert_repository(self.repos_url, "e", TrunkBranchingScheme())
+ oldrepos = Repository.open(self.repos_url)
+ newrepos = Repository.open("e")
+ self.assertFalse(newrepos.has_revision("svn-v%d:2@%s-branches%%2fsomebranch" % (MAPPING_VERSION, oldrepos.uuid)))
+
+
def test_fetch_dead(self):
self.build_tree({'dc/branches/somebranch/somefile': 'data'})
self.client_add("dc/branches/somebranch")
More information about the bazaar-commits
mailing list