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

  • Committer: Breezy landing bot
  • Author(s): Jelmer Vernooij
  • Date: 2020-06-11 12:46:45 UTC
  • mfrom: (7511.1.1 actions-no-fork)
  • Revision ID: breezy.the.bot@gmail.com-20200611124645-4lx66gps99i0hmzh
Avoid using fork when running the testsuite in github actions.

Merged from https://code.launchpad.net/~jelmer/brz/actions-no-fork/+merge/385565

Show diffs side-by-side

added added

removed removed

Lines of Context:
39
39
    RepositoryAcquisitionPolicy,
40
40
    )
41
41
 
42
 
from .mapping import (
43
 
    decode_git_path,
44
 
    encode_git_path,
45
 
    )
46
42
from .push import (
47
43
    GitPushResult,
48
44
    )
217
213
                        target, basis.get_reference_revision(path),
218
214
                        force_new_repo=force_new_repo, recurse=recurse,
219
215
                        stacked=stacked)
220
 
        if getattr(result_repo, '_git', None):
221
 
            # Don't leak resources:
222
 
            # TODO(jelmer): This shouldn't be git-specific, and possibly
223
 
            # just use read locks.
224
 
            result_repo._git.object_store.close()
225
216
        return result
226
217
 
227
218
    def clone_on_transport(self, transport, revision_id=None,
546
537
                    target_branch._format, self._format)
547
538
            # TODO(jelmer): Do some consistency checking across branches..
548
539
            self.control_transport.put_bytes(
549
 
                'commondir', encode_git_path(target_path))
 
540
                'commondir', target_path.encode('utf-8'))
550
541
            # TODO(jelmer): Urgh, avoid mucking about with internals.
551
542
            self._git._commontransport = (
552
543
                target_branch.repository._git._commontransport.clone())
586
577
                base_url = self.user_url.rstrip('/')
587
578
            else:
588
579
                base_url = urlutils.local_path_to_url(
589
 
                    decode_git_path(commondir)).rstrip('/.git/') + '/'
 
580
                    commondir.decode(osutils._fs_enc)).rstrip('/.git/') + '/'
590
581
            return urlutils.join_segment_parameters(base_url, params)
591
582
        return None
592
583