Rev 5087: Minor commit tidyup in preparation for hooking around revprops. in http://bazaar.launchpad.net/~lifeless/bzr/trunk

Robert Collins robertc at robertcollins.net
Fri Mar 12 07:05:48 GMT 2010


At http://bazaar.launchpad.net/~lifeless/bzr/trunk

------------------------------------------------------------
revno: 5087
revision-id: robertc at robertcollins.net-20100312070440-p5udg6m6a1nm073q
parent: pqm at pqm.ubuntu.com-20100311232034-x3miloj34rko1mqs
committer: Robert Collins <robertc at robertcollins.net>
branch nick: trunk
timestamp: Fri 2010-03-12 18:04:40 +1100
message:
  Minor commit tidyup in preparation for hooking around revprops.
=== modified file 'bzrlib/builtins.py'
--- a/bzrlib/builtins.py	2010-03-08 02:23:17 +0000
+++ b/bzrlib/builtins.py	2010-03-12 07:04:40 +0000
@@ -3134,9 +3134,11 @@
                 my_message = my_message.replace('\r\n', '\n')
                 my_message = my_message.replace('\r', '\n')
             if my_message is None and not file:
+                # t is the status of the tree
                 t = make_commit_message_template_encoded(tree,
                         selected_list, diff=show_diff,
                         output_encoding=osutils.get_user_encoding())
+                # start_message is the template generated from hooks
                 start_message = generate_commit_message_template(commit_obj)
                 my_message = edit_commit_message_encoded(t,
                     start_message=start_message)

=== modified file 'bzrlib/commit.py'
--- a/bzrlib/commit.py	2010-02-17 17:11:16 +0000
+++ b/bzrlib/commit.py	2010-03-12 07:04:40 +0000
@@ -236,6 +236,7 @@
             commit.
         """
         operation = OperationWithCleanups(self._commit)
+        self.revprops = revprops or {}
         return operation.run(
                message=message,
                timestamp=timestamp,
@@ -246,7 +247,6 @@
                allow_pointless=allow_pointless,
                strict=strict,
                verbose=verbose,
-               revprops=revprops,
                working_tree=working_tree,
                local=local,
                reporter=reporter,
@@ -257,7 +257,7 @@
                possible_master_transports=possible_master_transports)
 
     def _commit(self, operation, message, timestamp, timezone, committer,
-            specific_files, rev_id, allow_pointless, strict, verbose, revprops,
+            specific_files, rev_id, allow_pointless, strict, verbose,
             working_tree, local, reporter, config, message_callback, recursive,
             exclude, possible_master_transports):
         mutter('preparing to commit')
@@ -299,7 +299,6 @@
             self.specific_files = None
             
         self.allow_pointless = allow_pointless
-        self.revprops = revprops
         self.message_callback = message_callback
         self.timestamp = timestamp
         self.timezone = timezone
@@ -371,7 +370,7 @@
         # Collect the changes
         self._set_progress_stage("Collecting changes", counter=True)
         self.builder = self.branch.get_commit_builder(self.parents,
-            self.config, timestamp, timezone, committer, revprops, rev_id)
+            self.config, timestamp, timezone, committer, self.revprops, rev_id)
 
         try:
             self.builder.will_record_deletes()




More information about the bazaar-commits mailing list