Show More
@@ -100,12 +100,12 b' fn validate_patterns(patterns: &[u8]) ->' | |||||
100 | } |
|
100 | } | |
101 | for prefix in VALID_PREFIXES.iter() { |
|
101 | for prefix in VALID_PREFIXES.iter() { | |
102 | if pattern.starts_with(prefix.as_bytes()) { |
|
102 | if pattern.starts_with(prefix.as_bytes()) { | |
103 |
|
|
103 | return Ok(()); | |
104 | } |
|
104 | } | |
105 | return Err(SparseConfigError::InvalidNarrowPrefix( |
|
|||
106 | pattern.to_owned(), |
|
|||
107 | )); |
|
|||
108 | } |
|
105 | } | |
|
106 | return Err(SparseConfigError::InvalidNarrowPrefix( | |||
|
107 | pattern.to_owned(), | |||
|
108 | )); | |||
109 | } |
|
109 | } | |
110 | Ok(()) |
|
110 | Ok(()) | |
111 | } |
|
111 | } |
@@ -28,6 +28,18 b' Only path: and rootfilesin: pattern pref' | |||||
28 | (narrow patterns must begin with one of the following: path:, rootfilesin:) |
|
28 | (narrow patterns must begin with one of the following: path:, rootfilesin:) | |
29 | [255] |
|
29 | [255] | |
30 |
|
30 | |||
|
31 | rootfilesin: patterns work | |||
|
32 | ||||
|
33 | $ hg clone --narrow ssh://user@dummy/master rootfilesin --noupdate --include 'rootfilesin:dir' | |||
|
34 | requesting all changes | |||
|
35 | adding changesets | |||
|
36 | adding manifests | |||
|
37 | adding file changes | |||
|
38 | added 1 changesets with 0 changes to 0 files | |||
|
39 | new changesets 26ce255d5b5d | |||
|
40 | $ hg tracked -R rootfilesin | |||
|
41 | I rootfilesin:dir | |||
|
42 | ||||
31 | narrow clone a file, f10 |
|
43 | narrow clone a file, f10 | |
32 |
|
44 | |||
33 | $ hg clone --narrow ssh://user@dummy/master narrow --noupdate --include "dir/src/f10" |
|
45 | $ hg clone --narrow ssh://user@dummy/master narrow --noupdate --include "dir/src/f10" |
General Comments 0
You need to be logged in to leave comments.
Login now