# HG changeset patch # User Bryan O'Sullivan # Date 1174971504 25200 # Node ID 7f07aca44938d38b30ae8713946346123cdf97b6 # Parent 745ff473c8c466c4e09d2594b1a837691a847293 Write up the unpleasant effects of change ef1f1a4b2efb in the hg tree. diff -r 745ff473c8c4 -r 7f07aca44938 en/examples/filenames.glob.range.out --- a/en/examples/filenames.glob.range.out Mon Mar 26 21:25:34 2007 -0700 +++ b/en/examples/filenames.glob.range.out Mon Mar 26 21:58:24 2007 -0700 @@ -1,3 +1,7 @@ $ \textbf{hg status 'glob:**[nr-t]'} +A examples/simple.py ? MANIFEST.in +? examples/performant.py +? src/watcher/_watcher.c +? src/watcher/watcher.py ? src/xyzzy.txt diff -r 745ff473c8c4 -r 7f07aca44938 en/filenames.tex --- a/en/filenames.tex Mon Mar 26 21:25:34 2007 -0700 +++ b/en/filenames.tex Mon Mar 26 21:58:24 2007 -0700 @@ -152,6 +152,15 @@ token. This small example illustrates the difference between the two. \interaction{filenames.glob.star-starstar} +When you're writing a glob pattern, bear in mind that Mercurial will +treat a pattern that matches a directory name as ``match every file +under that directory''. For example, a glob pattern of +``\texttt{**c}'' means \emph{both} ``match files ending in +`\texttt{c}''' ``any file under all directories that end in +`\texttt{c}'''. I personally find this behaviour counterintuitive. +If you need to write a pattern that means ``match \emph{only} files'', +you'll need to express it as a regular expression instead; see below. + \subsection{Regular expression matching with \texttt{re} patterns} Mercurial accepts the same regular expression syntax as the Python