memfilectx: add remove and write methods
Similar to the previous patch for workingfilectx, this patch will allow
abstracting localrepo.remove / write method to refactor working directory code
but instead operate on files in memory.
--- a/mercurial/context.py Wed Jul 02 14:01:01 2014 -0500
+++ b/mercurial/context.py Fri Jul 25 20:20:26 2014 -0500
@@ -1684,3 +1684,12 @@
return self._flags
def renamed(self):
return self._copied
+
+ def remove(self, ignoremissing=False):
+ """wraps unlink for a repo's working directory"""
+ # need to figure out what to do here
+ del self._changectx[self._path]
+
+ def write(self, data, flags):
+ """wraps repo.wwrite"""
+ self._data = data