Mercurial > hg
diff tests/fakedirstatewritetime.py @ 48379:08b060abd658
dirstate: move "get fs now" in the timestamp utility module
We will need it during update.
Differential Revision: https://phab.mercurial-scm.org/D11783
author | Pierre-Yves David <pierre-yves.david@octobus.net> |
---|---|
date | Wed, 17 Nov 2021 12:24:00 +0100 |
parents | 269ff8978086 |
children | 434de12918fd |
line wrap: on
line diff
--- a/tests/fakedirstatewritetime.py Wed Nov 17 10:26:48 2021 +0100 +++ b/tests/fakedirstatewritetime.py Wed Nov 17 12:24:00 2021 +0100 @@ -9,7 +9,6 @@ from mercurial import ( context, - dirstate, dirstatemap as dirstatemapmod, extensions, policy, @@ -73,19 +72,19 @@ ) dirstatemapmod.dirstatemap.write = wrapper - orig_dirstate_getfsnow = dirstate._getfsnow + orig_get_fs_now = timestamp.get_fs_now wrapper = lambda *args: pack_dirstate(fakenow, orig_pack_dirstate, *args) orig_module = parsers orig_pack_dirstate = parsers.pack_dirstate orig_module.pack_dirstate = wrapper - dirstate._getfsnow = lambda *args: fakenow + timestamp.get_fs_now = lambda *args: fakenow try: return func() finally: orig_module.pack_dirstate = orig_pack_dirstate - dirstate._getfsnow = orig_dirstate_getfsnow + timestamp.get_fs_now = orig_get_fs_now if has_rust_dirstate: dirstatemapmod.dirstatemap.write = orig_dirstatemap_write