##// END OF EJS Templates
context: add a dirty method to detect modified contexts
Matt Mackall -
r8717:e8de5957 default
parent child Browse files
Show More
@@ -618,6 +618,13 b' class workingctx(changectx):'
618 618 def walk(self, match):
619 619 return sorted(self._repo.dirstate.walk(match, True, False))
620 620
621 def dirty(self, missing=False):
622 "check whether a working directory is modified"
623
624 return (self.p2() or self.branch() != self.p1().branch() or
625 self.modified() or self.added() or self.removed() or
626 (missing and self.deleted()))
627
621 628 class workingfilectx(filectx):
622 629 """A workingfilectx object makes access to data related to a particular
623 630 file in the working directory convenient."""
General Comments 0
You need to be logged in to leave comments. Login now