##// 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 if user:
564 if user:
565 self._user = user
565 self._user = user
566 if changes:
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 self._extra = {}
574 self._extra = {}
570 if extra:
575 if extra:
@@ -624,7 +629,7 b' class workingctx(changectx):'
624
629
625 @propertycache
630 @propertycache
626 def _status(self):
631 def _status(self):
627 return self._repo.status(unknown=True)
632 return self._repo.status(unknown=True)[:5]
628
633
629 @propertycache
634 @propertycache
630 def _user(self):
635 def _user(self):
@@ -647,8 +652,10 b' class workingctx(changectx):'
647 Unless this method is used to query the working copy status, the
652 Unless this method is used to query the working copy status, the
648 _status property will implicitly read the status using its default
653 _status property will implicitly read the status using its default
649 arguments."""
654 arguments."""
650 self._status = self._repo.status(ignored=ignored, clean=clean,
655 stat = self._repo.status(ignored=ignored, clean=clean, unknown=unknown)
651 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 return self._status
659 return self._status
653
660
654 def manifest(self):
661 def manifest(self):
@@ -673,9 +680,13 b' class workingctx(changectx):'
673 def unknown(self):
680 def unknown(self):
674 return self._status[4]
681 return self._status[4]
675 def ignored(self):
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 def clean(self):
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 def branch(self):
690 def branch(self):
680 return self._extra['branch']
691 return self._extra['branch']
681 def extra(self):
692 def extra(self):
General Comments 0
You need to be logged in to leave comments. Login now