~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/workingtree.py

Merge trunk

Show diffs side-by-side

added added

removed removed

Lines of Context:
389
389
            if osutils.lexists(self.abspath(path)):
390
390
                yield ie.file_id
391
391
 
 
392
    def all_file_ids(self):
 
393
        """See Tree.iter_all_file_ids"""
 
394
        return set(self.inventory)
 
395
 
392
396
    def __repr__(self):
393
397
        return "<%s of %s>" % (self.__class__.__name__,
394
398
                               getattr(self, 'basedir', None))
504
508
        basis = self.basis_tree()
505
509
        basis.lock_read()
506
510
        try:
507
 
            changes = self._iter_changes(basis, True, [self.id2path(file_id)],
 
511
            changes = self.iter_changes(basis, True, [self.id2path(file_id)],
508
512
                require_versioned=True).next()
509
513
            changed_content, kind = changes[2], changes[6]
510
514
            if not changed_content:
1698
1702
    def kind(self, file_id):
1699
1703
        return file_kind(self.id2abspath(file_id))
1700
1704
 
 
1705
    def stored_kind(self, file_id):
 
1706
        """See Tree.stored_kind"""
 
1707
        return self.inventory[file_id].kind
 
1708
 
1701
1709
    def _comparison_data(self, entry, path):
1702
1710
        abspath = self.abspath(path)
1703
1711
        try:
1927
1935
            has_changed_files = len(unknown_nested_files) > 0
1928
1936
            if not has_changed_files:
1929
1937
                for (file_id, path, content_change, versioned, parent_id, name,
1930
 
                     kind, executable) in self._iter_changes(self.basis_tree(),
 
1938
                     kind, executable) in self.iter_changes(self.basis_tree(),
1931
1939
                         include_unchanged=True, require_versioned=False,
1932
1940
                         want_unversioned=True, specific_files=files):
1933
1941
                    if versioned == (False, False):
2690
2698
        except errors.NoSuchFile:
2691
2699
            raise errors.NoWorkingTree(base=transport.base)
2692
2700
        except KeyError:
2693
 
            raise errors.UnknownFormatError(format=format_string)
 
2701
            raise errors.UnknownFormatError(format=format_string,
 
2702
                                            kind="working tree")
2694
2703
 
2695
2704
    def __eq__(self, other):
2696
2705
        return self.__class__ is other.__class__
2763
2772
        
2764
2773
 
2765
2774
    def initialize(self, a_bzrdir, revision_id=None, from_branch=None,
2766
 
                   accelerator_tree=None):
 
2775
                   accelerator_tree=None, hardlink=False):
2767
2776
        """See WorkingTreeFormat.initialize()."""
2768
2777
        if not isinstance(a_bzrdir.transport, LocalTransport):
2769
2778
            raise errors.NotLocalUrl(a_bzrdir.transport.base)
2856
2865
                             self._lock_class)
2857
2866
 
2858
2867
    def initialize(self, a_bzrdir, revision_id=None, from_branch=None,
2859
 
                   accelerator_tree=None):
 
2868
                   accelerator_tree=None, hardlink=False):
2860
2869
        """See WorkingTreeFormat.initialize().
2861
2870
        
2862
2871
        :param revision_id: if supplied, create a working tree at a different
2865
2874
            contents more quickly than the revision tree, i.e. a workingtree.
2866
2875
            The revision tree will be used for cases where accelerator_tree's
2867
2876
            content is different.
 
2877
        :param hardlink: If true, hard-link files from accelerator_tree,
 
2878
            where possible.
2868
2879
        """
2869
2880
        if not isinstance(a_bzrdir.transport, LocalTransport):
2870
2881
            raise errors.NotLocalUrl(a_bzrdir.transport.base)