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

  • Committer: Breezy landing bot
  • Author(s): Jelmer Vernooij
  • Date: 2020-02-14 03:16:54 UTC
  • mfrom: (7479.2.3 no-more-python2)
  • Revision ID: breezy.the.bot@gmail.com-20200214031654-bp1xtv2jr9nmhto3
Drop python2 support.

Merged from https://code.launchpad.net/~jelmer/brz/no-more-python2/+merge/378694

Show diffs side-by-side

added added

removed removed

Lines of Context:
50
50
    )
51
51
from ..revision import NULL_REVISION
52
52
from ..revisiontree import RevisionTree
53
 
from ..sixish import (
54
 
    text_type,
55
 
    viewitems,
56
 
    )
57
53
from ..transport import (
58
54
    Transport,
59
55
    register_urlparse_netloc_protocol,
123
119
import select
124
120
import tempfile
125
121
 
126
 
try:
127
 
    import urllib.parse as urlparse
128
 
    from urllib.parse import splituser
129
 
except ImportError:
130
 
    import urlparse
131
 
    from urllib import splituser
 
122
import urllib.parse as urlparse
 
123
from urllib.parse import splituser
132
124
 
133
125
# urlparse only supports a limited number of schemes by default
134
126
register_urlparse_netloc_protocol('git')
599
591
                        source, self.open_branch(name, nascent_ok=True))
600
592
            ret[actual_refname] = new_sha
601
593
            if fetch_tags:
602
 
                for tagname, revid in viewitems(source.tags.get_tag_dict()):
 
594
                for tagname, revid in source.tags.get_tag_dict().items():
603
595
                    if lossy:
604
596
                        try:
605
597
                            new_sha = source_store._lookup_revision_sha1(revid)
1007
999
            if peeled is None:
1008
1000
                # Let's just hope it's a commit
1009
1001
                peeled = unpeeled
1010
 
            if not isinstance(tag_name, text_type):
 
1002
            if not isinstance(tag_name, str):
1011
1003
                raise TypeError(tag_name)
1012
1004
            yield (ref_name, tag_name, peeled, unpeeled)
1013
1005