Rev 5053: Delete spurious spaces. in file:///home/vila/src/bzr/reviews/524181-shlex_split_unicode/

Vincent Ladeuil v.ladeuil+lp at free.fr
Mon Mar 1 09:00:46 GMT 2010


At file:///home/vila/src/bzr/reviews/524181-shlex_split_unicode/

------------------------------------------------------------
revno: 5053
revision-id: v.ladeuil+lp at free.fr-20100301090046-3hkj1hhvcpogooh7
parent: gordon at doxxx.net-20100223015304-s7zqx7gh5dmyoxeh
committer: Vincent Ladeuil <v.ladeuil+lp at free.fr>
branch nick: 524181-shlex_split_unicode
timestamp: Mon 2010-03-01 10:00:46 +0100
message:
  Delete spurious spaces.
-------------- next part --------------
=== modified file 'bzrlib/cmdline.py'
--- a/bzrlib/cmdline.py	2010-02-12 05:40:17 +0000
+++ b/bzrlib/cmdline.py	2010-03-01 09:00:46 +0000
@@ -26,16 +26,16 @@
     def __init__(self, orig):
         self._iter = iter(orig)
         self._pushback_buffer = []
-        
+
     def next(self):
         if len(self._pushback_buffer) > 0:
             return self._pushback_buffer.pop()
         else:
             return self._iter.next()
-    
+
     def pushback(self, char):
         self._pushback_buffer.append(char)
-        
+
     def __iter__(self):
         return self
 
@@ -77,7 +77,7 @@
     def __init__(self, exit_state):
         self.exit_state = exit_state
         self.count = 1
-        
+
     def process(self, next_char, context):
         if next_char == u'\\':
             self.count += 1
@@ -104,7 +104,7 @@
             # let exit_state handle next_char
             context.seq.pushback(next_char)
             return self.exit_state
-    
+
     def finish(self, context):
         if self.count > 0:
             context.token.append(u'\\' * self.count)
@@ -129,16 +129,16 @@
         self.allowed_quote_chars = u'"'
         if single_quotes_allowed:
             self.allowed_quote_chars += u"'"
-    
+
     def __iter__(self):
         return self
-    
+
     def next(self):
         quoted, token = self._get_token()
         if token is None:
             raise StopIteration
         return quoted, token
-    
+
     def _get_token(self):
         self.quoted = False
         self.token = []

=== modified file 'bzrlib/tests/test_cmdline.py'
--- a/bzrlib/tests/test_cmdline.py	2010-02-18 02:15:48 +0000
+++ b/bzrlib/tests/test_cmdline.py	2010-03-01 09:00:46 +0000
@@ -85,7 +85,7 @@
     def test_double_escape(self):
         self.assertAsTokens([(True, u'foo\\\\bar')], u'"foo\\\\bar"')
         self.assertAsTokens([(False, u'foo\\\\bar')], u"foo\\\\bar")
-        
+
     def test_multiple_quoted_args(self):
         self.assertAsTokens([(True, u'x x'), (True, u'y y')],
             u'"x x" "y y"')



More information about the bazaar-commits mailing list