/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/bzr/branch.py

  • Committer: Jelmer Vernooij
  • Date: 2020-03-22 01:35:14 UTC
  • mfrom: (7490.7.6 work)
  • mto: This revision was merged to the branch mainline in revision 7499.
  • Revision ID: jelmer@jelmer.uk-20200322013514-7vw1ntwho04rcuj3
merge lp:brz/3.1.

Show diffs side-by-side

added added

removed removed

Lines of Context:
15
15
# along with this program; if not, write to the Free Software
16
16
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
17
17
 
18
 
from __future__ import absolute_import
19
 
 
 
18
from io import BytesIO
20
19
import sys
21
20
 
22
21
from ..lazy_import import lazy_import
52
51
    only_raises,
53
52
    )
54
53
from ..lock import _RelockDebugMixin, LogicalLockResult
55
 
from ..sixish import (
56
 
    BytesIO,
57
 
    text_type,
58
 
    viewitems,
59
 
    )
60
54
from ..trace import (
61
55
    mutter,
62
56
    )
285
279
        if url is None:
286
280
            self._transport.delete('parent')
287
281
        else:
288
 
            if isinstance(url, text_type):
 
282
            if isinstance(url, str):
289
283
                url = url.encode('utf-8')
290
284
            self._transport.put_bytes('parent', url + b'\n',
291
285
                                      mode=self.controldir._get_file_mode())
554
548
        """
555
549
        s = BytesIO()
556
550
        writer = rio.RioWriter(s)
557
 
        for file_id, (branch_location, tree_path) in viewitems(info_dict):
 
551
        for file_id, (branch_location, tree_path) in info_dict.items():
558
552
            stanza = rio.Stanza(file_id=file_id,
559
553
                                branch_location=branch_location)
560
554
            if tree_path is not None:
655
649
        if stacked_url is None:
656
650
            raise errors.NotStacked(self)
657
651
        # TODO(jelmer): Clean this up for pad.lv/1696545
658
 
        if sys.version_info[0] == 2:
659
 
            return stacked_url.encode('utf-8')
660
 
        else:
661
 
            return stacked_url
 
652
        return stacked_url
662
653
 
663
654
    def get_rev_id(self, revno, history=None):
664
655
        """Find the revision id of the specified revno."""