##// END OF EJS Templates
issue6528: add a config option to control the fixing on the fly...
issue6528: add a config option to control the fixing on the fly This will allow people who know to be safe to avoid any performance overhead (and other potential issue). Differential Revision: https://phab.mercurial-scm.org/D11271

File last commit:

r43346:2372284d default
r48630:2813d406 5.9rc1 stable
Show More
mockmakedate.py
23 lines | 533 B | text/x-python | PythonLexer
Taapas Agrawal
histedit: add rewrite.update-timestamp support to fold and mess...
r41249 # mock out util.makedate() to supply testable values
from __future__ import absolute_import
import os
from mercurial import pycompat
from mercurial.utils import dateutil
Augie Fackler
formatting: blacken the codebase...
r43346
Taapas Agrawal
histedit: add rewrite.update-timestamp support to fold and mess...
r41249 def mockmakedate():
filename = os.path.join(os.environ['TESTTMP'], 'testtime')
try:
with open(filename, 'rb') as timef:
time = float(timef.read()) + 1
except IOError:
time = 0.0
with open(filename, 'wb') as timef:
timef.write(pycompat.bytestr(time))
return (time, 0)
Augie Fackler
formatting: blacken the codebase...
r43346
Taapas Agrawal
histedit: add rewrite.update-timestamp support to fold and mess...
r41249 dateutil.makedate = mockmakedate