Mercurial > public > mercurial-scm > hg-stable
diff tests/test-subrepo-git.t @ 14469:2fdea636f254 stable
subrepo: don't crash when git .hgsubstate is empty (issue2716)
author | Eric Eisner <ede@alum.mit.edu> |
---|---|
date | Sat, 28 May 2011 11:03:48 -0400 |
parents | dea6efdd7ec4 |
children | b2ee161328e0 |
line wrap: on
line diff
--- a/tests/test-subrepo-git.t Thu May 19 18:09:25 2011 +0200 +++ b/tests/test-subrepo-git.t Sat May 28 11:03:48 2011 -0400 @@ -334,6 +334,33 @@ $ hg sum | grep commit commit: (clean) +Don't crash if the .hgsubstate entry is missing + + $ hg update 1 -q + $ hg rm .hgsubstate + $ hg commit .hgsubstate -m 'no substate' + created new head + $ hg tag -l nosubstate + $ hg manifest + .hgsub + a + + $ hg status -S + $ hg sum | grep commit + commit: 1 subrepos + + $ hg commit -m 'restore substate' + committing subrepository s + $ hg manifest + .hgsub + .hgsubstate + a + $ hg sum | grep commit + commit: (clean) + + $ hg update -qC nosubstate + $ ls s + Check hg update --clean $ cd $TESTTMP/ta $ echo > s/g