Mercurial > hgrepos > DevTools > mercurial-extensions
changeset 366:663a09a4cb98
Begin using FILE patterns for some commands
| author | Franz Glasner <fzglas.hg@dom66.de> |
|---|---|
| date | Tue, 19 Feb 2019 08:33:23 +0100 |
| parents | 21a4af796c3e |
| children | 4aa43c79fbf8 |
| files | extensions/timestamps.py |
| diffstat | 1 files changed, 4 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/extensions/timestamps.py Tue Feb 19 08:31:39 2019 +0100 +++ b/extensions/timestamps.py Tue Feb 19 08:33:23 2019 +0100 @@ -143,10 +143,10 @@ ("", "tsconfig", "", _("use an alternate configuration file"), _("TSCONFIG")), ("", "amend", None, _("amend an existing database file instead of generating a fresh one")), ("", "all", None, _("when importing import all timestamps instead of only the matching ones")), - ], - _("hg timestamps [OPTION]..."), + ] + cmdutil.walkopts, + _("hg timestamps OPTION [OPTION]... [FILE]..."), inferrepo=True) -def timestamps(ui, repo, **opts): +def timestamps(ui, repo, *pats, **opts): """save or restore midification times of files Giving --save saves the file modification times into the database. @@ -166,6 +166,7 @@ ctx = scmutil.revsingle(repo, opts.get("rev"), default=None) if not ctx: raise error.Abort(_("no Mercurial working directory")) + patsmatch = scmutil.match(ctx, pats, opts) if opts.get("import"): _import_timestamps(ui, ctx,
