Mercurial > public > mercurial-scm > hg-stable
diff tests/test-subrepo-missing.t @ 20319:427d672c0e4e stable
subrepo: make it possible to update to hidden subrepo revisions
When a subrepo revision was hidden it was considered missing and mercurial was
unable to update to the corresponding parent revision. Instead warn the user of
the problem and let it choose what to do (the default is to udpate anyway).
author | Angel Ezquerra <angel.ezquerra@gmail.com> |
---|---|
date | Sun, 24 Nov 2013 02:17:17 +0100 |
parents | 4f8054d3171b |
children | fab9dda0f2a3 |
line wrap: on
line diff
--- a/tests/test-subrepo-missing.t Sun Nov 24 02:13:00 2013 +0100 +++ b/tests/test-subrepo-missing.t Sun Nov 24 02:17:17 2013 +0100 @@ -68,4 +68,35 @@ $ ls subrepo a +Enable obsolete + + $ cat > ${TESTTMP}/obs.py << EOF + > import mercurial.obsolete + > mercurial.obsolete._enabled = True + > EOF + $ cat >> $HGRCPATH << EOF + > [ui] + > logtemplate= {rev}:{node|short} {desc|firstline} + > [phases] + > publish=False + > [extensions]' + > obs=${TESTTMP}/obs.py + > EOF + +check that we can update parent repo with missing (amended) subrepo revision + + $ hg up --repository subrepo -r tip + 1 files updated, 0 files merged, 0 files removed, 0 files unresolved + $ hg ci -m "updated subrepo to tip" + created new head + $ cd subrepo + $ hg update -r tip + 0 files updated, 0 files merged, 0 files removed, 0 files unresolved + $ echo foo > a + $ hg commit --amend -m "addb (amended)" $ cd .. + $ hg update --clean . + revision 102a90ea7b4a in subrepo subrepo is hidden + 1 files updated, 0 files merged, 0 files removed, 0 files unresolved + + $ cd ..