Show More
@@ -627,7 +627,7 b' class dirstate(object):' | |||
|
627 | 627 | def _writedirstate(self, st): |
|
628 | 628 | # use the modification time of the newly created temporary file as the |
|
629 | 629 | # filesystem's notion of 'now' |
|
630 | now = util.fstat(st).st_mtime | |
|
630 | now = util.statmtimesec(util.fstat(st)) & _rangemask | |
|
631 | 631 | st.write(parsers.pack_dirstate(self._map, self._copymap, self._pl, now)) |
|
632 | 632 | st.close() |
|
633 | 633 | self._lastnormaltime = 0 |
@@ -551,9 +551,9 b' static PyObject *pack_dirstate(PyObject ' | |||
|
551 | 551 | Py_ssize_t nbytes, pos, l; |
|
552 | 552 | PyObject *k, *v = NULL, *pn; |
|
553 | 553 | char *p, *s; |
|
554 | double now; | |
|
554 | int now; | |
|
555 | 555 | |
|
556 |
if (!PyArg_ParseTuple(args, "O!O!O |
|
|
556 | if (!PyArg_ParseTuple(args, "O!O!Oi:pack_dirstate", | |
|
557 | 557 | &PyDict_Type, &map, &PyDict_Type, ©map, |
|
558 | 558 | &pl, &now)) |
|
559 | 559 | return NULL; |
@@ -622,7 +622,7 b' static PyObject *pack_dirstate(PyObject ' | |||
|
622 | 622 | mode = tuple->mode; |
|
623 | 623 | size = tuple->size; |
|
624 | 624 | mtime = tuple->mtime; |
|
625 |
if (state == 'n' && mtime == |
|
|
625 | if (state == 'n' && mtime == now) { | |
|
626 | 626 | /* See pure/parsers.py:pack_dirstate for why we do |
|
627 | 627 | * this. */ |
|
628 | 628 | mtime = -1; |
@@ -31,8 +31,7 b' def fakewrite(ui, func):' | |||
|
31 | 31 | |
|
32 | 32 | # parsing 'fakenow' in YYYYmmddHHMM format makes comparison between |
|
33 | 33 | # 'fakenow' value and 'touch -t YYYYmmddHHMM' argument easy |
|
34 |
|
|
|
35 | fakenow = float(timestamp) | |
|
34 | fakenow = util.parsedate(fakenow, ['%Y%m%d%H%M'])[0] | |
|
36 | 35 | |
|
37 | 36 | orig_pack_dirstate = parsers.pack_dirstate |
|
38 | 37 | wrapper = lambda *args: pack_dirstate(fakenow, orig_pack_dirstate, *args) |
General Comments 0
You need to be logged in to leave comments.
Login now