[PATCH] subrepo: separate out mq+svn subrepo tests

Kevin Bullock kbullock+mercurial at ringworld.org
Mon Jan 10 15:06:52 CST 2011


# HG changeset patch
# User Kevin Bullock <kbullock at ringworld.org>
# Date 1294693361 18000
# Node ID 7270497f067ad8a5a9f28699547dd8cb0c28a19f
# Parent  af50a62e9c2040dcdaf61ba6a6400bb45ab56410
subrepo: separate out mq+svn subrepo tests

Having the mq+subrepo+svn tests in a separate file lets them be skipped
without skipping the other mq+subrepo tests.

diff -r af50a62e9c20 -r 7270497f067a tests/test-mq-subrepo-svn.t
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/test-mq-subrepo-svn.t	Mon Jan 10 16:02:41 2011 -0500
@@ -0,0 +1,52 @@
+  $ "$TESTDIR/hghave" svn || exit 80
+
+  $ echo "[extensions]" >> $HGRCPATH
+  $ echo "mq=" >> $HGRCPATH
+  $ echo "[diff]" >> $HGRCPATH
+  $ echo "nodates=1" >> $HGRCPATH
+
+fn to create new repository w/dirty subrepo, and cd into it
+  $ 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
+  $ hg status -S
+  A .hgsub
+  ? sub/.svn/entries
+  $ hg qnew -m0 0.diff
+  committing subrepository sub
+  $ cd sub
+  $ echo a > a
+  $ svn add a
+  A         a
+  $ svn st
+  A       a
+  $ cd ..
+  $ hg status -S        # doesn't show status for svn subrepos (yet)
+  $ hg qnew -m1 1.diff
+  abort: uncommitted changes in subrepository sub
+  [255]
diff -r af50a62e9c20 -r 7270497f067a tests/test-mq-subrepo.t
--- a/tests/test-mq-subrepo.t	Sat Jan 08 22:15:19 2011 -0600
+++ b/tests/test-mq-subrepo.t	Mon Jan 10 16:02:41 2011 -0500
@@ -1,5 +1,3 @@
-  $ "$TESTDIR/hghave" svn || exit 80
-
   $ echo "[extensions]" >> $HGRCPATH
   $ echo "mq=" >> $HGRCPATH
   $ echo "record=" >> $HGRCPATH
@@ -347,42 +345,3 @@
   % debugsub should be empty
 
   $ cd ..
-
-
-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
-  $ hg status -S
-  A .hgsub
-  ? sub/.svn/entries
-  $ hg qnew -m0 0.diff
-  committing subrepository sub
-  $ cd sub
-  $ echo a > a
-  $ svn add a
-  A         a
-  $ svn st
-  A       a
-  $ cd ..
-  $ hg status -S        # doesn't show status for svn subrepos (yet)
-  $ hg qnew -m1 1.diff
-  abort: uncommitted changes in subrepository sub
-  [255]


More information about the Mercurial-devel mailing list