Skip to content
Snippets Groups Projects
Commit 5eb65ec1 authored by Pierre-Yves David's avatar Pierre-Yves David :octopus:
Browse files

dirstate: move the _rangemask filtering closer to its storage

The goal is to get ready to move these kind of processing at a lower level. We start with move
move _rangemask filtering close to where it is sent to the lower level to make the future move trivial.

Differential Revision: https://phab.mercurial-scm.org/D10929
parent 3f13dfa1
No related branches found
No related tags found
No related merge requests found
......@@ -455,6 +455,10 @@
msg = _(b'file %r in dirstate clashes with %r')
msg %= (pycompat.bytestr(d), pycompat.bytestr(f))
raise error.Abort(msg)
if size != NONNORMAL and size != FROM_P2:
size = size & _rangemask
if mtime != AMBIGUOUS_TIME:
mtime = mtime & _rangemask
self._dirty = True
self._updatedfiles.add(f)
self._map.addfile(f, oldstate, state, mode, size, mtime)
......@@ -476,7 +480,7 @@
mode = s.st_mode
size = s.st_size
mtime = s[stat.ST_MTIME]
self._addpath(f, b'n', mode, size & _rangemask, mtime & _rangemask)
self._addpath(f, b'n', mode, size, mtime)
self._map.copymap.pop(f, None)
if f in self._map.nonnormalset:
self._map.nonnormalset.remove(f)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment