Mercurial > hg-onsub
view test-onsub-mixed.t @ 18:d920e3425db5
Added parameter to filter the type of subrepo to loop through.
Added tests.
author | Ludovic Chabant <ludovic@chabant.com> |
---|---|
date | Thu, 29 Mar 2012 16:18:57 -0700 |
parents | 5ea3f7533ec5 |
children |
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 Test the type filter $ hg onsub 'echo $HG_SUBPATH' -t hg a b $ hg onsub 'echo $HG_SUBPATH' -t git a/git-j git-i Test the type filter including the root repository $ hg onsub 'echo $HG_SUBPATH' -t hg --root-repo . a b $ hg onsub 'echo $HG_SUBPATH' -t git --root-repo a/git-j git-i