test-mq-subrepo-svn.t
56 lines
| 1.2 KiB
| text/troff
|
Tads3Lexer
/ tests / test-mq-subrepo-svn.t
Matt Mackall
|
r22046 | #require svn13 | ||
Kevin Bullock
|
r13300 | |||
Yuya Nishihara
|
r23172 | $ cat <<EOF >> $HGRCPATH | ||
> [extensions] | ||||
> mq = | ||||
> [diff] | ||||
> nodates = 1 | ||||
Yuya Nishihara
|
r34988 | > [subrepos] | ||
Gregory Szorc
|
r34990 | > allowed = true | ||
> svn:allowed = true | ||||
Yuya Nishihara
|
r23172 | > EOF | ||
Kevin Bullock
|
r13300 | |||
Kevin Bullock
|
r13326 | fn to create new repository, and cd into it | ||
Kevin Bullock
|
r13300 | $ mkrepo() { | ||
> hg init $1 | ||||
> cd $1 | ||||
> hg qinit | ||||
> } | ||||
handle svn subrepos safely | ||||
$ svnadmin create svn-repo-2499 | ||||
Mads Kiilerich
|
r17033 | |||
$ SVNREPOPATH=`pwd`/svn-repo-2499/project | ||||
#if windows | ||||
Augie Fackler
|
r22947 | $ SVNREPOURL=file:///`$PYTHON -c "import urllib, sys; sys.stdout.write(urllib.quote(sys.argv[1]))" "$SVNREPOPATH"` | ||
Mads Kiilerich
|
r17033 | #else | ||
Augie Fackler
|
r22947 | $ SVNREPOURL=file://`$PYTHON -c "import urllib, sys; sys.stdout.write(urllib.quote(sys.argv[1]))" "$SVNREPOPATH"` | ||
Mads Kiilerich
|
r17033 | #endif | ||
Kevin Bullock
|
r13300 | $ mkdir -p svn-project-2499/trunk | ||
Yuya Nishihara
|
r26374 | $ svn import -qm 'init project' svn-project-2499 "$SVNREPOURL" | ||
Kevin Bullock
|
r13300 | |||
qnew on repo w/svn subrepo | ||||
$ mkrepo repo-2499-svn-subrepo | ||||
Mads Kiilerich
|
r17033 | $ svn co "$SVNREPOURL"/trunk sub | ||
Kevin Bullock
|
r13300 | Checked out revision 1. | ||
$ echo 'sub = [svn]sub' >> .hgsub | ||||
$ hg add .hgsub | ||||
Matt Mackall
|
r13410 | $ hg status -S -X '**/format' | ||
Kevin Bullock
|
r13300 | A .hgsub | ||
$ hg qnew -m0 0.diff | ||||
$ cd sub | ||||
$ echo a > a | ||||
$ svn add a | ||||
A a | ||||
$ svn st | ||||
Matt Mackall
|
r13410 | A* a (glob) | ||
Kevin Bullock
|
r13300 | $ cd .. | ||
$ hg status -S # doesn't show status for svn subrepos (yet) | ||||
$ hg qnew -m1 1.diff | ||||
Matt Harbison
|
r33365 | abort: uncommitted changes in subrepository "sub" | ||
Kevin Bullock
|
r13300 | [255] | ||
Mads Kiilerich
|
r16913 | |||
$ cd .. | ||||