[PATCH] tests: quickly check if the glob line already matches the output

Simon Heimberg simohe at besonet.ch
Wed Feb 6 23:59:51 CST 2013


# HG changeset patch
# User Simon Heimberg <simohe at besonet.ch>
# Date 1350334939 -7200
# Branch stable
# Node ID 752845f990b6544b4c22d9c088a409ab8ea15e97
# Parent  0fe362f445f086aa52631ee15b5fe55ec3faa99e
tests: quickly check if the glob line already matches the output

This happens when a path is matched on linux

diff -r 0fe362f445f0 -r 752845f990b6 tests/run-tests.py
--- a/tests/run-tests.py	Die Nov 06 01:05:43 2012 +0100
+++ b/tests/run-tests.py	Mon Okt 15 23:02:19 2012 +0200
@@ -548,6 +548,8 @@
 def globmatch(el, l):
     # The only supported special characters are * and ? plus / which also
     # matches \ on windows. Escaping of these caracters is supported.
+    if el == l:
+        return True
     i, n = 0, len(el)
     res = ''
     while i < n:


More information about the Mercurial-devel mailing list