Mercurial > public > mercurial-scm > hg
comparison 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 |
comparison
equal
deleted
inserted
replaced
11109:a2bc2f2d77a9 | 11110:22f5ad0b5857 |
---|---|
750 return sorted(self._repo.dirstate.walk(match, self.substate.keys(), | 750 return sorted(self._repo.dirstate.walk(match, self.substate.keys(), |
751 True, False)) | 751 True, False)) |
752 | 752 |
753 def dirty(self, missing=False): | 753 def dirty(self, missing=False): |
754 "check whether a working directory is modified" | 754 "check whether a working directory is modified" |
755 | 755 # check subrepos first |
756 for s in self.substate: | |
757 if self.sub(s).dirty(): | |
758 return True | |
759 # check current working dir | |
756 return (self.p2() or self.branch() != self.p1().branch() or | 760 return (self.p2() or self.branch() != self.p1().branch() or |
757 self.modified() or self.added() or self.removed() or | 761 self.modified() or self.added() or self.removed() or |
758 (missing and self.deleted())) | 762 (missing and self.deleted())) |
759 | 763 |
760 class workingfilectx(filectx): | 764 class workingfilectx(filectx): |