/brz/remove-bazaar

To get this branch, use:
bzr branch http://gegoxaren.bato24.eu/bzr/brz/remove-bazaar

« back to all changes in this revision

Viewing changes to bzrlib/branchbuilder.py

  • Committer: John Arbash Meinel
  • Date: 2010-01-06 17:46:15 UTC
  • mto: (4634.119.1 2.0)
  • mto: This revision was merged to the branch mainline in revision 4951.
  • Revision ID: john@arbash-meinel.com-20100106174615-cq1nckxhbuyemgjx
Fix bug #503886, errors setting up logging go to stderr.

The basic issue is that we were using logging to describe failures
to set up logging. However, those fail with bad error messages
rather than giving us the output we want. This was especially bad
when the failure was occuring on the server. Since 'ssh' will pass
back the stderr stream without bzr handling it at all.

Show diffs side-by-side

added added

removed removed

Lines of Context:
103
103
        finally:
104
104
            tree.unlock()
105
105
 
106
 
    def _do_commit(self, tree, message=None, message_callback=None, **kwargs):
 
106
    def _do_commit(self, tree, message=None, **kwargs):
107
107
        reporter = commit.NullCommitReporter()
108
 
        if message is None and message_callback is None:
 
108
        if message is None:
109
109
            message = u'commit %d' % (self._branch.revno() + 1,)
110
 
        return tree.commit(message, message_callback=message_callback,
 
110
        return tree.commit(message,
111
111
            reporter=reporter,
112
112
            **kwargs)
113
113
 
162
162
 
163
163
    def build_snapshot(self, revision_id, parent_ids, actions,
164
164
        message=None, timestamp=None, allow_leftmost_as_ghost=False,
165
 
        committer=None, timezone=None, message_callback=None):
 
165
        committer=None, timezone=None):
166
166
        """Build a commit, shaped in a specific way.
167
167
 
168
168
        :param revision_id: The handle for the new commit, can be None
175
175
            ('rename', ('orig-path', 'new-path'))
176
176
        :param message: An optional commit message, if not supplied, a default
177
177
            commit message will be written.
178
 
        :param message_callback: A message callback to use for the commit, as
179
 
            per mutabletree.commit.
180
178
        :param timestamp: If non-None, set the timestamp of the commit to this
181
179
            value.
182
180
        :param timezone: An optional timezone for timestamp.
246
244
            for file_id, content in new_contents.iteritems():
247
245
                tree.put_file_bytes_non_atomic(file_id, content)
248
246
            return self._do_commit(tree, message=message, rev_id=revision_id,
249
 
                timestamp=timestamp, timezone=timezone, committer=committer,
250
 
                message_callback=message_callback)
 
247
                timestamp=timestamp, timezone=timezone, committer=committer)
251
248
        finally:
252
249
            tree.unlock()
253
250