##// END OF EJS Templates
keyword: preserve file mode when overwriting
Christian Ebert -
r15070:e4c65158 stable
parent child Browse files
Show More
@@ -270,7 +270,10 b' class kwtemplater(object):'
270 270 data, found = _shrinktext(data, re_kw.subn)
271 271 if found:
272 272 self.ui.note(msg % f)
273 fpath = self.repo.wjoin(f)
274 mode = os.lstat(fpath).st_mode
273 275 self.repo.wwrite(f, data, ctx.flags(f))
276 os.chmod(fpath, mode)
274 277 if kwcmd:
275 278 self.repo.dirstate.normal(f)
276 279 elif self.record:
@@ -270,15 +270,20 b' Update and expand'
270 270 xxx $
271 271 ignore $Id$
272 272
273 Check whether expansion is filewise
273 Check whether expansion is filewise and file mode is preserved
274 274
275 275 $ echo '$Id$' > c
276 276 $ echo 'tests for different changenodes' >> c
277 $ chmod 600 c
278 $ ls -l c | cut -b 1-10
279 -rw-------
277 280
278 281 commit file c
279 282
280 283 $ hg commit -A -mcndiff -d '1 0' -u 'User Name <user@example.com>'
281 284 adding c
285 $ ls -l c | cut -b 1-10
286 -rw-------
282 287
283 288 force expansion
284 289
General Comments 0
You need to be logged in to leave comments. Login now