Rev 2195: Fix tests. in http://people.samba.org/bzr/jelmer/bzr-svn/0.5
Jelmer Vernooij
jelmer at samba.org
Sun Dec 7 00:31:24 GMT 2008
At http://people.samba.org/bzr/jelmer/bzr-svn/0.5
------------------------------------------------------------
revno: 2195
revision-id: jelmer at samba.org-20081207003117-l3q7vvdo7d2dmmb2
parent: jelmer at samba.org-20081206040040-91xzhq4iqde81fe1
committer: Jelmer Vernooij <jelmer at samba.org>
branch nick: 0.5
timestamp: Sun 2008-12-07 01:31:17 +0100
message:
Fix tests.
modified:
commit.py commit.py-20060607190346-qvq128wgfubhhgm2-1
mapping.py mapping.py-20080128201303-6cp01phc0dmc0kiv-1
mapping4.py mapping4.py-20080827182338-y4xzpsf43vyiwcir-1
=== modified file 'commit.py'
--- a/commit.py 2008-12-05 04:33:30 +0000
+++ b/commit.py 2008-12-07 00:31:17 +0000
@@ -750,7 +750,8 @@
fileprops = dict(revmeta.get_fileprops().iteritems())
if set_metadata:
assert mapping.supports_hidden
- mapping.export_hidden(revprops, fileprops)
+ mapping.export_hidden_revprops(branch_path, revprops)
+ mapping.export_hidden_fileprops(fileprops)
parent = urlutils.dirname(branch_path)
bp_parts = branch_path.split("/")
@@ -767,8 +768,8 @@
root.delete_entry(urlutils.basename(branch_path))
branch_dir = root.add_directory(urlutils.basename(branch_path),
_url_escape_uri(urlutils.join(repository.base, revmeta.branch_path)), revmeta.revnum)
- for k, v in properties.diff(fileprops, revmeta.get_fileprops()).iteritems():
- branch_dir.change_prop(k, v)
+ for k, (ov, nv) in properties.diff(fileprops, revmeta.get_fileprops()).iteritems():
+ branch_dir.change_prop(k, nv)
branch_dir.close()
root.close()
except:
=== modified file 'mapping.py'
--- a/mapping.py 2008-12-05 20:59:16 +0000
+++ b/mapping.py 2008-12-07 00:31:17 +0000
@@ -468,8 +468,11 @@
def is_bzr_revision_hidden(self, revprops, changed_fileprops):
return False
- def export_hidden(self, revprops, fileprops):
- raise NotImplementedError(self.export_hidden)
+ def export_hidden_revprops(self, branch_root, revprops):
+ raise NotImplementedError(self.export_hidden_revprops)
+
+ def export_hidden_fileprops(self, fileprops):
+ raise NotImplementedError(self.export_hidden_fileprops)
def show_foreign_revid(self, (uuid, bp, revnum)):
return { "svn revno": "%d (on /%s)" % (revnum, bp)}
=== modified file 'mapping4.py'
--- a/mapping4.py 2008-12-05 14:18:09 +0000
+++ b/mapping4.py 2008-12-07 00:31:17 +0000
@@ -180,10 +180,11 @@
def get_hidden_lhs_ancestors_count(self, fileprops):
return int(fileprops.get(mapping.SVN_PROP_BZR_HIDDEN, "0"))
- def export_hidden(self, revprops, fileprops):
- if revprops is not None:
- revprops[mapping.SVN_REVPROP_BZR_HIDDEN] = ""
- return
+ def export_hidden_revprops(self, branch_root, revprops):
+ revprops[mapping.SVN_REVPROP_BZR_HIDDEN] = ""
+ revprops[mapping.SVN_REVPROP_BZR_ROOT] = branch_root
+
+ def export_hidden_fileprops(self, fileprops):
old_value = fileprops.get(mapping.SVN_PROP_BZR_HIDDEN, "0")
fileprops[mapping.SVN_PROP_BZR_HIDDEN] = str(int(old_value)+1)
More information about the bazaar-commits
mailing list