Mercurial > hgrepos > DevTools > mercurial-extensions
changeset 224:a1f85255134a
Begin testing hooks for the "revert" operation
| author | Franz Glasner <hg@dom66.de> |
|---|---|
| date | Mon, 22 Oct 2018 09:39:30 +0200 |
| parents | 3ea22dcbbea6 |
| children | 13fa7c91a496 |
| files | extensions/timestamps.py |
| diffstat | 1 files changed, 7 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/extensions/timestamps.py Mon Oct 22 09:39:10 2018 +0200 +++ b/extensions/timestamps.py Mon Oct 22 09:39:30 2018 +0200 @@ -694,6 +694,11 @@ repo._ts_record_pre_data(hooktype) +def post_hook(ui, repo, hooktype, **kwds): + ui.debug("POST HOOK: " + hooktype + '\n') + ui.debug("POST HOOK: " + repr(kwds) + '\n') + + def update_hook(ui, repo, hooktype, **kwds): if _DEV: ui.debug("UPDATE: " + repr(repo) + '\n') @@ -869,6 +874,8 @@ def uisetup(ui): ui.setconfig('hooks', 'pre-update.timestamps', pre_hook) + ui.setconfig('hooks', 'pre-revert.timestamps', pre_hook) + ui.setconfig('hooks', 'post-revert.timestamps', post_hook) def _restore_timestamps(repo, candidates, tsmatch, tsdb):
