/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 breezy/msgeditor.py

  • Committer: Jelmer Vernooij
  • Date: 2017-05-21 18:10:28 UTC
  • mto: This revision was merged to the branch mainline in revision 6623.
  • Revision ID: jelmer@jelmer.uk-20170521181028-zn04pdfw0od9hfj3
Rename brzlib => breezy.

Show diffs side-by-side

added added

removed removed

Lines of Context:
23
23
from subprocess import call
24
24
import sys
25
25
 
26
 
from brzlib import (
 
26
from breezy import (
27
27
    cmdline,
28
28
    config,
29
29
    osutils,
31
31
    transport,
32
32
    ui,
33
33
    )
34
 
from brzlib.errors import BzrError, BadCommitMessageEncoding
35
 
from brzlib.hooks import Hooks
 
34
from breezy.errors import BzrError, BadCommitMessageEncoding
 
35
from breezy.hooks import Hooks
36
36
 
37
37
 
38
38
def _get_editor():
153
153
        if edited_content == reference_content:
154
154
            if not ui.ui_factory.confirm_action(
155
155
                u"Commit message was not edited, use anyway",
156
 
                "brzlib.msgeditor.unchanged",
 
156
                "breezy.msgeditor.unchanged",
157
157
                {}):
158
158
                # Returning "" makes cmd_commit raise 'empty commit message
159
159
                # specified' which is a reasonable error, given the user has
256
256
    # the revision to be committed, then pause and ask the user to
257
257
    # confirm/write a message.
258
258
    from StringIO import StringIO       # must be unicode-safe
259
 
    from brzlib.status import show_tree_status
 
259
    from breezy.status import show_tree_status
260
260
    status_tmp = StringIO()
261
261
    show_tree_status(working_tree, specific_files=specific_files,
262
262
                     to_file=status_tmp, verbose=True)
275
275
    # the revision to be committed, then pause and ask the user to
276
276
    # confirm/write a message.
277
277
    from StringIO import StringIO       # must be unicode-safe
278
 
    from brzlib.diff import show_diff_trees
 
278
    from breezy.diff import show_diff_trees
279
279
 
280
280
    template = make_commit_message_template(working_tree, specific_files)
281
281
    template = template.encode(output_encoding, "replace")
303
303
 
304
304
        These are all empty initially.
305
305
        """
306
 
        Hooks.__init__(self, "brzlib.msgeditor", "hooks")
 
306
        Hooks.__init__(self, "breezy.msgeditor", "hooks")
307
307
        self.add_hook('set_commit_message',
308
308
            "Set a fixed commit message. "
309
309
            "set_commit_message is called with the "
310
 
            "brzlib.commit.Commit object (so you can also change e.g. revision "
 
310
            "breezy.commit.Commit object (so you can also change e.g. revision "
311
311
            "properties by editing commit.builder._revprops) and the message "
312
312
            "so far. set_commit_message must return the message to use or None"
313
313
            " if it should use the message editor as normal.", (2, 4))
314
314
        self.add_hook('commit_message_template',
315
315
            "Called when a commit message is being generated. "
316
 
            "commit_message_template is called with the brzlib.commit.Commit "
 
316
            "commit_message_template is called with the breezy.commit.Commit "
317
317
            "object and the message that is known so far. "
318
318
            "commit_message_template must return a new message to use (which "
319
319
            "could be the same as it was given). When there are multiple "