Read about our upcoming Code of Conduct on this issue

This instance was upgraded to Heptapod 0.28.0 today

Commit f22b8d67 authored by Pierre-Yves David's avatar Pierre-Yves David 🐙
Browse files

dirstate: cleanup remaining of "now" during write

Since the whole `need_delay` have been removed, we no longer need this.

Differential Revision:
parent 434de12918fd
......@@ -733,20 +733,11 @@ class dirstate(object):
filename = self._filename
if tr:
# 'dirstate.write()' is not only for writing in-memory
# changes out, but also for dropping ambiguous timestamp.
# delayed writing re-raise "ambiguous timestamp issue".
# See also the wiki page below for detail:
# record when mtime start to be ambiguous
now = timestamp.get_fs_now(self._opener)
# delay writing in-memory changes out
lambda f: self._writedirstate(tr, f, now=now),
lambda f: self._writedirstate(tr, f),
......@@ -765,7 +756,7 @@ class dirstate(object):
self._plchangecallbacks[category] = callback
def _writedirstate(self, tr, st, now=None):
def _writedirstate(self, tr, st):
# notify callbacks about parents change
if self._origpl is not None and self._origpl != self._pl:
for c, callback in sorted(
......@@ -774,12 +765,7 @@ class dirstate(object):
callback(self, self._origpl, self._pl)
self._origpl = None
if now is None:
# use the modification time of the newly created temporary file as the
# filesystem's notion of 'now'
now = timestamp.mtime_of(util.fstat(st))
self._map.write(tr, st, now)
self._map.write(tr, st)
self._dirty = False
def _dirignore(self, f):
......@@ -444,7 +444,7 @@ class dirstatemap(_dirstatemapcommon):
self.__getitem__ = self._map.__getitem__
self.get = self._map.get
def write(self, tr, st, now):
def write(self, tr, st):
if self._use_dirstate_v2:
packed, meta = v2.pack_dirstate(self._map, self.copymap)
self.write_v2_no_append(tr, st, meta, packed)
......@@ -655,7 +655,7 @@ if rustmod is not None:
return self.identity
def write(self, tr, st, now):
def write(self, tr, st):
if not self._use_dirstate_v2:
p1, p2 = self.parents()
packed = self._map.write_v1(p1, p2)
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment