comparison tests/test-static-http.t @ 33603:075823a6161b stable

test: add tests for branches and tags with static http repo (issue5613) Mercurial currently fails to clone by revision on static http repos with tags. The added tests demonstrate this.
author Gregory Szorc <gregory.szorc@gmail.com>
date Sat, 29 Jul 2017 12:40:05 -0700
parents 75be14993fda
children 8b00c723cee1
comparison
equal deleted inserted replaced
33602:27fbca750b4d 33603:075823a6161b
154 $ cd .. 154 $ cd ..
155 $ mkdir notarepo 155 $ mkdir notarepo
156 $ hg clone static-http://localhost:$HGPORT/notarepo local3 156 $ hg clone static-http://localhost:$HGPORT/notarepo local3
157 abort: 'http://localhost:$HGPORT/notarepo' does not appear to be an hg repository! 157 abort: 'http://localhost:$HGPORT/notarepo' does not appear to be an hg repository!
158 [255] 158 [255]
159
160 Clone with tags and branches works
161
162 $ hg init remote-with-names
163 $ cd remote-with-names
164 $ echo 0 > foo
165 $ hg -q commit -A -m initial
166 $ echo 1 > foo
167 $ hg commit -m 'commit 1'
168 $ hg -q up 0
169 $ hg branch mybranch
170 marked working directory as branch mybranch
171 (branches are permanent and global, did you want a bookmark?)
172 $ echo 2 > foo
173 $ hg commit -m 'commit 2 (mybranch)'
174 $ hg tag -r 1 'default-tag'
175 $ hg tag -r 2 'branch-tag'
176
177 $ cd ..
178
179 $ hg clone static-http://localhost:$HGPORT/remote-with-names local-with-names
180 requesting all changes
181 adding changesets
182 adding manifests
183 adding file changes
184 added 5 changesets with 5 changes to 2 files (+1 heads)
185 updating to branch default
186 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
187
188 Clone a specific branch works
189
190 $ hg clone -r mybranch static-http://localhost:$HGPORT/remote-with-names local-with-names-branch 2> /dev/null
191 [1]
192
193 Clone a specific tag works
194
195 $ hg clone -r default-tag static-http://localhost:$HGPORT/remote-with-names local-with-names-tag 2> /dev/null
196 [1]
197
159 $ killdaemons.py 198 $ killdaemons.py