cat: record the current behavior of wildcard matches in subrepos stable
authorYuya Nishihara <yuya@tcha.org>
Sat, 25 Nov 2017 15:29:34 +0900
branchstable
changeset 35165 27196b7fc1ac
parent 35111 62539b425347
child 35166 ba6324ee49e9
cat: record the current behavior of wildcard matches in subrepos Mercurial subrepos support any match patterns.
mercurial/help/subrepos.txt
tests/test-subrepo.t
--- a/mercurial/help/subrepos.txt	Wed Nov 29 17:49:08 2017 -0500
+++ b/mercurial/help/subrepos.txt	Sat Nov 25 15:29:34 2017 +0900
@@ -90,7 +90,7 @@
 :archive: archive does not recurse in subrepositories unless
     -S/--subrepos is specified.
 
-:cat: cat currently only handles exact file matches in subrepos.
+:cat: Git subrepositories only support exact file matches.
     Subversion subrepositories are currently ignored.
 
 :commit: commit creates a consistent snapshot of the state of the
--- a/tests/test-subrepo.t	Wed Nov 29 17:49:08 2017 -0500
+++ b/tests/test-subrepo.t	Sat Nov 25 15:29:34 2017 +0900
@@ -1071,6 +1071,18 @@
     "path": "sub/repo/foo"
    }
   ]
+
+ non-exact match:
+
+  $ hg cat -T '{path}\n' 'glob:**'
+  .hgsub
+  .hgsubstate
+  sub/repo/foo (glob)
+  $ hg cat -T '{path}\n' 're:^sub'
+  sub/repo/foo (glob)
+
+ missing subrepos in working directory:
+
   $ mkdir -p tmp/sub/repo
   $ hg cat -r 0 --output tmp/%p_p sub/repo/foo
   $ cat tmp/sub/repo/foo_p