Mercurial > hgbook
changeset 161:7f07aca44938
Write up the unpleasant effects of change ef1f1a4b2efb in the hg tree.
author | Bryan O'Sullivan <bos@serpentine.com> |
---|---|
date | Mon, 26 Mar 2007 21:58:24 -0700 |
parents | 745ff473c8c4 |
children | 3fb7a7841181 d3dd1bedba3c |
files | en/examples/filenames.glob.range.out en/filenames.tex |
diffstat | 2 files changed, 13 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- 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
--- 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