Mercurial > hg
comparison tests/test-subrepo @ 10522:b07d487009b2 stable
subrepo: Update .hgsubstate in case of deleted subrepo
When a subrepo is deleted from .hgsub, it also needs to be removed from
.hgsubstate. Previous code was updating .hgsubstate only in case of newly or
modified subrepo.
author | Saint Germain <saintger@gmail.com> |
---|---|
date | Mon, 22 Feb 2010 01:19:59 +0100 |
parents | 2250fc372d34 |
children | 05856e682521 c52057614c72 |
comparison
equal
deleted
inserted
replaced
10521:bde1bb250fc2 | 10522:b07d487009b2 |
---|---|
160 | 160 |
161 hg up 5 | 161 hg up 5 |
162 hg merge 4 # try to merge default into br again | 162 hg merge 4 # try to merge default into br again |
163 cd .. | 163 cd .. |
164 | 164 |
165 echo % test subrepo delete from .hgsubstate | |
166 hg init testdelete | |
167 mkdir testdelete/nested testdelete/nested2 | |
168 hg init testdelete/nested | |
169 hg init testdelete/nested2 | |
170 echo test > testdelete/nested/foo | |
171 echo test > testdelete/nested2/foo | |
172 hg -R testdelete/nested add | |
173 hg -R testdelete/nested2 add | |
174 hg -R testdelete/nested ci -m test | |
175 hg -R testdelete/nested2 ci -m test | |
176 echo nested = nested > testdelete/.hgsub | |
177 echo nested2 = nested2 >> testdelete/.hgsub | |
178 hg -R testdelete add | |
179 hg -R testdelete ci -m "nested 1 & 2 added" | |
180 echo nested = nested > testdelete/.hgsub | |
181 hg -R testdelete ci -m "nested 2 deleted" | |
182 cat testdelete/.hgsubstate | sed "s:.* ::" | |
183 hg -R testdelete remove testdelete/.hgsub | |
184 hg -R testdelete ci -m ".hgsub deleted" | |
185 cat testdelete/.hgsubstate | |
186 | |
165 echo % test repository cloning | 187 echo % test repository cloning |
166 mkdir mercurial mercurial2 | 188 mkdir mercurial mercurial2 |
167 hg init nested_absolute | 189 hg init nested_absolute |
168 echo test > nested_absolute/foo | 190 echo test > nested_absolute/foo |
169 hg -R nested_absolute add | 191 hg -R nested_absolute add |