##// END OF EJS Templates
narrow: validate spec files are well-formed during clone (BC)...
Gregory Szorc -
r39577:8301741e default
parent child Browse files
Show More
@@ -102,6 +102,9 b' def clonenarrowcmd(orig, ui, repo, *args'
102 102 raise error.Abort(_("cannot specify other files using '%include' in"
103 103 " narrowspec"))
104 104
105 narrowspec.validatepatterns(includes)
106 narrowspec.validatepatterns(excludes)
107
105 108 # narrowspec is passed so we should assume that user wants narrow clone
106 109 opts_narrow = True
107 110 opts['include'].extend(includes)
@@ -130,7 +130,7 b' Testing the --narrowspec flag to clone'
130 130 > %include foo
131 131 > [include]
132 132 > path:dir/tests/
133 > file:dir/src/f12
133 > path:file:dir/src/f12
134 134 > EOF
135 135
136 136 $ hg clone ssh://user@dummy/master specfile --narrowspec narrowspecs
@@ -141,7 +141,7 b' Testing the --narrowspec flag to clone'
141 141 $ cat > narrowspecs <<EOF
142 142 > [include]
143 143 > path:dir/tests/
144 > file:dir/src/f12
144 > path:file:dir/src/f12
145 145 > EOF
146 146
147 147 $ hg clone ssh://user@dummy/master specfile --narrowspec narrowspecs
@@ -239,7 +239,7 b' Testing the --narrowspec flag to clone'
239 239 > %include foo
240 240 > [include]
241 241 > path:dir/tests/
242 > dir/src/f12
242 > path:file:dir/src/f12
243 243 > EOF
244 244
245 245 $ hg clone ssh://user@dummy/master specfile --narrowspec narrowspecs
@@ -250,7 +250,7 b' Testing the --narrowspec flag to clone'
250 250 $ cat > narrowspecs <<EOF
251 251 > [include]
252 252 > path:dir/tests/
253 > file:dir/src/f12
253 > path:file:dir/src/f12
254 254 > EOF
255 255
256 256 $ hg clone ssh://user@dummy/master specfile --narrowspec narrowspecs
@@ -278,7 +278,6 b' Narrow spec with invalid patterns is rej'
278 278
279 279 $ hg clone ssh://user@dummy/master badspecfile --narrowspec narrowspecs
280 280 reading narrowspec from '$TESTTMP/narrowspecs'
281 requesting all changes
282 281 abort: invalid prefix on narrow pattern: glob:**
283 282 (narrow patterns must begin with one of the following: path:, rootfilesin:)
284 283 [255]
General Comments 0
You need to be logged in to leave comments. Login now