Rev 601: Fix tests. in file:///data/jelmer/bzr-svn/revprops/

Jelmer Vernooij jelmer at samba.org
Mon Dec 10 01:18:44 GMT 2007


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

------------------------------------------------------------
revno: 601
revision-id:jelmer at samba.org-20071210011844-c0t3vr9uqlnbrf78
parent: jelmer at samba.org-20071209233312-v06yc1jn6k5285gu
committer: Jelmer Vernooij <jelmer at samba.org>
branch nick: revprops
timestamp: Mon 2007-12-10 02:18:44 +0100
message:
  Fix tests.
modified:
  commit.py                      commit.py-20060607190346-qvq128wgfubhhgm2-1
  tests/test_commit.py           test_commit.py-20060624213521-l5kcufywkh9mnilk-1
=== modified file 'commit.py'
--- a/commit.py	2007-12-09 23:33:12 +0000
+++ b/commit.py	2007-12-10 01:18:44 +0000
@@ -108,11 +108,16 @@
             SVN_REVPROP_BZR_FILEIDS: "",
             SVN_REVPROP_BZR_TIMESTAMP: str(timestamp),
             SVN_REVPROP_BZR_TIMEZONE: str(timezone),
-            SVN_REVPROP_BZR_COMMITTER: committer
         }
 
-        for name, value in revprops.items():
-            self._svn_revprops[SVN_REVPROP_BZR_REVPROP_PREFIX+name] = value
+        if committer is not None:
+            self._svn_revprops[SVN_REVPROP_BZR_COMMITTER] = committer.encode("utf-8")
+        else:
+            self._svn_revprops[SVN_REVPROP_BZR_COMMITTER] = None
+
+        if revprops is not None:
+            for name, value in revprops.items():
+                self._svn_revprops[SVN_REVPROP_BZR_REVPROP_PREFIX+name] = value
 
         # Gather information about revision on top of which the commit is 
         # happening
@@ -559,7 +564,7 @@
         """
         file_id_entry = "%s\t%s\n" % (urllib.quote(path), ie.file_id)
         self._svnprops[SVN_PROP_BZR_FILEIDS] += file_id_entry
-        self._svn_revprops[SVN_REVPROP_BZR_FILEIDS]+= file_id_entry
+        self._svn_revprops[SVN_REVPROP_BZR_FILEIDS] += file_id_entry
 
     def record_entry_contents(self, ie, parent_invs, path, tree,
                               content_summary):

=== modified file 'tests/test_commit.py'
--- a/tests/test_commit.py	2007-12-06 20:52:02 +0000
+++ b/tests/test_commit.py	2007-12-10 01:18:44 +0000
@@ -32,6 +32,8 @@
 from remote import SvnRaTransport
 from tests import TestCaseWithSubversionRepository
 
+from svn.core import svn_time_to_cstring
+
 class TestNativeCommit(TestCaseWithSubversionRepository):
     def test_simple_commit(self):
         self.make_client('d', 'dc')




More information about the bazaar-commits mailing list