# HG changeset patch # User Mads Kiilerich # Date 2013-04-27 21:19:52 # Node ID 7ee03e190c1dab89f91b287fa9ab7d94ffebda53 # Parent 54af51c18c4cc5712b1b4ebd8fc713b85031d2ec dirstate: inline local finish function Having it as a local function adds no value. diff --git a/mercurial/dirstate.py b/mercurial/dirstate.py --- a/mercurial/dirstate.py +++ b/mercurial/dirstate.py @@ -503,17 +503,13 @@ class dirstate(object): if not self._dirty: return st = self._opener("dirstate", "w", atomictemp=True) - - def finish(s): - st.write(s) - st.close() - self._lastnormaltime = 0 - self._dirty = self._dirtypl = False - # use the modification time of the newly created temporary file as the # filesystem's notion of 'now' now = util.fstat(st).st_mtime - finish(parsers.pack_dirstate(self._map, self._copymap, self._pl, now)) + st.write(parsers.pack_dirstate(self._map, self._copymap, self._pl, now)) + st.close() + self._lastnormaltime = 0 + self._dirty = self._dirtypl = False def _dirignore(self, f): if f == '.':