diff mercurial/context.py @ 11110:22f5ad0b5857

subrepo: dirtiness checks should iterate over subrepos
author Edouard Gomez <ed.gomez@free.fr>
date Sat, 01 May 2010 23:05:21 +0200
parents 213ca9ffcddb
children ca46910dd9ea
line wrap: on
line diff
--- a/mercurial/context.py	Sat May 01 23:05:19 2010 +0200
+++ b/mercurial/context.py	Sat May 01 23:05:21 2010 +0200
@@ -752,7 +752,11 @@
 
     def dirty(self, missing=False):
         "check whether a working directory is modified"
-
+        # check subrepos first
+        for s in self.substate:
+            if self.sub(s).dirty():
+                return True
+        # check current working dir
         return (self.p2() or self.branch() != self.p1().branch() or
                 self.modified() or self.added() or self.removed() or
                 (missing and self.deleted()))