/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/commit.py

  • Committer: Jelmer Vernooij
  • Date: 2017-05-21 19:09:26 UTC
  • mfrom: (6622.1.36 breezy)
  • Revision ID: jelmer@jelmer.uk-20170521190926-5vtz8xaf0e9ylrpc
Merge rename to breezy.

Show diffs side-by-side

added added

removed removed

Lines of Context:
50
50
# TODO: Change the parameter 'rev_id' to 'revision_id' to be consistent with
51
51
# the rest of the code; add a deprecation of the old name.
52
52
 
53
 
from bzrlib import (
 
53
from breezy import (
54
54
    debug,
55
55
    errors,
56
56
    trace,
57
57
    tree,
58
58
    ui,
59
59
    )
60
 
from bzrlib.branch import Branch
61
 
from bzrlib.cleanup import OperationWithCleanups
62
 
import bzrlib.config
63
 
from bzrlib.errors import (BzrError, PointlessCommit,
 
60
from breezy.branch import Branch
 
61
from breezy.cleanup import OperationWithCleanups
 
62
import breezy.config
 
63
from breezy.errors import (BzrError, PointlessCommit,
64
64
                           ConflictsInTree,
65
65
                           StrictCommitFailed
66
66
                           )
67
 
from bzrlib.osutils import (get_user_encoding,
 
67
from breezy.osutils import (get_user_encoding,
68
68
                            is_inside_any,
69
69
                            minimum_path_selection,
70
70
                            splitpath,
71
71
                            )
72
 
from bzrlib.trace import mutter, note, is_quiet
73
 
from bzrlib.inventory import Inventory, InventoryEntry, make_entry
74
 
from bzrlib import symbol_versioning
75
 
from bzrlib.urlutils import unescape_for_display
76
 
from bzrlib.i18n import gettext
 
72
from breezy.trace import mutter, note, is_quiet
 
73
from breezy.inventory import Inventory, InventoryEntry, make_entry
 
74
from breezy import symbol_versioning
 
75
from breezy.urlutils import unescape_for_display
 
76
from breezy.i18n import gettext
77
77
 
78
78
class NullCommitReporter(object):
79
79
    """I report on progress of a commit."""
583
583
            # this is so that we still consider the master branch
584
584
            # - in a checkout scenario the tree may have no
585
585
            # parents but the branch may do.
586
 
            first_tree_parent = bzrlib.revision.NULL_REVISION
 
586
            first_tree_parent = breezy.revision.NULL_REVISION
587
587
        old_revno, master_last = self.master_branch.last_revision_info()
588
588
        if master_last != first_tree_parent:
589
 
            if master_last != bzrlib.revision.NULL_REVISION:
 
589
            if master_last != breezy.revision.NULL_REVISION:
590
590
                raise errors.OutOfDateTree(self.work_tree)
591
591
        if self.branch.repository.has_revision(first_tree_parent):
592
592
            new_revno = old_revno + 1
613
613
            for hook in hooks:
614
614
                result = eval(hook + '(branch, rev_id)',
615
615
                              {'branch':self.branch,
616
 
                               'bzrlib':bzrlib,
 
616
                               'breezy':breezy,
617
617
                               'rev_id':self.rev_id})
618
618
        # process new style post commit hooks
619
619
        self._process_hooks("post_commit", old_revno, new_revno)
635
635
        if self.parents:
636
636
            old_revid = self.parents[0]
637
637
        else:
638
 
            old_revid = bzrlib.revision.NULL_REVISION
 
638
            old_revid = breezy.revision.NULL_REVISION
639
639
 
640
640
        if hook_name == "pre_commit":
641
641
            future_tree = self.builder.revision_tree()