Show More
@@ -294,7 +294,6 b' def demo(ui, repo, *args, **opts):' | |||||
294 | for k, v in sorted(items): |
|
294 | for k, v in sorted(items): | |
295 | ui.write('%s = %s\n' % (k, v)) |
|
295 | ui.write('%s = %s\n' % (k, v)) | |
296 |
|
296 | |||
297 | msg = 'hg keyword config and expansion example' |
|
|||
298 | fn = 'demo.txt' |
|
297 | fn = 'demo.txt' | |
299 | branchname = 'demobranch' |
|
298 | branchname = 'demobranch' | |
300 | tmpdir = tempfile.mkdtemp('', 'kwdemo.') |
|
299 | tmpdir = tempfile.mkdtemp('', 'kwdemo.') | |
@@ -355,7 +354,8 b' def demo(ui, repo, *args, **opts):' | |||||
355 | if name.split('.', 1)[0].find('commit') > -1: |
|
354 | if name.split('.', 1)[0].find('commit') > -1: | |
356 | repo.ui.setconfig('hooks', name, '') |
|
355 | repo.ui.setconfig('hooks', name, '') | |
357 | ui.note(_('unhooked all commit hooks\n')) |
|
356 | ui.note(_('unhooked all commit hooks\n')) | |
358 | ui.note('hg -R "%s" ci -m "%s"\n' % (tmpdir, msg)) |
|
357 | msg = _('hg keyword configuration and expansion example') | |
|
358 | ui.note("hg -R '%s' ci -m '%s'\n" % (tmpdir, msg)) | |||
359 | repo.commit(text=msg) |
|
359 | repo.commit(text=msg) | |
360 | ui.status(_('\n\tkeywords expanded\n')) |
|
360 | ui.status(_('\n\tkeywords expanded\n')) | |
361 | ui.write(repo.wread(fn)) |
|
361 | ui.write(repo.wread(fn)) |
@@ -213,7 +213,7 b' b = ignore' | |||||
213 | demo.txt = |
|
213 | demo.txt = | |
214 | [keywordmaps] |
|
214 | [keywordmaps] | |
215 | Xinfo = {author}: {desc} |
|
215 | Xinfo = {author}: {desc} | |
216 | $Xinfo: test: hg keyword config and expansion example $ |
|
216 | $Xinfo: test: hg keyword configuration and expansion example $ | |
217 | % cat |
|
217 | % cat | |
218 | expand $Id: a,v ef63ca68695b 1970/01/01 00:00:00 user $ |
|
218 | expand $Id: a,v ef63ca68695b 1970/01/01 00:00:00 user $ | |
219 | do not process $Id: |
|
219 | do not process $Id: |
General Comments 0
You need to be logged in to leave comments.
Login now