Mercurial > hgrepos > DevTools > mercurial-extensions
changeset 376:d291983b4191
Begin option handling in the "resolve" hook
| author | Franz Glasner <fzglas.hg@dom66.de> |
|---|---|
| date | Wed, 06 Mar 2019 09:36:09 +0100 |
| parents | 8c340d172698 |
| children | 3cf4c3d56eca |
| files | extensions/timestamps.py |
| diffstat | 1 files changed, 4 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/extensions/timestamps.py Tue Mar 05 17:25:50 2019 +0100 +++ b/extensions/timestamps.py Wed Mar 06 09:36:09 2019 +0100 @@ -226,6 +226,7 @@ if not repo.local(): return + opts = kwds.get("opts") if hooktype == "post-revert": wctx = repo[None] tsconfmatch = _gen_matcher_from_tsconfig(wctx, ui=ui) @@ -235,7 +236,6 @@ if ts is None: return ui.note(_("restoring timestamps\n")) - opts = kwds.get("opts") if opts.get("all"): candidates = wctx else: @@ -251,8 +251,11 @@ ts = _Timestamps.from_filename(ui, name=repo.wjoin(TIMESTAMPS_DATABASE)) if ts is None: ui.warn(_("update.timestamps: timestamps database file could not be found or read\n")) + if opts.get("list") or opts.get("mark") or opts.get("unmark"): return ui.note(_("restoring timestamps\n")) + tool = opts.get("tool") + patsmatch = scmutil.match(wctx, kwds.get("pats"), opts) def update_hook(ui, repo, hooktype, **kwds):
