~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/workingtree.py

  • Committer: Robert Collins
  • Date: 2005-10-03 01:15:02 UTC
  • mfrom: (1092.2.28)
  • Revision ID: robertc@robertcollins.net-20051003011502-f579a509a136b774
mergeĀ fromĀ baz2bzr

Show diffs side-by-side

added added

removed removed

Lines of Context:
69
69
        """
70
70
        inv = self._inventory
71
71
        for path, ie in inv.iter_entries():
72
 
            if os.path.exists(self.abspath(path)):
 
72
            if bzrlib.osutils.lexists(self.abspath(path)):
73
73
                yield ie.file_id
74
74
 
75
75
 
83
83
        return os.path.join(self.basedir, filename)
84
84
 
85
85
    def has_filename(self, filename):
86
 
        return os.path.exists(self.abspath(filename))
 
86
        return bzrlib.osutils.lexists(self.abspath(filename))
87
87
 
88
88
    def get_file(self, file_id):
89
89
        return self.get_file_byname(self.id2path(file_id))
106
106
        if not inv.has_id(file_id):
107
107
            return False
108
108
        path = inv.id2path(file_id)
109
 
        return os.path.exists(self.abspath(path))
 
109
        return bzrlib.osutils.lexists(self.abspath(path))
110
110
 
111
111
 
112
112
    __contains__ = has_id
115
115
    def get_file_size(self, file_id):
116
116
        return os.path.getsize(self.id2abspath(file_id))
117
117
 
118
 
 
119
118
    def get_file_sha1(self, file_id):
120
119
        path = self._inventory.id2path(file_id)
121
120
        return self._hashcache.get_sha1(path)
122
121
 
 
122
    def get_symlink_target(self, file_id):
 
123
        return os.readlink(self.id2path(file_id))
123
124
 
124
125
    def file_class(self, filename):
125
126
        if self.path2id(filename):