##// END OF EJS Templates
commitablectx: move _buildflagfunc from workingctx
Sean Farley -
r19669:8120ea4b default
parent child Browse files
Show More
@@ -865,19 +865,6 b' class commitablectx(basectx):'
865 def __contains__(self, key):
865 def __contains__(self, key):
866 return self._repo.dirstate[key] not in "?r"
866 return self._repo.dirstate[key] not in "?r"
867
867
868 class workingctx(commitablectx):
869 """A workingctx object makes access to data related to
870 the current working directory convenient.
871 date - any valid date string or (unixtime, offset), or None.
872 user - username string, or None.
873 extra - a dictionary of extra values, or None.
874 changes - a list of file lists as returned by localrepo.status()
875 or None to use the repository status.
876 """
877 def __init__(self, repo, text="", user=None, date=None, extra=None,
878 changes=None):
879 super(workingctx, self).__init__(repo, text, user, date, extra, changes)
880
881 def _buildflagfunc(self):
868 def _buildflagfunc(self):
882 # Create a fallback function for getting file flags when the
869 # Create a fallback function for getting file flags when the
883 # filesystem doesn't support them
870 # filesystem doesn't support them
@@ -910,6 +897,19 b' class workingctx(commitablectx):'
910
897
911 return func
898 return func
912
899
900 class workingctx(commitablectx):
901 """A workingctx object makes access to data related to
902 the current working directory convenient.
903 date - any valid date string or (unixtime, offset), or None.
904 user - username string, or None.
905 extra - a dictionary of extra values, or None.
906 changes - a list of file lists as returned by localrepo.status()
907 or None to use the repository status.
908 """
909 def __init__(self, repo, text="", user=None, date=None, extra=None,
910 changes=None):
911 super(workingctx, self).__init__(repo, text, user, date, extra, changes)
912
913 @propertycache
913 @propertycache
914 def _flagfunc(self):
914 def _flagfunc(self):
915 return self._repo.dirstate.flagfunc(self._buildflagfunc)
915 return self._repo.dirstate.flagfunc(self._buildflagfunc)
General Comments 0
You need to be logged in to leave comments. Login now