revset: fix a number of highly dubious continue statements
authorMarkus F.X.J. Oberhumer <markus@oberhumer.com>
Wed, 16 Mar 2011 23:54:55 +0100
changeset 13670 15b97a1cd60b
parent 13669 12f60626d817
child 13688 f0a2aa60aea9
revset: fix a number of highly dubious continue statements This patch definitely needs a review and would also benefit from some new testsuite entries.
mercurial/revset.py
--- a/mercurial/revset.py	Wed Mar 16 23:54:55 2011 +0100
+++ b/mercurial/revset.py	Wed Mar 16 23:54:55 2011 +0100
@@ -394,7 +394,7 @@
         for e in c.files() + [c.user(), c.description()]:
             if gr.search(e):
                 l.append(r)
-                continue
+                break
     return l
 
 def author(repo, subset, x):
@@ -423,7 +423,7 @@
         for f in repo[r].files():
             if m(f):
                 s.append(r)
-                continue
+                break
     return s
 
 def contains(repo, subset, x):
@@ -438,13 +438,12 @@
         for r in subset:
             if pat in repo[r]:
                 s.append(r)
-                continue
     else:
         for r in subset:
             for f in repo[r].manifest():
                 if m(f):
                     s.append(r)
-                    continue
+                    break
     return s
 
 def checkstatus(repo, subset, pat, field):
@@ -466,12 +465,11 @@
         if fast:
             if pat in files:
                 s.append(r)
-                continue
         else:
             for f in files:
                 if m(f):
                     s.append(r)
-                    continue
+                    break
     return s
 
 def modifies(repo, subset, x):