tests/test-mq-subrepo-svn.t
author Kevin Bullock <kbullock@ringworld.org>
Thu, 27 Jan 2011 15:51:26 -0600
changeset 13326 535a891284da
parent 13300 23bbb5b888ea
child 13410 1f2b2c33d386
permissions -rw-r--r--
test-subrepo-mq-svn.t: correct comment This fixes the description of a helper function in the test.
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
13300
23bbb5b888ea subrepo: separate out mq+svn subrepo tests
Kevin Bullock <kbullock@ringworld.org>
parents:
diff changeset
     1
  $ "$TESTDIR/hghave" svn || exit 80
23bbb5b888ea subrepo: separate out mq+svn subrepo tests
Kevin Bullock <kbullock@ringworld.org>
parents:
diff changeset
     2
23bbb5b888ea subrepo: separate out mq+svn subrepo tests
Kevin Bullock <kbullock@ringworld.org>
parents:
diff changeset
     3
  $ echo "[extensions]" >> $HGRCPATH
23bbb5b888ea subrepo: separate out mq+svn subrepo tests
Kevin Bullock <kbullock@ringworld.org>
parents:
diff changeset
     4
  $ echo "mq=" >> $HGRCPATH
23bbb5b888ea subrepo: separate out mq+svn subrepo tests
Kevin Bullock <kbullock@ringworld.org>
parents:
diff changeset
     5
  $ echo "[diff]" >> $HGRCPATH
23bbb5b888ea subrepo: separate out mq+svn subrepo tests
Kevin Bullock <kbullock@ringworld.org>
parents:
diff changeset
     6
  $ echo "nodates=1" >> $HGRCPATH
23bbb5b888ea subrepo: separate out mq+svn subrepo tests
Kevin Bullock <kbullock@ringworld.org>
parents:
diff changeset
     7
13326
535a891284da test-subrepo-mq-svn.t: correct comment
Kevin Bullock <kbullock@ringworld.org>
parents: 13300
diff changeset
     8
fn to create new repository, and cd into it
13300
23bbb5b888ea subrepo: separate out mq+svn subrepo tests
Kevin Bullock <kbullock@ringworld.org>
parents:
diff changeset
     9
  $ mkrepo() {
23bbb5b888ea subrepo: separate out mq+svn subrepo tests
Kevin Bullock <kbullock@ringworld.org>
parents:
diff changeset
    10
  >     hg init $1
23bbb5b888ea subrepo: separate out mq+svn subrepo tests
Kevin Bullock <kbullock@ringworld.org>
parents:
diff changeset
    11
  >     cd $1
23bbb5b888ea subrepo: separate out mq+svn subrepo tests
Kevin Bullock <kbullock@ringworld.org>
parents:
diff changeset
    12
  >     hg qinit
23bbb5b888ea subrepo: separate out mq+svn subrepo tests
Kevin Bullock <kbullock@ringworld.org>
parents:
diff changeset
    13
  > }
23bbb5b888ea subrepo: separate out mq+svn subrepo tests
Kevin Bullock <kbullock@ringworld.org>
parents:
diff changeset
    14
23bbb5b888ea subrepo: separate out mq+svn subrepo tests
Kevin Bullock <kbullock@ringworld.org>
parents:
diff changeset
    15
23bbb5b888ea subrepo: separate out mq+svn subrepo tests
Kevin Bullock <kbullock@ringworld.org>
parents:
diff changeset
    16
handle svn subrepos safely
23bbb5b888ea subrepo: separate out mq+svn subrepo tests
Kevin Bullock <kbullock@ringworld.org>
parents:
diff changeset
    17
23bbb5b888ea subrepo: separate out mq+svn subrepo tests
Kevin Bullock <kbullock@ringworld.org>
parents:
diff changeset
    18
  $ svnadmin create svn-repo-2499
23bbb5b888ea subrepo: separate out mq+svn subrepo tests
Kevin Bullock <kbullock@ringworld.org>
parents:
diff changeset
    19
  $ curpath=`pwd | tr '\\\\' /`
23bbb5b888ea subrepo: separate out mq+svn subrepo tests
Kevin Bullock <kbullock@ringworld.org>
parents:
diff changeset
    20
  $ expr "$svnpath" : "\/" > /dev/null
23bbb5b888ea subrepo: separate out mq+svn subrepo tests
Kevin Bullock <kbullock@ringworld.org>
parents:
diff changeset
    21
  > if [ $? -ne 0 ]; then
23bbb5b888ea subrepo: separate out mq+svn subrepo tests
Kevin Bullock <kbullock@ringworld.org>
parents:
diff changeset
    22
  >   curpath="/$curpath"
23bbb5b888ea subrepo: separate out mq+svn subrepo tests
Kevin Bullock <kbullock@ringworld.org>
parents:
diff changeset
    23
  > fi
23bbb5b888ea subrepo: separate out mq+svn subrepo tests
Kevin Bullock <kbullock@ringworld.org>
parents:
diff changeset
    24
  $ svnurl="file://$curpath/svn-repo-2499/project"
23bbb5b888ea subrepo: separate out mq+svn subrepo tests
Kevin Bullock <kbullock@ringworld.org>
parents:
diff changeset
    25
  $ mkdir -p svn-project-2499/trunk
