Mercurial > hg-stable
view tests/test-mq-subrepo-svn.t @ 24586:90e3f5d22dad
templater: add consistent docstrings to functions
The content of "hg help templating" is largely derived from docstrings
on functions providing functionality. Template functions are the long
holdout.
Prepare for generating them dynamically by defining docstrings for all
template functions.
There are numerous ways these docs could be improved. Right now, the
help output simply shows function names and arguments. So literally
any accurate data is better than what is there now.
author | Gregory Szorc <gregory.szorc@gmail.com> |
---|---|
date | Wed, 01 Apr 2015 20:19:43 -0700 |
parents | 1ff35d76421c |
children | 048e41e9a6ac |
line wrap: on
line source
#require svn13 $ cat <<EOF >> $HGRCPATH > [extensions] > mq = > [diff] > nodates = 1 > EOF fn to create new repository, and cd into it $ mkrepo() { > hg init $1 > cd $1 > hg qinit > } handle svn subrepos safely $ svnadmin create svn-repo-2499 $ SVNREPOPATH=`pwd`/svn-repo-2499/project #if windows $ SVNREPOURL=file:///`$PYTHON -c "import urllib, sys; sys.stdout.write(urllib.quote(sys.argv[1]))" "$SVNREPOPATH"` #else $ SVNREPOURL=file://`$PYTHON -c "import urllib, sys; sys.stdout.write(urllib.quote(sys.argv[1]))" "$SVNREPOPATH"` #endif $ mkdir -p svn-project-2499/trunk $ svn import -m 'init project' svn-project-2499 "$SVNREPOURL" Adding svn-project-2499/trunk (glob) Committed revision 1. qnew on repo w/svn subrepo $ mkrepo repo-2499-svn-subrepo $ svn co "$SVNREPOURL"/trunk sub Checked out revision 1. $ echo 'sub = [svn]sub' >> .hgsub $ hg add .hgsub $ hg status -S -X '**/format' A .hgsub $ hg qnew -m0 0.diff $ cd sub $ echo a > a $ svn add a A a $ svn st A* a (glob) $ cd .. $ hg status -S # doesn't show status for svn subrepos (yet) $ hg qnew -m1 1.diff abort: uncommitted changes in subrepository 'sub' [255] $ cd ..