changeset 10688:d4d3a8a65248

mq: don't use regexp when not necessary
author Benoit Boissinot <benoit.boissinot@ens-lyon.org>
date Sun, 14 Mar 2010 19:09:55 +0100
parents 583adcf63f80
children 2a6c34b14ace
files hgext/mq.py
diffstat 1 files changed, 1 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/hgext/mq.py	Sun Mar 14 14:53:20 2010 +0100
+++ b/hgext/mq.py	Sun Mar 14 19:09:55 2010 +0100
@@ -73,8 +73,7 @@
                     break
         def eatempty(lines):
             while lines:
-                l = lines[-1]
-                if re.match('\s*$', l):
+                if not lines[-1].strip():
                     del lines[-1]
                 else:
                     break