##// END OF EJS Templates
commitablectx: move status from workingctx
Sean Farley -
r19673:53a3a8d3 default
parent child Browse files
Show More
@@ -937,6 +937,22 b' class commitablectx(basectx):'
937 def _status(self):
937 def _status(self):
938 return self._repo.status()[:4]
938 return self._repo.status()[:4]
939
939
940 def status(self, ignored=False, clean=False, unknown=False):
941 """Explicit status query
942 Unless this method is used to query the working copy status, the
943 _status property will implicitly read the status using its default
944 arguments."""
945 stat = self._repo.status(ignored=ignored, clean=clean, unknown=unknown)
946 self._unknown = self._ignored = self._clean = None
947 if unknown:
948 self._unknown = stat[4]
949 if ignored:
950 self._ignored = stat[5]
951 if clean:
952 self._clean = stat[6]
953 self._status = stat[:4]
954 return stat
955
940 class workingctx(commitablectx):
956 class workingctx(commitablectx):
941 """A workingctx object makes access to data related to
957 """A workingctx object makes access to data related to
942 the current working directory convenient.
958 the current working directory convenient.
@@ -971,22 +987,6 b' class workingctx(commitablectx):'
971 p = p[:-1]
987 p = p[:-1]
972 return [changectx(self._repo, x) for x in p]
988 return [changectx(self._repo, x) for x in p]
973
989
974 def status(self, ignored=False, clean=False, unknown=False):
975 """Explicit status query
976 Unless this method is used to query the working copy status, the
977 _status property will implicitly read the status using its default
978 arguments."""
979 stat = self._repo.status(ignored=ignored, clean=clean, unknown=unknown)
980 self._unknown = self._ignored = self._clean = None
981 if unknown:
982 self._unknown = stat[4]
983 if ignored:
984 self._ignored = stat[5]
985 if clean:
986 self._clean = stat[6]
987 self._status = stat[:4]
988 return stat
989
990 def user(self):
990 def user(self):
991 return self._user or self._repo.ui.username()
991 return self._user or self._repo.ui.username()
992 def date(self):
992 def date(self):
General Comments 0
You need to be logged in to leave comments. Login now