test-mq-subrepo-svn.t
51 lines
| 1.2 KiB
| text/troff
|
Tads3Lexer
/ tests / test-mq-subrepo-svn.t
Kevin Bullock
|
r13300 | $ "$TESTDIR/hghave" svn || exit 80 | ||
$ echo "[extensions]" >> $HGRCPATH | ||||
$ echo "mq=" >> $HGRCPATH | ||||
$ echo "[diff]" >> $HGRCPATH | ||||
$ echo "nodates=1" >> $HGRCPATH | ||||
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 | ||||
$ curpath=`pwd | tr '\\\\' /` | ||||
$ expr "$svnpath" : "\/" > /dev/null | ||||
> if [ $? -ne 0 ]; then | ||||
> curpath="/$curpath" | ||||
> fi | ||||
$ svnurl="file://$curpath/svn-repo-2499/project" | ||||
$ mkdir -p svn-project-2499/trunk | ||||
$ svn import -m 'init project' svn-project-2499 "$svnurl" | ||||
Adding svn-project-2499/trunk | ||||
Committed revision 1. | ||||
qnew on repo w/svn subrepo | ||||
$ mkrepo repo-2499-svn-subrepo | ||||
$ svn co "$svnurl"/trunk sub | ||||
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 | ||||
committing subrepository sub | ||||
$ 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 | ||||
abort: uncommitted changes in subrepository sub | ||||
[255] | ||||