23bbb5b888ea subrepo: separate out mq+svn subrepo tests
Kevin Bullock <kbullock@ringworld.org>
parents:
diff changeset
    26
  $ svn import -m 'init project' svn-project-2499 "$svnurl"
23bbb5b888ea subrepo: separate out mq+svn subrepo tests
Kevin Bullock <kbullock@ringworld.org>
parents:
diff changeset
    27
  Adding         svn-project-2499/trunk
23bbb5b888ea subrepo: separate out mq+svn subrepo tests
Kevin Bullock <kbullock@ringworld.org>
parents:
diff changeset
    28
  
23bbb5b888ea subrepo: separate out mq+svn subrepo tests
Kevin Bullock <kbullock@ringworld.org>
parents:
diff changeset
    29
  Committed revision 1.
23bbb5b888ea subrepo: separate out mq+svn subrepo tests
Kevin Bullock <kbullock@ringworld.org>
parents:
diff changeset
    30
23bbb5b888ea subrepo: separate out mq+svn subrepo tests
Kevin Bullock <kbullock@ringworld.org>
parents:
diff changeset
    31
qnew on repo w/svn subrepo
23bbb5b888ea subrepo: separate out mq+svn subrepo tests
Kevin Bullock <kbullock@ringworld.org>
parents:
diff changeset
    32
  $ mkrepo repo-2499-svn-subrepo
23bbb5b888ea subrepo: separate out mq+svn subrepo tests
Kevin Bullock <kbullock@ringworld.org>
parents:
diff changeset
    33
  $ svn co "$svnurl"/trunk sub
23bbb5b888ea subrepo: separate out mq+svn subrepo tests
Kevin Bullock <kbullock@ringworld.org>
parents:
diff changeset
    34
  Checked out revision 1.
23bbb5b888ea subrepo: separate out mq+svn subrepo tests
Kevin Bullock <kbullock@ringworld.org>
parents:
diff changeset
    35
  $ echo 'sub = [svn]sub' >> .hgsub
23bbb5b888ea subrepo: separate out mq+svn subrepo tests
Kevin Bullock <kbullock@ringworld.org>
parents:
diff changeset
    36
  $ hg add .hgsub
23bbb5b888ea subrepo: separate out mq+svn subrepo tests
Kevin Bullock <kbullock@ringworld.org>
parents:
diff changeset
    37
  $ hg status -S
23bbb5b888ea subrepo: separate out mq+svn subrepo tests
Kevin Bullock <kbullock@ringworld.org>
parents:
diff changeset
    38
  A .hgsub
23bbb5b888ea subrepo: separate out mq+svn subrepo tests
Kevin Bullock <kbullock@ringworld.org>
parents:
diff changeset
    39
  ? sub/.svn/entries
23bbb5b888ea subrepo: separate out mq+svn subrepo tests
Kevin Bullock <kbullock@ringworld.org>
parents:
diff changeset
    40
  $ hg qnew -m0 0.diff
23bbb5b888ea subrepo: separate out mq+svn subrepo tests
Kevin Bullock <kbullock@ringworld.org>
parents:
diff changeset
    41
  committing subrepository sub
23bbb5b888ea subrepo: separate out mq+svn subrepo tests
Kevin Bullock <kbullock@ringworld.org>
parents:
diff changeset
    42
  $ cd sub
23bbb5b888ea subrepo: separate out mq+svn subrepo tests
Kevin Bullock <kbullock@ringworld.org>
parents:
diff changeset
    43
  $ echo a > a
23bbb5b888ea subrepo: separate out mq+svn subrepo tests
Kevin Bullock <kbullock@ringworld.org>
parents:
diff changeset
    44
  $ svn add a
23bbb5b888ea subrepo: separate out mq+svn subrepo tests
Kevin Bullock <kbullock@ringworld.org>
parents:
diff changeset
    45
  A         a
23bbb5b888ea subrepo: separate out mq+svn subrepo tests
Kevin Bullock <kbullock@ringworld.org>
parents:
diff changeset
    46
  $ svn st
23bbb5b888ea subrepo: separate out mq+svn subrepo tests
Kevin Bullock <kbullock@ringworld.org>
parents:
diff changeset
    47
  A       a
23bbb5b888ea subrepo: separate out mq+svn subrepo tests
Kevin Bullock <kbullock@ringworld.org>
parents:
diff changeset
    48
  $ cd ..
23bbb5b888ea subrepo: separate out mq+svn subrepo tests
Kevin Bullock <kbullock@ringworld.org>
parents:
diff changeset
    49
  $ hg status -S        # doesn't show status for svn subrepos (yet)
23bbb5b888ea subrepo: separate out mq+svn subrepo tests
Kevin Bullock <kbullock@ringworld.org>
parents:
diff changeset
    50
  $ hg qnew -m1 1.diff
23bbb5b888ea subrepo: separate out mq+svn subrepo tests
Kevin Bullock <kbullock@ringworld.org>
parents:
diff changeset
    51
  abort: uncommitted changes in subrepository sub
23bbb5b888ea subrepo: separate out mq+svn subrepo tests
Kevin Bullock <kbullock@ringworld.org>
parents:
diff changeset
    52
  [255]