Rev 588: Start setting revision properties. in file:///data/jelmer/bzr-svn/revprops/

Jelmer Vernooij jelmer at samba.org
Mon Nov 5 15:08:33 GMT 2007


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

------------------------------------------------------------
revno: 588
revision-id:jelmer at samba.org-20071105150637-pt8acduwkdvg0a9m
parent: jelmer at samba.org-20071105141430-m9wescan75jbts0c
committer: Jelmer Vernooij <jelmer at samba.org>
branch nick: revprops
timestamp: Mon 2007-11-05 16:06:37 +0100
message:
  Start setting revision properties.
modified:
  AUTHORS                        AUTHORS-20060508114718-4c90c0062645106d
  commit.py                      commit.py-20060607190346-qvq128wgfubhhgm2-1
  repository.py                  repository.py-20060306123302-1f8c5069b3fe0265
=== modified file 'AUTHORS'
--- a/AUTHORS	2007-10-31 22:10:33 +0000
+++ b/AUTHORS	2007-11-05 15:06:37 +0000
@@ -6,5 +6,5 @@
 John Arbash Meinel, Stefan Metzmacher, Andrew Mitchell, Gustavo Niemeyer, 
 Martin Pool, Garrett Rooney, Johan Rydberg, Peter Samuelson, Mark Shuttleworth, 
 Adeodato Simó, Mikhail Sobolev and Reinhard Tartler for comments, code reviews, 
-funding, bug reports, testing, committing patches/bundles and generally keeping up 
-while I was asking annoying questions.
+funding, bug reports, testing, committing patches/bundles and generally keeping
+up while I was asking annoying questions.

=== modified file 'commit.py'
--- a/commit.py	2007-11-01 23:31:45 +0000
+++ b/commit.py	2007-11-05 15:06:37 +0000
@@ -34,7 +34,11 @@
                         SVN_PROP_SVK_MERGE, SVN_PROP_BZR_REVISION_INFO, 
                         SVN_PROP_BZR_REVISION_ID, revision_id_to_svk_feature,
                         generate_revision_metadata, SvnRepositoryFormat, 
-                        SvnRepository)
+                        SvnRepository,
+                        SVN_REVPROP_BZR_COMMITTER, SVN_REVPROP_BZR_FILEIDS,
+                        SVN_REVPROP_BZR_MERGE, SVN_REVPROP_BZR_REVISION_ID,
+                        SVN_REVPROP_BZR_REVPROP_PREFIX, SVN_REVPROP_BZR_ROOT,
+                        SVN_REVPROP_BZR_TIMESTAMP, SVN_REVPROP_BZR_TIMEZONE)
 import urllib
 
 
@@ -105,6 +109,16 @@
             timestamp, timezone, committer, revprops)
         self._svnprops[SVN_PROP_BZR_FILEIDS] = ""
 
+        self._svn_revprops = {
+            SVN_REVPROP_BZR_FILEIDS: "",
+            SVN_REVPROP_BZR_TIMESTAMP: timestamp,
+            SVN_REVPROP_BZR_TIMEZONE: timezone,
+            SVN_REVPROP_BZR_COMMITTER: committer
+        }
+
+        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
         if parents == []:
@@ -164,6 +178,7 @@
 
         self._svnprops[SVN_PROP_BZR_REVISION_ID+str(self.base_scheme)] = \
                 old + "%d %s\n" % (self.base_revno+1, revid)
+        self._svn_revprops[SVN_REVPROP_BZR_REVISION_ID] = revid
 
     def _record_merges(self, merges):
         """Store the extra merges (non-LHS parents) in a file property.
@@ -195,6 +210,8 @@
 
         if new != "":
             self._svnprops[SVN_PROP_SVK_MERGE] = old + new
+
+        self._svn_revprops[SVN_REVPROP_BZR_MERGE] = "".join(map(lambda x: x + "\n", merges))
         
     def _generate_revision_if_needed(self):
         """See CommitBuilder._generate_revision_if_needed()."""
@@ -448,6 +465,7 @@
             self.date = date
             self.author = author
         
+        self._svn_revprops[SVN_REVPROP_BZR_ROOT] = self.branch.get_branch_path()
         bp_parts = self.branch.get_branch_path().split("/")
         repository_latest_revnum = self.repository.transport.get_latest_revnum()
         lock = self.repository.transport.lock_write(".")
@@ -456,8 +474,8 @@
             existing_bp_parts = _check_dirs_exist(self.repository.transport, 
                                               bp_parts, -1)
             self.revnum = None
-            self.editor = self.repository.transport.get_commit_editor(
-                  {svn.core.SVN_PROP_REVISION_LOG: message.encode("utf-8")}, 
+            self._svn_revprops[svn.core.SVN_PROP_REVISION_LOG] = message.encode("utf-8")
+            self.editor = self.repository.transport.get_commit_editor(self._svn_revprops,
                   done, None, False)
 
             root = self.editor.open_root(self.base_revnum)

=== modified file 'repository.py'
--- a/repository.py	2007-11-05 13:52:14 +0000
+++ b/repository.py	2007-11-05 15:06:37 +0000
@@ -62,8 +62,9 @@
 SVN_REVPROP_BZR_REVISION_ID = 'bzr:revision-id'
 SVN_REVPROP_BZR_REVPROP_PREFIX = 'bzr:revprop:'
 SVN_REVPROP_BZR_ROOT = 'bzr:root'
-SVN_REVPROP_BZR_SCHEME = 'bzr:scheme'
 SVN_REVPROP_BZR_SIGNATURE = 'bzr:gpg-signature'
+SVN_REVPROP_BZR_TIMESTAMP = 'bzr:timestamp'
+SVN_REVPROP_BZR_TIMEZONE = 'bzr:timezone'
 
 # The following two functions don't use day names (which can vary by 
 # locale) unlike the alternatives in bzrlib.timestamp




More information about the bazaar-commits mailing list