Rev 594: Add function for getting set-revprops config variable. in file:///data/jelmer/bzr-svn/revprops/
Jelmer Vernooij
jelmer at samba.org
Thu Dec 6 18:08:44 GMT 2007
At file:///data/jelmer/bzr-svn/revprops/
------------------------------------------------------------
revno: 594
revision-id:jelmer at samba.org-20071206180844-s2q1n8b1vz36v336
parent: jelmer at samba.org-20071206175320-jee45l5n5au7vrif
committer: Jelmer Vernooij <jelmer at samba.org>
branch nick: revprops
timestamp: Thu 2007-12-06 19:08:44 +0100
message:
Add function for getting set-revprops config variable.
modified:
BRANCH.TODO branch.todo-20070721175243-w23kkak0gm2jbr8b-1
config.py config.py-20070624185721-0j8f1ly75uo4s1lk-1
tests/test_config.py test_config.py-20070624193244-itvnst60evjidr4z-1
=== modified file 'BRANCH.TODO'
--- a/BRANCH.TODO 2007-11-12 02:01:05 +0000
+++ b/BRANCH.TODO 2007-12-06 18:08:44 +0000
@@ -14,3 +14,6 @@
bzr-svn should not be looking at any file properties set on the branch root if any
of these revision properties is set.
+
+An additional option "set-revprops" in ~/.subversion.conf will be provided.
+It defaults to True if the repository supports setting revision properties.
=== modified file 'config.py'
--- a/config.py 2007-10-30 22:08:13 +0000
+++ b/config.py 2007-12-06 18:08:44 +0000
@@ -66,6 +66,14 @@
return BranchingScheme.find_scheme(schemename)
return None
+ def get_set_revprops(self):
+ """Check whether or not bzr-svn should attempt to store Bazaar
+ revision properties in Subversion revision properties during commit."""
+ try:
+ return self._get_parser().get_bool(self.uuid, "set-revprops")
+ except KeyError:
+ return None
+
def get_override_svn_revprops(self):
"""Check whether or not bzr-svn should attempt to override Subversion revision
properties after committing."""
=== modified file 'tests/test_config.py'
--- a/tests/test_config.py 2007-10-30 20:03:43 +0000
+++ b/tests/test_config.py 2007-12-06 18:08:44 +0000
@@ -56,3 +56,11 @@
self.assertEquals(True, c.get_override_svn_revprops())
c.set_user_option("override-svn-revprops", "False")
self.assertEquals(False, c.get_override_svn_revprops())
+
+ def test_set_revprops(self):
+ c = SvnRepositoryConfig("blabla2")
+ self.assertEquals(None, c.get_set_revprops())
+ c.set_user_option("set-revprops", "True")
+ self.assertEquals(True, c.get_set_revprops())
+ c.set_user_option("set-revprops", "False")
+ self.assertEquals(False, c.get_set_revprops())
More information about the bazaar-commits
mailing list