Use commit revprops rather than just commit message when committing.
authorJelmer Vernooij <jelmer@samba.org>
Tue, 2 Oct 2007 01:05:30 +0000 (03:05 +0200)
committerJelmer Vernooij <jelmer@samba.org>
Tue, 2 Oct 2007 01:05:30 +0000 (03:05 +0200)
NEWS
commit.py
repository.py
transport.py

diff --git a/NEWS b/NEWS
index d6e1194e5dbb54603b6bfd2e27fba5aaf9f5f76d..2cccd7ee4f37655d94b8b2f47bc13decddab566d 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -16,6 +16,8 @@ bzr-svn 0.4.4 UNRELEASED
 
    * Implement ListBranchingScheme.is_branch_parent(). (#144357)
 
+   * Use revprop lists rather than just commit message when committing.
+
   BUG FIXES
 
    * Handle long file names with unicode characters correctly on python2.4 (#129334)
index 751f9822ed7786a4c4c1a69df388288876d57ece..ea8ace0d85392772f4021cd7ba62b89f8ada4e59 100644 (file)
--- a/commit.py
+++ b/commit.py
@@ -430,7 +430,8 @@ class SvnCommitBuilder(RootCommitBuilder):
                                               bp_parts, -1)
             self.revnum = None
             self.editor = self.repository.transport.get_commit_editor(
-                message.encode("utf-8"), done, None, False)
+                  {svn.core.SVN_PROP_REVISION_LOG: message.encode("utf-8")}, 
+                  done, None, False)
 
             root = self.editor.open_root(self.base_revnum)
 
index e34ee4c0f068fa368bcca71aff454ad84b3fe98b..106c190a8a13eaae836247cd9398beb605200bc4 100644 (file)
@@ -357,7 +357,7 @@ class SvnRepository(Repository):
         def done(revision, date, author):
             pass
         editor = self.transport.get_commit_editor(
-                "Updating branching scheme for Bazaar.",
+                {svn.core.SVN_PROP_REVISION_LOG: "Updating branching scheme for Bazaar."},
                 done, None, False)
         root = editor.open_root(-1)
         editor.change_dir_prop(root, SVN_PROP_BZR_BRANCHING_SCHEME, 
index 6a14a496209e5a29b09f50db20cb1422ccd47043..d044a17ddbb22e9c145281f299f2efc4a91a7121 100644 (file)
@@ -438,11 +438,21 @@ class SvnRaTransport(Transport):
         return self.Reporter(self, svn.ra.do_update(self._ra, revnum, "", 
                              *args, **kwargs))
 
+    def supports_custom_revprops(self):
+        return has_attr(svn.ra, 'get_commit_editor3')
+
     @convert_svn_error
-    def get_commit_editor(self, *args, **kwargs):
+    def get_commit_editor(self, revprops, done_cb, lock_token, keep_locks):
         self._open_real_transport()
         self._mark_busy()
-        return Editor(self, svn.ra.get_commit_editor(self._ra, *args, **kwargs))
+        if revprops.keys() == [svn.core.SVN_PROP_REVISION_LOG]:
+            editor = svn.ra.get_commit_editor(self._ra, 
+                        revprops[svn.core.SVN_PROP_REVISION_LOG],
+                        done_cb, lock_token, keep_locks)
+        else:
+            editor = svn.ra.get_commit_editor3(self._ra, revprops, done_cb, 
+                                              lock_token, keep_locks)
+        return Editor(self, editor)
 
     def listable(self):
         """See Transport.listable().