/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/mutabletree.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:
21
21
 
22
22
from __future__ import absolute_import
23
23
 
24
 
from bzrlib.lazy_import import lazy_import
 
24
from breezy.lazy_import import lazy_import
25
25
lazy_import(globals(), """
26
26
import operator
27
27
import os
28
28
import re
29
29
 
30
 
from bzrlib import (
 
30
from breezy import (
31
31
    add,
32
32
    controldir,
33
33
    errors,
41
41
    )
42
42
""")
43
43
 
44
 
from bzrlib.decorators import needs_read_lock, needs_write_lock
 
44
from breezy.decorators import needs_read_lock, needs_write_lock
45
45
 
46
46
 
47
47
def needs_tree_write_lock(unbound):
64
64
    context, and will revert if the lock is broken abnormally - but this cannot
65
65
    be guaranteed - depending on the exact implementation of the mutable state.
66
66
 
67
 
    The most common form of Mutable Tree is WorkingTree, see bzrlib.workingtree.
 
67
    The most common form of Mutable Tree is WorkingTree, see breezy.workingtree.
68
68
    For tests we also have MemoryTree which is a MutableTree whose contents are
69
69
    entirely in memory.
70
70
 
192
192
    def commit(self, message=None, revprops=None, *args,
193
193
               **kwargs):
194
194
        # avoid circular imports
195
 
        from bzrlib import commit
 
195
        from breezy import commit
196
196
        possible_master_transports=[]
197
197
        revprops = commit.Commit.update_revprops(
198
198
                revprops,
509
509
        """Create the default hooks.
510
510
 
511
511
        """
512
 
        hooks.Hooks.__init__(self, "bzrlib.mutabletree", "MutableTree.hooks")
 
512
        hooks.Hooks.__init__(self, "breezy.mutabletree", "MutableTree.hooks")
513
513
        self.add_hook('start_commit',
514
514
            "Called before a commit is performed on a tree. The start commit "
515
515
            "hook is able to change the tree before the commit takes place. "
516
 
            "start_commit is called with the bzrlib.mutabletree.MutableTree "
 
516
            "start_commit is called with the breezy.mutabletree.MutableTree "
517
517
            "that the commit is being performed on.", (1, 4))
518
518
        self.add_hook('post_commit',
519
519
            "Called after a commit is performed on a tree. The hook is "
520
 
            "called with a bzrlib.mutabletree.PostCommitHookParams object. "
 
520
            "called with a breezy.mutabletree.PostCommitHookParams object. "
521
521
            "The mutable tree the commit was performed on is available via "
522
522
            "the mutable_tree attribute of that object.", (2, 0))
523
523
        self.add_hook('pre_transform',
657
657
            self.conflicts_related = conflicts_related
658
658
 
659
659
    def add(self, file_list, recurse=True):
660
 
        from bzrlib.inventory import InventoryEntry
 
660
        from breezy.inventory import InventoryEntry
661
661
        if not file_list:
662
662
            # no paths supplied: add the entire tree.
663
663
            # FIXME: this assumes we are running in a working tree subdir :-/