Show More
@@ -531,17 +531,17 b' def demo(ui, repo, *args, **opts):' | |||
|
531 | 531 | demoitems(b'keywordmaps', kwmaps.items()) |
|
532 | 532 | keywords = b'$' + b'$\n$'.join(sorted(kwmaps.keys())) + b'$\n' |
|
533 | 533 | repo.wvfs.write(fn, keywords) |
|
534 | repo[None].add([fn]) | |
|
535 | ui.note(_(b'\nkeywords written to %s:\n') % fn) | |
|
536 | ui.note(keywords) | |
|
537 | 534 | with repo.wlock(): |
|
535 | repo[None].add([fn]) | |
|
536 | ui.note(_(b'\nkeywords written to %s:\n') % fn) | |
|
537 | ui.note(keywords) | |
|
538 | 538 | repo.dirstate.setbranch(b'demobranch') |
|
539 | for name, cmd in ui.configitems(b'hooks'): | |
|
540 | if name.split(b'.', 1)[0].find(b'commit') > -1: | |
|
541 | repo.ui.setconfig(b'hooks', name, b'', b'keyword') | |
|
542 | msg = _(b'hg keyword configuration and expansion example') | |
|
543 | ui.note((b"hg ci -m '%s'\n" % msg)) | |
|
544 | repo.commit(text=msg) | |
|
539 | for name, cmd in ui.configitems(b'hooks'): | |
|
540 | if name.split(b'.', 1)[0].find(b'commit') > -1: | |
|
541 | repo.ui.setconfig(b'hooks', name, b'', b'keyword') | |
|
542 | msg = _(b'hg keyword configuration and expansion example') | |
|
543 | ui.note((b"hg ci -m '%s'\n" % msg)) | |
|
544 | repo.commit(text=msg) | |
|
545 | 545 | ui.status(_(b'\n\tkeywords expanded\n')) |
|
546 | 546 | ui.write(repo.wread(fn)) |
|
547 | 547 | repo.wvfs.rmtree(repo.root) |
General Comments 0
You need to be logged in to leave comments.
Login now