Mercurial > hg-onsub
view test-onsub-mixed.t @ 17:5ea3f7533ec5
Exposed new environment variable with the subrepo type.
Updated test.
Added a test for mixed subrepo cases.
author | Ludovic Chabant <ludovic@chabant.com> |
---|---|
date | Tue, 27 Mar 2012 16:53:23 -0700 |
parents | |
children | d920e3425db5 |
line wrap: on
line source
Load extension: $ echo "[extensions]" >> $HGRCPATH $ echo "onsub = $TESTDIR/onsub.py" >> $HGRCPATH Create some nicely nested subrepositories with mixed types: $ hg init $ for d in a b; do hg init $d; echo "$d = $d" >> .hgsub; done $ git init -q git-i $ cd git-i $ git config core.autocrlf false $ echo something > something $ git add something $ git commit -q -m init $ cd .. $ echo "git-i = [git]$git-i" >> .hgsub $ hg add .hgsub $ cd a $ git init -q git-j $ cd git-j $ git config core.autocrlf false $ echo something > something $ git add something $ git commit -q -m init $ cd .. $ echo "git-j = [git]git-j" >> .hgsub $ hg add .hgsub $ cd .. $ hg commit -m init -S committing subrepository a committing subrepository a/git-j committing subrepository b committing subrepository git-i Test the subrepo type $ hg onsub 'echo $HG_SUBPATH = $HG_SUBTYPE' a = hg a/git-j = git b = hg git-i = git Test the subrepo type including the root repository $ hg onsub 'echo $HG_SUBPATH = $HG_SUBTYPE' --root-repo . = hg a = hg a/git-j = git b = hg git-i = git