equal
deleted
inserted
replaced
436 keywords = '$' + '$\n$'.join(sorted(kwmaps.keys())) + '$\n' |
436 keywords = '$' + '$\n$'.join(sorted(kwmaps.keys())) + '$\n' |
437 repo.wopener.write(fn, keywords) |
437 repo.wopener.write(fn, keywords) |
438 repo[None].add([fn]) |
438 repo[None].add([fn]) |
439 ui.note(_('\nkeywords written to %s:\n') % fn) |
439 ui.note(_('\nkeywords written to %s:\n') % fn) |
440 ui.note(keywords) |
440 ui.note(keywords) |
441 repo.dirstate.setbranch('demobranch') |
441 wlock = repo.wlock() |
|
442 try: |
|
443 repo.dirstate.setbranch('demobranch') |
|
444 finally: |
|
445 wlock.release() |
442 for name, cmd in ui.configitems('hooks'): |
446 for name, cmd in ui.configitems('hooks'): |
443 if name.split('.', 1)[0].find('commit') > -1: |
447 if name.split('.', 1)[0].find('commit') > -1: |
444 repo.ui.setconfig('hooks', name, '') |
448 repo.ui.setconfig('hooks', name, '') |
445 msg = _('hg keyword configuration and expansion example') |
449 msg = _('hg keyword configuration and expansion example') |
446 ui.note("hg ci -m '%s'\n" % msg) # check-code-ignore |
450 ui.note("hg ci -m '%s'\n" % msg) # check-code-ignore |