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

  • Committer: Jelmer Vernooij
  • Date: 2017-07-23 22:06:41 UTC
  • mfrom: (6738 trunk)
  • mto: This revision was merged to the branch mainline in revision 6739.
  • Revision ID: jelmer@jelmer.uk-20170723220641-69eczax9bmv8d6kk
Merge trunk, address review comments.

Show diffs side-by-side

added added

removed removed

Lines of Context:
20
20
configuring_bazaar.txt.
21
21
"""
22
22
 
 
23
from __future__ import absolute_import
 
24
 
23
25
import re
24
26
 
25
27
 
26
 
_whitespace_match = re.compile(u'\\s', re.UNICODE).match
 
28
_whitespace_match = re.compile(u'\s', re.UNICODE).match
27
29
 
28
30
 
29
31
class _PushbackSequence(object):
91
93
            return self
92
94
        elif next_char in context.allowed_quote_chars:
93
95
            # 2N backslashes followed by a quote are N backslashes
94
 
            context.token.append(u'\\' * (self.count // 2))
 
96
            context.token.append(u'\\' * (self.count/2))
95
97
            # 2N+1 backslashes follwed by a quote are N backslashes followed by
96
98
            # the quote which should not be processed as the start or end of
97
99
            # the quoted arg
156
158
            state = state.process(next_char, self)
157
159
            if state is None:
158
160
                break
159
 
        if state is not None and not getattr(state, 'finish', None) is None:
 
161
        if not state is None and not getattr(state, 'finish', None) is None:
160
162
            state.finish(self)
161
163
        result = u''.join(self.token)
162
164
        if not self.quoted and result == '':