author | Adrian Buehlmann <adrian@cadifra.com> |
Mon, 04 Jun 2012 16:59:34 +0200 | |
changeset 16848 | 19a915d43a68 |
parent 16073 | b254f827b7a6 |
child 16894 | f9b352b65180 |
permissions | -rw-r--r-- |
15346
53f37b24f26a
tests: check for svn >= 1.3 and >= 1.5 in tests that require those versions
Thomas Arendsen Hein <thomas@intevation.de>
parents:
14870
diff
changeset
|
1 |
$ "$TESTDIR/hghave" svn13 || exit 80 |
13300
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 |
$ hg qnew -m0 0.diff |
23bbb5b888ea
subrepo: separate out mq+svn subrepo tests
Kevin Bullock <kbullock@ringworld.org>
parents:
diff
changeset
|
40 |
$ cd sub |
23bbb5b888ea
subrepo: separate out mq+svn subrepo tests
Kevin Bullock <kbullock@ringworld.org>
parents:
diff
changeset
|
41 |
$ echo a > a |
23bbb5b888ea
subrepo: separate out mq+svn subrepo tests
Kevin Bullock <kbullock@ringworld.org>
parents:
diff
changeset
|
42 |
$ svn add a |
23bbb5b888ea
subrepo: separate out mq+svn subrepo tests
Kevin Bullock <kbullock@ringworld.org>
parents:
diff
changeset
|
43 |
A a |
23bbb5b888ea
subrepo: separate out mq+svn subrepo tests
Kevin Bullock <kbullock@ringworld.org>
parents:
diff
changeset
|
44 |
$ svn st |
13410
1f2b2c33d386
tests: fixes for svn 1.4.2
Matt Mackall <mpm@selenic.com>
parents:
13326
diff
changeset
|
45 |
A* a (glob) |
13300
23bbb5b888ea
subrepo: separate out mq+svn subrepo tests
Kevin Bullock <kbullock@ringworld.org>
parents:
diff
changeset
|
46 |
$ cd .. |
23bbb5b888ea
subrepo: separate out mq+svn subrepo tests
Kevin Bullock <kbullock@ringworld.org>
parents:
diff
changeset
|
47 |
$ 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
|
48 |
$ hg qnew -m1 1.diff |
23bbb5b888ea
subrepo: separate out mq+svn subrepo tests
Kevin Bullock <kbullock@ringworld.org>
parents:
diff
changeset
|
49 |
abort: uncommitted changes in subrepository sub |
23bbb5b888ea
subrepo: separate out mq+svn subrepo tests
Kevin Bullock <kbullock@ringworld.org>
parents:
diff
changeset
|
50 |
[255] |