Show More
@@ -116,6 +116,7 b' from mercurial.utils import (' | |||
|
116 | 116 | dateutil, |
|
117 | 117 | stringutil, |
|
118 | 118 | ) |
|
119 | from mercurial.dirstateutils import timestamp | |
|
119 | 120 | |
|
120 | 121 | cmdtable = {} |
|
121 | 122 | command = registrar.command(cmdtable) |
@@ -326,6 +327,7 b' class kwtemplater(object):' | |||
|
326 | 327 | msg = _(b'overwriting %s expanding keywords\n') |
|
327 | 328 | else: |
|
328 | 329 | msg = _(b'overwriting %s shrinking keywords\n') |
|
330 | wctx = self.repo[None] | |
|
329 | 331 | for f in candidates: |
|
330 | 332 | if self.restrict: |
|
331 | 333 | data = self.repo.file(f).read(mf[f]) |
@@ -356,7 +358,12 b' class kwtemplater(object):' | |||
|
356 | 358 | fp.write(data) |
|
357 | 359 | fp.close() |
|
358 | 360 | if kwcmd: |
|
359 |
s |
|
|
361 | s = wctx[f].lstat() | |
|
362 | mode = s.st_mode | |
|
363 | size = s.st_size | |
|
364 | mtime = timestamp.mtime_of(s) | |
|
365 | cache_data = (mode, size, mtime) | |
|
366 | self.repo.dirstate.set_clean(f, cache_data) | |
|
360 | 367 | elif self.postcommit: |
|
361 | 368 | self.repo.dirstate.update_file_p1(f, p1_tracked=True) |
|
362 | 369 |
General Comments 0
You need to be logged in to leave comments.
Login now