tests/test-mq-subrepo-svn.t
author Raphaël Gomès <rgomes@octobus.net>
Tue, 05 Apr 2022 17:11:36 +0200
branchstable
changeset 49006 5bd6bcd31dd1
parent 41496 e095a9688a31
child 49416 075a553028e2
permissions -rw-r--r--
relnotes: add notes for 6.1.1 This also fixes the header for 6.1 from 6.1rc0

#require svn13

  $ cat <<EOF >> $HGRCPATH
  > [extensions]
  > mq =
  > [diff]
  > nodates = 1
  > [subrepos]
  > allowed = true
  > svn:allowed = true
  > 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
  $ SVNREPOURL="`"$PYTHON" $TESTDIR/svnurlof.py \"$SVNREPOPATH\"`"

  $ mkdir -p svn-project-2499/trunk
  $ svn import -qm 'init project' svn-project-2499 "$SVNREPOURL"

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 ..