# HG changeset patch # User Franz Glasner # Date 1551861369 -3600 # Node ID d291983b419143d1fcb0548d4e106d5e8d10776e # Parent 8c340d172698c5838ef512bf095166d53f99e6e4 Begin option handling in the "resolve" hook diff -r 8c340d172698 -r d291983b4191 extensions/timestamps.py --- 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):