Rev 595: add two more configuration options. in file:///data/jelmer/bzr-svn/revprops/

Jelmer Vernooij jelmer at samba.org
Thu Dec 6 18:36:21 GMT 2007


At file:///data/jelmer/bzr-svn/revprops/

------------------------------------------------------------
revno: 595
revision-id:jelmer at samba.org-20071206183620-il1o1alijnh1iwpx
parent: jelmer at samba.org-20071206180844-s2q1n8b1vz36v336
committer: Jelmer Vernooij <jelmer at samba.org>
branch nick: revprops
timestamp: Thu 2007-12-06 19:36:20 +0100
message:
  add two more configuration options.
modified:
  config.py                      config.py-20070624185721-0j8f1ly75uo4s1lk-1
  tests/test_config.py           test_config.py-20070624193244-itvnst60evjidr4z-1
=== modified file 'config.py'
--- a/config.py	2007-12-06 18:08:44 +0000
+++ b/config.py	2007-12-06 18:36:20 +0000
@@ -74,6 +74,22 @@
         except KeyError:
             return None
 
+    def get_supports_change_revprop(self):
+        """Check whether or not the repository supports changing existing 
+        revision properties."""
+        try:
+            return self._get_parser().get_bool(self.uuid, "supports-change-revprop")
+        except KeyError:
+            return None
+
+    def get_supports_commit_revprop(self):
+        """Check whether or not the repository supports setting custom
+        revision properties during commit."""
+        try:
+            return self._get_parser().get_bool(self.uuid, "supports-commit-revprop")
+        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-12-06 18:08:44 +0000
+++ b/tests/test_config.py	2007-12-06 18:36:20 +0000
@@ -64,3 +64,19 @@
         self.assertEquals(True, c.get_set_revprops())
         c.set_user_option("set-revprops", "False")
         self.assertEquals(False, c.get_set_revprops())
+
+    def test_supports_change_revprop(self):
+        c = SvnRepositoryConfig("blabla2")
+        self.assertEquals(None, c.get_supports_change_revprop())
+        c.set_user_option("supports-change-revprop", "True")
+        self.assertEquals(True, c.get_supports_change_revprop())
+        c.set_user_option("supports-change-revprop", "False")
+        self.assertEquals(False, c.get_supports_change_revprop())
+
+    def test_supports_commit_revprop(self):
+        c = SvnRepositoryConfig("blabla2")
+        self.assertEquals(None, c.get_supports_commit_revprop())
+        c.set_user_option("supports-commit-revprop", "True")
+        self.assertEquals(True, c.get_supports_commit_revprop())
+        c.set_user_option("supports-commit-revprop", "False")
+        self.assertEquals(False, c.get_supports_commit_revprop())




More information about the bazaar-commits mailing list