comparison mercurial/context.py @ 19670:6ac735fbea50

commitablectx: move _flagfunc from workingctx
author Sean Farley <sean.michael.farley@gmail.com>
date Wed, 14 Aug 2013 15:30:17 -0500
parents 8120ea4b87f5
children 367e95bba6e8
comparison
equal deleted inserted replaced
19669:8120ea4b87f5 19670:6ac735fbea50
895 return fl1 895 return fl1
896 return '' # punt for conflicts 896 return '' # punt for conflicts
897 897
898 return func 898 return func
899 899
900 @propertycache
901 def _flagfunc(self):
902 return self._repo.dirstate.flagfunc(self._buildflagfunc)
903
900 class workingctx(commitablectx): 904 class workingctx(commitablectx):
901 """A workingctx object makes access to data related to 905 """A workingctx object makes access to data related to
902 the current working directory convenient. 906 the current working directory convenient.
903 date - any valid date string or (unixtime, offset), or None. 907 date - any valid date string or (unixtime, offset), or None.
904 user - username string, or None. 908 user - username string, or None.
907 or None to use the repository status. 911 or None to use the repository status.
908 """ 912 """
909 def __init__(self, repo, text="", user=None, date=None, extra=None, 913 def __init__(self, repo, text="", user=None, date=None, extra=None,
910 changes=None): 914 changes=None):
911 super(workingctx, self).__init__(repo, text, user, date, extra, changes) 915 super(workingctx, self).__init__(repo, text, user, date, extra, changes)
912
913 @propertycache
914 def _flagfunc(self):
915 return self._repo.dirstate.flagfunc(self._buildflagfunc)
916 916
917 @propertycache 917 @propertycache
918 def _manifest(self): 918 def _manifest(self):
919 """generate a manifest corresponding to the working directory""" 919 """generate a manifest corresponding to the working directory"""
920 920