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

  • Committer: Gustav Hartvigsson
  • Date: 2021-01-09 21:36:27 UTC
  • Revision ID: gustav.hartvigsson@gmail.com-20210109213627-h1xwcutzy9m7a99b
Added 'Case Preserving Working Tree Use Cases' from Canonical Wiki

* Addod a page from the Canonical Bazaar wiki
  with information on the scmeatics of case
  perserving filesystems an a case insensitive
  filesystem works.
  
  * Needs re-work, but this will do as it is the
    same inforamoton as what was on the linked
    page in the currint documentation.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
#!/usr/bin/env python
 
1
#!/usr/bin/env python3
2
2
# vim: expandtab
3
3
 
4
4
# Copyright (C) 2011-2018 Jelmer Vernooij <jelmer@jelmer.uk>
20
20
 
21
21
"""Remote helper for git for accessing bzr repositories."""
22
22
 
23
 
from __future__ import absolute_import
24
 
 
25
23
CAPABILITIES = ["fetch", "option", "push"]
26
24
 
27
25
import os
29
27
from ..controldir import ControlDir
30
28
from ..errors import NotBranchError, NoRepositoryPresent
31
29
from ..repository import InterRepository
32
 
from ..sixish import viewitems
33
30
from ..transport import get_transport_from_path
34
31
 
35
32
from . import (
59
56
    pass
60
57
else:
61
58
    CAPABILITIES.append("import")
 
59
    CAPABILITIES.append("refspec *:*")
62
60
 
63
61
 
64
62
def open_remote_dir(url):
120
118
        object_store = get_object_store(repo)
121
119
        with object_store.lock_read():
122
120
            refs = get_refs_container(self.remote_dir, object_store)
123
 
            for ref, git_sha1 in viewitems(refs.as_dict()):
 
121
            for ref, git_sha1 in refs.as_dict().items():
124
122
                ref = ref.replace(b"~", b"_")
125
123
                outf.write(b"%s %s\n" % (git_sha1, ref))
126
124
            outf.write(b"\n")
186
184
            self.batchcmd = None
187
185
        else:
188
186
            try:
189
 
                self.commands[argv[0]](self, outf, argv)
 
187
                self.commands[argv[0].decode()](self, outf, argv)
190
188
            except KeyError:
191
189
                raise Exception("Unknown remote command %r" % argv)
192
190
        outf.flush()