tests/test-mq-subrepo-svn.t
changeset 13300 23bbb5b888ea
child 13326 535a891284da
equal deleted inserted replaced
13299:f24ea9356e7d 13300:23bbb5b888ea
       
     1   $ "$TESTDIR/hghave" svn || exit 80
       
     2 
       
     3   $ echo "[extensions]" >> $HGRCPATH
       
     4   $ echo "mq=" >> $HGRCPATH
       
     5   $ echo "[diff]" >> $HGRCPATH
       
     6   $ echo "nodates=1" >> $HGRCPATH
       
     7 
       
     8 fn to create new repository w/dirty subrepo, and cd into it
       
     9   $ mkrepo() {
       
    10   >     hg init $1
       
    11   >     cd $1
       
    12   >     hg qinit
       
    13   > }
       
    14 
       
    15 
       
    16 handle svn subrepos safely
       
    17 
       
    18   $ svnadmin create svn-repo-2499
       
    19   $ curpath=`pwd | tr '\\\\' /`
       
    20   $ expr "$svnpath" : "\/" > /dev/null
       
    21   > if [ $? -ne 0 ]; then
       
    22   >   curpath="/$curpath"
       
    23   > fi
       
    24   $ svnurl="file://$curpath/svn-repo-2499/project"
       
    25   $ mkdir -p svn-project-2499/trunk
       
    26   $ svn import -m 'init project' svn-project-2499 "$svnurl"
       
    27   Adding         svn-project-2499/trunk
       
    28   
       
    29   Committed revision 1.
       
    30 
       
    31 qnew on repo w/svn subrepo
       
    32   $ mkrepo repo-2499-svn-subrepo
       
    33   $ svn co "$svnurl"/trunk sub
       
    34   Checked out revision 1.
       
    35   $ echo 'sub = [svn]sub' >> .hgsub
       
    36   $ hg add .hgsub
       
    37   $ hg status -S
       
    38   A .hgsub
       
    39   ? sub/.svn/entries
       
    40   $ hg qnew -m0 0.diff
       
    41   committing subrepository sub
       
    42   $ cd sub
       
    43   $ echo a > a
       
    44   $ svn add a
       
    45   A         a
       
    46   $ svn st
       
    47   A       a
       
    48   $ cd ..
       
    49   $ hg status -S        # doesn't show status for svn subrepos (yet)
       
    50   $ hg qnew -m1 1.diff
       
    51   abort: uncommitted changes in subrepository sub
       
    52   [255]