##// END OF EJS Templates
rhg: fix the bug where sparse config is interpreted as relglob instead of glob...
Arseniy Alekseyev -
r51714:28c0fcff stable
parent child Browse files
Show More
@@ -282,7 +282,7 b' pub fn matcher('
282 let (patterns, subwarnings) = parse_pattern_file_contents(
282 let (patterns, subwarnings) = parse_pattern_file_contents(
283 &config.includes,
283 &config.includes,
284 Path::new(""),
284 Path::new(""),
285 Some(b"relglob:".as_ref()),
285 Some(b"glob:".as_ref()),
286 false,
286 false,
287 )?;
287 )?;
288 warnings.extend(subwarnings.into_iter().map(From::from));
288 warnings.extend(subwarnings.into_iter().map(From::from));
@@ -292,7 +292,7 b' pub fn matcher('
292 let (patterns, subwarnings) = parse_pattern_file_contents(
292 let (patterns, subwarnings) = parse_pattern_file_contents(
293 &config.excludes,
293 &config.excludes,
294 Path::new(""),
294 Path::new(""),
295 Some(b"relglob:".as_ref()),
295 Some(b"glob:".as_ref()),
296 false,
296 false,
297 )?;
297 )?;
298 warnings.extend(subwarnings.into_iter().map(From::from));
298 warnings.extend(subwarnings.into_iter().map(From::from));
@@ -21,6 +21,29 b' test sparse'
21 Verify basic --include
21 Verify basic --include
22
22
23 $ hg up -q 0
23 $ hg up -q 0
24
25 Test that sparse pattern by default is interpreted as "glob:", and is interpreted relative to the root.
26
27 $ hg debugsparse --reset
28 $ hg debugsparse -X 'foo*bar'
29 $ cat .hg/sparse
30 [exclude]
31 foo*bar
32
33 $ mk() { mkdir -p "$1"; touch "$1"/"$2"; }
34 $ mk 'foo' bar
35 $ mk 'foo-bar' x
36 $ mk 'unanchoredfoo-bar' x
37 $ mk 'foo*bar' x
38 $ mk 'dir/foo-bar' x
39 $ hg status --config rhg.on-unsupported=abort
40 ? dir/foo-bar/x
41 ? foo/bar
42 ? unanchoredfoo-bar/x
43 $ hg clean -a --no-confirm
44 $ rm -r foo*bar
45 $ hg debugsparse --reset
46
24 $ hg debugsparse --include 'hide'
47 $ hg debugsparse --include 'hide'
25 $ ls -A
48 $ ls -A
26 .hg
49 .hg
General Comments 0
You need to be logged in to leave comments. Login now