/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/transport/memory.py

  • Committer: Jelmer Vernooij
  • Date: 2019-03-04 05:10:44 UTC
  • mfrom: (7293 work)
  • mto: This revision was merged to the branch mainline in revision 7294.
  • Revision ID: jelmer@jelmer.uk-20190304051044-vph4s8p9qvpy2qe9
Merge trunk.

Show diffs side-by-side

added added

removed removed

Lines of Context:
122
122
    def _check_parent(self, _abspath):
123
123
        dir = os.path.dirname(_abspath)
124
124
        if dir != '/':
125
 
            if not dir in self._dirs:
 
125
            if dir not in self._dirs:
126
126
                raise NoSuchFile(_abspath)
127
127
 
128
128
    def has(self, relpath):
135
135
    def delete(self, relpath):
136
136
        """See Transport.delete()."""
137
137
        _abspath = self._abspath(relpath)
138
 
        if not _abspath in self._files:
 
138
        if _abspath not in self._files:
139
139
            raise NoSuchFile(relpath)
140
140
        del self._files[_abspath]
141
141
 
148
148
    def get(self, relpath):
149
149
        """See Transport.get()."""
150
150
        _abspath = self._abspath(relpath)
151
 
        if not _abspath in self._files:
 
151
        if _abspath not in self._files:
152
152
            if _abspath in self._dirs:
153
153
                return LateReadError(relpath)
154
154
            else:
255
255
            if path.startswith(_abspath + '/') and path != _abspath:
256
256
                self._translate_error(
257
257
                    IOError(errno.ENOTEMPTY, relpath), relpath)
258
 
        if not _abspath in self._dirs:
 
258
        if _abspath not in self._dirs:
259
259
            raise NoSuchFile(relpath)
260
260
        del self._dirs[_abspath]
261
261