##// 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 raise error.Abort(_("cannot specify other files using '%include' in"
102 raise error.Abort(_("cannot specify other files using '%include' in"
103 " narrowspec"))
103 " narrowspec"))
104
104
105 narrowspec.validatepatterns(includes)
106 narrowspec.validatepatterns(excludes)
107
105 # narrowspec is passed so we should assume that user wants narrow clone
108 # narrowspec is passed so we should assume that user wants narrow clone
106 opts_narrow = True
109 opts_narrow = True
107 opts['include'].extend(includes)
110 opts['include'].extend(includes)
@@ -130,7 +130,7 b' Testing the --narrowspec flag to clone'
130 > %include foo
130 > %include foo
131 > [include]
131 > [include]
132 > path:dir/tests/
132 > path:dir/tests/
133 > file:dir/src/f12
133 > path:file:dir/src/f12
134 > EOF
134 > EOF
135
135
136 $ hg clone ssh://user@dummy/master specfile --narrowspec narrowspecs
136 $ hg clone ssh://user@dummy/master specfile --narrowspec narrowspecs
@@ -141,7 +141,7 b' Testing the --narrowspec flag to clone'
141 $ cat > narrowspecs <<EOF
141 $ cat > narrowspecs <<EOF
142 > [include]
142 > [include]
143 > path:dir/tests/
143 > path:dir/tests/
144 > file:dir/src/f12
144 > path:file:dir/src/f12
145 > EOF
145 > EOF
146
146
147 $ hg clone ssh://user@dummy/master specfile --narrowspec narrowspecs
147 $ hg clone ssh://user@dummy/master specfile --narrowspec narrowspecs
@@ -239,7 +239,7 b' Testing the --narrowspec flag to clone'
239 > %include foo
239 > %include foo
240 > [include]
240 > [include]
241 > path:dir/tests/
241 > path:dir/tests/
242 > dir/src/f12
242 > path:file:dir/src/f12
243 > EOF
243 > EOF
244
244
245 $ hg clone ssh://user@dummy/master specfile --narrowspec narrowspecs
245 $ hg clone ssh://user@dummy/master specfile --narrowspec narrowspecs
@@ -250,7 +250,7 b' Testing the --narrowspec flag to clone'
250 $ cat > narrowspecs <<EOF
250 $ cat > narrowspecs <<EOF
251 > [include]
251 > [include]
252 > path:dir/tests/
252 > path:dir/tests/
253 > file:dir/src/f12
253 > path:file:dir/src/f12
254 > EOF
254 > EOF
255
255
256 $ hg clone ssh://user@dummy/master specfile --narrowspec narrowspecs
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 $ hg clone ssh://user@dummy/master badspecfile --narrowspec narrowspecs
279 $ hg clone ssh://user@dummy/master badspecfile --narrowspec narrowspecs
280 reading narrowspec from '$TESTTMP/narrowspecs'
280 reading narrowspec from '$TESTTMP/narrowspecs'
281 requesting all changes
282 abort: invalid prefix on narrow pattern: glob:**
281 abort: invalid prefix on narrow pattern: glob:**
283 (narrow patterns must begin with one of the following: path:, rootfilesin:)
282 (narrow patterns must begin with one of the following: path:, rootfilesin:)
284 [255]
283 [255]
General Comments 0
You need to be logged in to leave comments. Login now