# HG changeset patch # User Patrick Mezard # Date 1305668775 -7200 # Node ID dd81191ffac3e59203dc9dc0d46c0ca34b2b751f # Parent 23f0eeb598b5473e2a16170af17bfa8268faeecb patch: extract fs access from patchfile into fsbackend Most filesystem calls are already isolated in patchfile but this is not enough: renames are performed before patchfile is available and some chmod calls are even done outside of the applydiff call. Once all these calls are extracted into a backend class, we can provide cleaner APIs to write to a working directory context directly into the repository. [ original upstream message ] diff -r 23f0eeb598b5 -r dd81191ffac3 hgkw/keyword.py --- a/hgkw/keyword.py Mon May 16 21:56:26 2011 +0200 +++ b/hgkw/keyword.py Tue May 17 23:46:15 2011 +0200 @@ -595,11 +595,11 @@ wlock.release() # monkeypatches - def kwpatchfile_init(orig, self, ui, fname, opener, + def kwpatchfile_init(orig, self, ui, fname, backend, missing=False, eolmode=None): '''Monkeypatch/wrap patch.patchfile.__init__ to avoid rejects or conflicts due to expanded keywords in working dir.''' - orig(self, ui, fname, opener, missing, eolmode) + orig(self, ui, fname, backend, missing, eolmode) # shrink keywords read from working dir self.lines = kwt.shrinklines(self.fname, self.lines)