Mercurial > hg-stable
changeset 21026:7ee03e190c1d
dirstate: inline local finish function
Having it as a local function adds no value.
author | Mads Kiilerich <madski@unity3d.com> |
---|---|
date | Sat, 27 Apr 2013 23:19:52 +0200 |
parents | 54af51c18c4c |
children | 25ee5dbebc6b |
files | mercurial/dirstate.py |
diffstat | 1 files changed, 4 insertions(+), 8 deletions(-) [+] |
line wrap: on
line diff
--- a/mercurial/dirstate.py Tue Apr 08 01:35:13 2014 +0200 +++ b/mercurial/dirstate.py Sat Apr 27 23:19:52 2013 +0200 @@ -503,17 +503,13 @@ 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 == '.':