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

  • Committer: Jelmer Vernooij
  • Date: 2019-03-05 07:32:38 UTC
  • mto: (7290.1.21 work)
  • mto: This revision was merged to the branch mainline in revision 7311.
  • Revision ID: jelmer@jelmer.uk-20190305073238-zlqn981opwnqsmzi
Add appveyor configuration.

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
# TODO: Some kind of command-line display of revision properties:
18
20
# perhaps show them in log -v and allow them as options to the commit command.
19
21
 
26
28
    errors,
27
29
    osutils,
28
30
    )
 
31
from .sixish import (
 
32
    text_type,
 
33
    )
29
34
 
30
35
NULL_REVISION = b"null:"
31
36
CURRENT_REVISION = b"current:"
85
90
        """Verify that all revision properties are OK."""
86
91
        for name, value in self.properties.items():
87
92
            # GZ 2017-06-10: What sort of string are properties exactly?
88
 
            not_text = not isinstance(name, str)
 
93
            not_text = not isinstance(name, (text_type, str))
89
94
            if not_text or osutils.contains_whitespace(name):
90
95
                raise ValueError("invalid property name %r" % name)
91
 
            if not isinstance(value, (str, bytes)):
 
96
            if not isinstance(value, (text_type, bytes)):
92
97
                raise ValueError("invalid property value %r for %r" %
93
98
                                 (value, name))
94
99