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

  • Committer: Breezy landing bot
  • Author(s): Jelmer Vernooij
  • Date: 2020-07-28 02:47:10 UTC
  • mfrom: (7519.1.1 merge-3.1)
  • Revision ID: breezy.the.bot@gmail.com-20200728024710-a2ylds219f1lsl62
Merge lp:brz/3.1.

Merged from https://code.launchpad.net/~jelmer/brz/merge-3.1/+merge/388173

Show diffs side-by-side

added added

removed removed

Lines of Context:
16
16
 
17
17
"""Debug commands for the bzr formats."""
18
18
 
19
 
from __future__ import absolute_import
20
 
 
21
19
from io import BytesIO
22
20
 
23
21
from .. import (
32
30
    display_command,
33
31
    )
34
32
from ..option import Option
35
 
from ..sixish import PY3
36
33
from . import (
37
34
    btree_index,
38
35
    )
118
115
                refs_as_tuples = None
119
116
            else:
120
117
                refs_as_tuples = static_tuple.as_tuples(refs)
121
 
            if PY3:
122
 
                if refs_as_tuples is not None:
123
 
                    refs_as_tuples = tuple(
124
 
                        tuple(tuple(r.decode('utf-8')
125
 
                                    for r in t1) for t1 in t2)
126
 
                        for t2 in refs_as_tuples)
127
 
                as_tuple = (
128
 
                    tuple([r.decode('utf-8') for r in node[1]]),
129
 
                    node[2].decode('utf-8'),
130
 
                    refs_as_tuples)
131
 
            else:
132
 
                as_tuple = (tuple(node[1]), node[2], refs_as_tuples)
 
118
            if refs_as_tuples is not None:
 
119
                refs_as_tuples = tuple(
 
120
                    tuple(tuple(r.decode('utf-8')
 
121
                                for r in t1) for t1 in t2)
 
122
                    for t2 in refs_as_tuples)
 
123
            as_tuple = (
 
124
                tuple([r.decode('utf-8') for r in node[1]]),
 
125
                node[2].decode('utf-8'),
 
126
                refs_as_tuples)
133
127
            self.outf.write('%s\n' % (as_tuple,))
134
128
 
135
129