dirstate-guard: remove the feature
The dirstate guard duplicated some of the logic already implemented in the
transaction (and now the changing_* context).
However the feature was incomplete, for example, living only in memory meant we
could not recover from the hardest crash. In addition this duplicated with the
transaction logic meant things could go out of sync or step on each other.
Removing the feature now that we no longer needs it seems the safest.
# mock out util.makedate() to supply testable values
import os
from mercurial import pycompat
from mercurial.utils import dateutil
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)
dateutil.makedate = mockmakedate