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

  • Committer: Breezy landing bot
  • Author(s): Jelmer Vernooij
  • Date: 2018-04-01 17:57:39 UTC
  • mfrom: (6929.3.3 skip-root-simpler)
  • Revision ID: breezy.the.bot@gmail.com-20180401175739-36i4k9x17dx3wsu7
Some miscellaneous changes (check for actual root, add Tree.versionable_kind).

Merged from https://code.launchpad.net/~jelmer/brz/skip-root-simpler/+merge/342451

Show diffs side-by-side

added added

removed removed

Lines of Context:
34
34
    rules,
35
35
    trace,
36
36
    )
37
 
from breezy.bzr import (
38
 
    inventory,
39
 
    )
40
37
from breezy.i18n import gettext
41
38
""")
42
39
 
653
650
        searcher = default_searcher
654
651
        return searcher
655
652
 
 
653
    @classmethod
 
654
    def versionable_kind(cls, kind):
 
655
        """Check if this tree support versioning a specific file kind."""
 
656
        return (kind in ('file', 'directory', 'symlink', 'tree-reference'))
 
657
 
656
658
 
657
659
class InterTree(InterObject):
658
660
    """This class represents operations taking place between two Trees.
859
861
        # the unversioned path lookup only occurs on real trees - where there
860
862
        # can be extras. So the fake_entry is solely used to look up
861
863
        # executable it values when execute is not supported.
862
 
        fake_entry = inventory.InventoryFile('unused', 'unused', 'unused')
 
864
        fake_entry = TreeFile()
863
865
        for target_path, target_entry in to_entries_by_dir:
864
866
            while (all_unversioned and
865
867
                all_unversioned[0][0] < target_path.split('/')):