83 ''' |
83 ''' |
84 |
84 |
85 from mercurial import commands, cmdutil, dispatch, filelog, revlog, extensions |
85 from mercurial import commands, cmdutil, dispatch, filelog, revlog, extensions |
86 from mercurial import patch, localrepo, templater, templatefilters, util |
86 from mercurial import patch, localrepo, templater, templatefilters, util |
87 from mercurial.hgweb import webcommands |
87 from mercurial.hgweb import webcommands |
|
88 from mercurial.lock import release |
88 from mercurial.node import nullid, hex |
89 from mercurial.node import nullid, hex |
89 from mercurial.i18n import _ |
90 from mercurial.i18n import _ |
90 import re, shutil, tempfile, time |
91 import re, shutil, tempfile, time |
91 |
92 |
92 commands.optionalrepo += ' kwdemo' |
93 commands.optionalrepo += ' kwdemo' |
273 try: |
274 try: |
274 wlock = repo.wlock() |
275 wlock = repo.wlock() |
275 lock = repo.lock() |
276 lock = repo.lock() |
276 kwt.overwrite(None, expand, status[6]) |
277 kwt.overwrite(None, expand, status[6]) |
277 finally: |
278 finally: |
278 del wlock, lock |
279 release(lock, wlock) |
279 |
|
280 |
280 |
281 def demo(ui, repo, *args, **opts): |
281 def demo(ui, repo, *args, **opts): |
282 '''print [keywordmaps] configuration and an expansion example |
282 '''print [keywordmaps] configuration and an expansion example |
283 |
283 |
284 Show current, custom, or default keyword template maps and their |
284 Show current, custom, or default keyword template maps and their |