Show More
@@ -116,6 +116,7 b' from mercurial.utils import (' | |||||
116 | dateutil, |
|
116 | dateutil, | |
117 | stringutil, |
|
117 | stringutil, | |
118 | ) |
|
118 | ) | |
|
119 | from mercurial.dirstateutils import timestamp | |||
119 |
|
120 | |||
120 | cmdtable = {} |
|
121 | cmdtable = {} | |
121 | command = registrar.command(cmdtable) |
|
122 | command = registrar.command(cmdtable) | |
@@ -326,6 +327,7 b' class kwtemplater(object):' | |||||
326 | msg = _(b'overwriting %s expanding keywords\n') |
|
327 | msg = _(b'overwriting %s expanding keywords\n') | |
327 | else: |
|
328 | else: | |
328 | msg = _(b'overwriting %s shrinking keywords\n') |
|
329 | msg = _(b'overwriting %s shrinking keywords\n') | |
|
330 | wctx = self.repo[None] | |||
329 | for f in candidates: |
|
331 | for f in candidates: | |
330 | if self.restrict: |
|
332 | if self.restrict: | |
331 | data = self.repo.file(f).read(mf[f]) |
|
333 | data = self.repo.file(f).read(mf[f]) | |
@@ -356,7 +358,12 b' class kwtemplater(object):' | |||||
356 | fp.write(data) |
|
358 | fp.write(data) | |
357 | fp.close() |
|
359 | fp.close() | |
358 | if kwcmd: |
|
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 | elif self.postcommit: |
|
367 | elif self.postcommit: | |
361 | self.repo.dirstate.update_file_p1(f, p1_tracked=True) |
|
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