tests/test-mq-subrepo-svn.t
author Peter Arrenbrecht <peter.arrenbrecht@gmail.com>
Sat, 30 Apr 2011 17:21:37 +0200
changeset 14073 72c84f24b420
parent 13410 1f2b2c33d386
child 14870 f73c7b70df68
permissions -rw-r--r--
discovery: drop findoutgoing and simplify findcommonincoming's api This is a long desired cleanup and paves the way for new discovery. To specify subsets for bundling changes, all code should use the heads of the desired subset ("heads") and the heads of the common subset ("common") to be excluded from the bundled set. These can be used revlog.findmissing instead of revlog.nodesbetween. This fixes an actual bug exposed by the change in test-bundle-r.t where we try to bundle a changeset while specifying that said changeset is to be assumed already present in the target. This used to still bundle the changeset. It no longer does. This is similar to the bugs fixed by the recent switch to heads/common for incoming/pull.
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
13410
1f2b2c33d386 tests: fixes for svn 1.4.2
Matt Mackall <mpm@selenic.com>
parents: 13326
diff changeset
    37
  $ hg status -S -X '**/format'
13300
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
13410
1f2b2c33d386 tests: fixes for svn 1.4.2
Matt Mackall <mpm@selenic.com>
parents: 13326
diff changeset
    47
  A*    a (glob)
13300
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]