[cig-commits] commit: simplify the test for applied mq patches

Mercurial hg at geodynamics.org
Mon Nov 24 11:26:59 PST 2008


changeset:   34:3668035ca554
user:        Robin Farine <robin.farine at terminus.org>
date:        Sun Dec 17 20:01:29 2006 +0100
files:       forest.py
description:
simplify the test for applied mq patches


diff -r 54ab5a322cac -r 3668035ca554 forest.py
--- a/forest.py	Sun Dec 17 19:56:29 2006 +0100
+++ b/forest.py	Sun Dec 17 20:01:29 2006 +0100
@@ -73,14 +73,13 @@ def mq_patches_applied(rpath):
     entries = os.listdir(rpath)
     for e in entries:
         path = os.path.join(rpath, e)
-        if e == "data" or not os.path.isdir(path):
-            continue
-        series = os.path.join(path, "series")
-        status = os.path.join(path, "status")
-        if os.path.isfile(series):
-            s = os.stat(status)
-            if s.st_size > 0:
-                return True
+        if os.path.isdir(path):
+            series = os.path.join(path, "series")
+            status = os.path.join(path, "status")
+            if os.path.isfile(series):
+                s = os.stat(status)
+                if s.st_size > 0:
+                    return True
     return False
 
 



More information about the CIG-COMMITS mailing list