mq: don't use regexp when not necessary
authorBenoit Boissinot <benoit.boissinot@ens-lyon.org>
Sun, 14 Mar 2010 19:09:55 +0100
changeset 10688 d4d3a8a65248
parent 10687 583adcf63f80
child 10692 2a6c34b14ace
mq: don't use regexp when not necessary
hgext/mq.py
--- 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