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

  • Committer: Jelmer Vernooij
  • Date: 2018-03-02 01:59:40 UTC
  • mfrom: (0.200.1791 work)
  • mto: (0.200.1795 work)
  • mto: This revision was merged to the branch mainline in revision 6960.
  • Revision ID: jelmer@jelmer.uk-20180302015940-41gwnoymxc2go3bq
Merge trunk.

Show diffs side-by-side

added added

removed removed

Lines of Context:
172
172
            and (result_repo is None or result_repo.make_working_trees())):
173
173
            wt = result.create_workingtree(accelerator_tree=accelerator_tree,
174
174
                hardlink=hardlink, from_branch=result_branch)
175
 
            wt.lock_write()
176
 
            try:
 
175
            with wt.lock_write():
177
176
                if wt.path2id('') is None:
178
177
                    try:
179
178
                        wt.set_root_id(self.open_workingtree.get_root_id())
180
179
                    except bzr_errors.NoWorkingTree:
181
180
                        pass
182
 
            finally:
183
 
                wt.unlock()
184
181
        return result
185
182
 
186
183
    def clone_on_transport(self, transport, revision_id=None,
270
267
        return GitWorkingTreeFormat()
271
268
 
272
269
    def get_branch_format(self):
273
 
        from .branch import GitBranchFormat
274
 
        return GitBranchFormat()
 
270
        from .branch import LocalGitBranchFormat
 
271
        return LocalGitBranchFormat()
275
272
 
276
273
    def open(self, transport, _found=None):
277
274
        """Open this directory.
401
398
 
402
399
    def find_branch_format(self, name=None):
403
400
        from .branch import (
404
 
            GitBranchFormat,
405
401
            GitSymrefBranchFormat,
 
402
            LocalGitBranchFormat,
406
403
            )
407
404
        ref = self._get_selected_ref(name)
408
405
        if self._get_symref(ref) is not None:
409
406
            return GitSymrefBranchFormat()
410
407
        else:
411
 
            return GitBranchFormat()
 
408
            return LocalGitBranchFormat()
412
409
 
413
410
    def get_branch_transport(self, branch_format, name=None):
414
411
        if branch_format is None: