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

Support user.signingkey configuration variable in .git/config.

Merged from https://code.launchpad.net/~jelmer/brz/local-git-key/+merge/381000

Show diffs side-by-side

added added

removed removed

Lines of Context:
14
14
# along with this program; if not, write to the Free Software
15
15
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
16
16
 
 
17
from __future__ import absolute_import
 
18
 
17
19
 
18
20
from .lazy_import import lazy_import
19
21
lazy_import(globals(), """
35
37
    registry,
36
38
    trace,
37
39
    )
 
40
from .sixish import (
 
41
    text_type,
 
42
    )
38
43
 
39
44
 
40
45
class RevisionInfo(object):
155
160
        """
156
161
        if spec is None:
157
162
            return RevisionSpec(None, _internal=True)
158
 
        if not isinstance(spec, str):
 
163
        if not isinstance(spec, (str, text_type)):
159
164
            raise TypeError("revision spec needs to be text")
160
165
        match = revspec_registry.get_prefix(spec)
161
166
        if match is not None:
466
471
        # self.spec comes straight from parsing the command line arguments,
467
472
        # so we expect it to be a Unicode string. Switch it to the internal
468
473
        # representation.
469
 
        if isinstance(self.spec, str):
 
474
        if isinstance(self.spec, text_type):
470
475
            return cache_utf8.encode(self.spec)
471
476
        return self.spec
472
477