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

  • Committer: Jelmer Vernooij
  • Date: 2018-11-16 23:19:12 UTC
  • mfrom: (7180 work)
  • mto: This revision was merged to the branch mainline in revision 7294.
  • Revision ID: jelmer@jelmer.uk-20181116231912-e043vpq22bdkxa6q
Merge trunk.

Show diffs side-by-side

added added

removed removed

Lines of Context:
121
121
            bytes = self._file_transport.get_bytes(path)
122
122
            size = len(bytes)
123
123
            executable = self._inventory[id].executable
124
 
            sha1 = None # no stat cache
 
124
            sha1 = None  # no stat cache
125
125
            return (kind, size, executable, sha1)
126
126
        elif kind == 'directory':
127
127
            # memory tree does not support nested trees yet.
177
177
                self._lock_mode = "r"
178
178
                self._populate_from_branch()
179
179
            return lock.LogicalLockResult(self.unlock)
180
 
        except:
 
180
        except BaseException:
181
181
            self._locks -= 1
182
182
            raise
183
183
 
191
191
                self._populate_from_branch()
192
192
            elif self._lock_mode == "r":
193
193
                raise errors.ReadOnlyError(self)
194
 
        except:
 
194
        except BaseException:
195
195
            self._locks -= 1
196
196
            raise
197
197
        return lock.LogicalLockResult(self.unlock)
207
207
            elif self._lock_mode == "r":
208
208
                raise errors.ReadOnlyError(self)
209
209
            return lock.LogicalLockResult(self.unlock)
210
 
        except:
 
210
        except BaseException:
211
211
            self._locks -= 1
212
212
            raise
213
213
 
229
229
            if entry.kind == 'directory':
230
230
                self._file_transport.mkdir(path)
231
231
            elif entry.kind == 'file':
232
 
                self._file_transport.put_file(path,
233
 
                    self._basis_tree.get_file(path))
 
232
                self._file_transport.put_file(
 
233
                    path, self._basis_tree.get_file(path))
234
234
            else:
235
235
                raise NotImplementedError(self._populate_from_branch)
236
236
 
313
313
        if len(parents_list) == 0:
314
314
            self._parent_ids = []
315
315
            self._basis_tree = self.branch.repository.revision_tree(
316
 
                                   _mod_revision.NULL_REVISION)
 
316
                _mod_revision.NULL_REVISION)
317
317
        else:
318
318
            if parents_list[0][1] is None and not allow_leftmost_as_ghost:
319
319
                # a ghost in the left most parent
321
321
            self._parent_ids = [parent_id for parent_id, tree in parents_list]
322
322
            if parents_list[0][1] is None or parents_list[0][1] == b'null:':
323
323
                self._basis_tree = self.branch.repository.revision_tree(
324
 
                                       _mod_revision.NULL_REVISION)
 
324
                    _mod_revision.NULL_REVISION)
325
325
            else:
326
326
                self._basis_tree = parents_list[0][1]
327
327
            self._branch_revision_id = parents_list[0][0]