changeset 370:a0cfd90149d0

"timestamps --show" not uses the file patterns to filter the result with them
author Franz Glasner <fzglas.hg@dom66.de>
date Sat, 02 Mar 2019 11:51:36 +0100
parents 1b3671d1e57d
children 655dd5b0bcd3
files extensions/timestamps.py
diffstat 1 files changed, 6 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/extensions/timestamps.py	Mon Feb 25 09:36:28 2019 +0100
+++ b/extensions/timestamps.py	Sat Mar 02 11:51:36 2019 +0100
@@ -188,7 +188,8 @@
                             destdir=destdir)
     elif opts.get("show"):
         with ui.formatter("timestamps", opts) as fm:
-            _show_timestamps(ui, ctx, fm, tsconfig=opts.get("tsconfig"))
+            _show_timestamps(ui, ctx, patsmatch, fm,
+                             tsconfig=opts.get("tsconfig"))
     else:
         raise error.Abort(_("must give a command:"
                             "--save or --restore, --show or --import"))
@@ -498,7 +499,7 @@
     _do_restore_timestamps(repo, ctx, matcher, ts, ui=ui, destdir=destdir)
 
 
-def _show_timestamps(ui, ctx, formatter,
+def _show_timestamps(ui, ctx, pats, formatter,
                      tsconfig=None):
 
     def _tsv(v):
@@ -539,7 +540,9 @@
             "",
             "   \n")
         formatter.condwrite(
-            ui.debugflag or not f.startswith("/"),
+            ui.debugflag \
+            or (pats.always() and not f.startswith("/")) \
+            or (not pats.always() and pats(f)),
             "match date file",
             " %s %s\t%s\n",
             '*' if tsconfmatch(f) else ' ',