##// END OF EJS Templates
workingctx: use member variables to store ignored and clean...
Steve Borho -
r11099:a68bd3b7 default
parent child Browse files
Show More
@@ -564,7 +564,12 b' class workingctx(changectx):'
564 564 if user:
565 565 self._user = user
566 566 if changes:
567 self._status = list(changes)
567 self._status = list(changes[:5])
568 self._ignored = changes[5]
569 self._clean = changes[6]
570 else:
571 self._ignored = None
572 self._clean = None
568 573
569 574 self._extra = {}
570 575 if extra:
@@ -624,7 +629,7 b' class workingctx(changectx):'
624 629
625 630 @propertycache
626 631 def _status(self):
627 return self._repo.status(unknown=True)
632 return self._repo.status(unknown=True)[:5]
628 633
629 634 @propertycache
630 635 def _user(self):
@@ -647,8 +652,10 b' class workingctx(changectx):'
647 652 Unless this method is used to query the working copy status, the
648 653 _status property will implicitly read the status using its default
649 654 arguments."""
650 self._status = self._repo.status(ignored=ignored, clean=clean,
651 unknown=unknown)
655 stat = self._repo.status(ignored=ignored, clean=clean, unknown=unknown)
656 self._ignored = ignored and stat[5] or None
657 self._clean = clean and stat[6] or None
658 self._status = stat[:5]
652 659 return self._status
653 660
654 661 def manifest(self):
@@ -673,9 +680,13 b' class workingctx(changectx):'
673 680 def unknown(self):
674 681 return self._status[4]
675 682 def ignored(self):
676 return self._status[5]
683 if self._ignored is None:
684 raise util.Abort(_("Ignored files requested without prior query\n"))
685 return self._ignored
677 686 def clean(self):
678 return self._status[6]
687 if self._clean is None:
688 raise util.Abort(_("Clean files requested without prior query\n"))
689 return self._clean
679 690 def branch(self):
680 691 return self._extra['branch']
681 692 def extra(self):
General Comments 0
You need to be logged in to leave comments. Login now