~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/workingtree.py

  • Committer: Robert Collins
  • Date: 2005-09-07 10:47:36 UTC
  • mto: (1092.3.1)
  • mto: This revision was merged to the branch mainline in revision 1397.
  • Revision ID: robertc@robertcollins.net-20050907104736-8e592b72108c577d
symlink support updated to work

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))
102
102
        if not inv.has_id(file_id):
103
103
            return False
104
104
        path = inv.id2path(file_id)
105
 
        return os.path.exists(self.abspath(path))
 
105
        return bzrlib.osutils.lexists(self.abspath(path))
106
106
 
107
107
 
108
108
    __contains__ = has_id
112
112
        # is this still called?
113
113
        raise NotImplementedError()
114
114
 
115
 
 
116
115
    def get_file_sha1(self, file_id):
117
116
        path = self._inventory.id2path(file_id)
118
117
        return self._hashcache.get_sha1(path)
119
118
 
 
119
    def get_symlink_target(self, file_id):
 
120
        return os.readlink(self.id2path(file_id))
120
121
 
121
122
    def file_class(self, filename):
122
123
        if self.path2id(filename):