mercurial/context.py
changeset 23139 e53f6b72a0e4
parent 23110 692bde7f486d
child 23236 7ea2ef4479f2
equal deleted inserted replaced
23136:6eab50a34fed 23139:e53f6b72a0e4
   107 
   107 
   108     def _poststatus(self, other, s, match, listignored, listclean, listunknown):
   108     def _poststatus(self, other, s, match, listignored, listclean, listunknown):
   109         """provide a hook to allow child objects to postprocess status results
   109         """provide a hook to allow child objects to postprocess status results
   110 
   110 
   111         For example, this allows other contexts, such as workingctx, to filter
   111         For example, this allows other contexts, such as workingctx, to filter
   112         suspect symlinks in the case of FAT32 and NTFS filesytems.
   112         suspect symlinks in the case of FAT32 and NTFS filesystems.
   113         """
   113         """
   114         return s
   114         return s
   115 
   115 
   116     def _buildstatus(self, other, s, match, listignored, listclean,
   116     def _buildstatus(self, other, s, match, listignored, listclean,
   117                      listunknown):
   117                      listunknown):
  1413         return mf
  1413         return mf
  1414 
  1414 
  1415     def _prestatus(self, other, s, match, listignored, listclean, listunknown):
  1415     def _prestatus(self, other, s, match, listignored, listclean, listunknown):
  1416         """override the parent hook with a dirstate query
  1416         """override the parent hook with a dirstate query
  1417 
  1417 
  1418         We use this prestatus hook to populate the status with information from
  1418         We use this _prestatus hook to populate the status with information from
  1419         the dirstate.
  1419         the dirstate.
  1420         """
  1420         """
  1421         # doesn't need to call super; if that changes, be aware that super
  1421         # doesn't need to call super; if that changes, be aware that super
  1422         # calls self.manifest which would slow down the common case of calling
  1422         # calls self.manifest which would slow down the common case of calling
  1423         # status against a workingctx's parent
  1423         # status against a workingctx's parent
  1424         return self._dirstatestatus(match, listignored, listclean, listunknown)
  1424         return self._dirstatestatus(match, listignored, listclean, listunknown)
  1425 
  1425 
  1426     def _poststatus(self, other, s, match, listignored, listclean, listunknown):
  1426     def _poststatus(self, other, s, match, listignored, listclean, listunknown):
  1427         """override the parent hook with a filter for suspect symlinks
  1427         """override the parent hook with a filter for suspect symlinks
  1428 
  1428 
  1429         We use this poststatus hook to filter out symlinks that might have
  1429         We use this _poststatus hook to filter out symlinks that might have
  1430         accidentally ended up with the entire contents of the file they are
  1430         accidentally ended up with the entire contents of the file they are
  1431         susposed to be linking to.
  1431         supposed to be linking to.
  1432         """
  1432         """
  1433         s[0] = self._filtersuspectsymlink(s[0])
  1433         s[0] = self._filtersuspectsymlink(s[0])
  1434         self._status = scmutil.status(*s)
  1434         self._status = scmutil.status(*s)
  1435         return s
  1435         return s
  1436 
  1436 
  1691 
  1691 
  1692 
  1692 
  1693 class memfilectx(committablefilectx):
  1693 class memfilectx(committablefilectx):
  1694     """memfilectx represents an in-memory file to commit.
  1694     """memfilectx represents an in-memory file to commit.
  1695 
  1695 
  1696     See memctx and commitablefilectx for more details.
  1696     See memctx and committablefilectx for more details.
  1697     """
  1697     """
  1698     def __init__(self, repo, path, data, islink=False,
  1698     def __init__(self, repo, path, data, islink=False,
  1699                  isexec=False, copied=None, memctx=None):
  1699                  isexec=False, copied=None, memctx=None):
  1700         """
  1700         """
  1701         path is the normalized file path relative to repository root.
  1701         path is the normalized file path relative to repository root.