annotate tests/test-convert-cvs-branch @ 9899:be574a37a8ae stable

run-tests: give each child its own tmp dir (issue1911) Fixes bug introduced by f8b4df4b033d (issue1911: --tmpdir plus parallel mode = fail), and also fixes the long-standing quirk that parallel mode created multiple /tmp/hgtests.XXXXXX directories. Now there is only one /tmp/hgtests.XXXXXX, with child0, child1, etc. under it.
author Greg Ward <greg@gerg.ca>
date Wed, 18 Nov 2009 22:23:11 -0500
parents 56a5f80556f5
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
6690
127e8c3466d1 convert: cvs.py - Allow user to use built-in CVS changeset code.
Frank Kingswood <frank@kingswood-consulting.co.uk>
parents:
diff changeset
1 #!/bin/sh
127e8c3466d1 convert: cvs.py - Allow user to use built-in CVS changeset code.
Frank Kingswood <frank@kingswood-consulting.co.uk>
parents:
diff changeset
2
8936
1de6e7e1bb9f change wiki/bts URLs to point to new hostname
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents: 8756
diff changeset
3 # This is http://mercurial.selenic.com/bts/issue1148
1de6e7e1bb9f change wiki/bts URLs to point to new hostname
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents: 8756
diff changeset
4 # and http://mercurial.selenic.com/bts/issue1447
6690
127e8c3466d1 convert: cvs.py - Allow user to use built-in CVS changeset code.
Frank Kingswood <frank@kingswood-consulting.co.uk>
parents:
diff changeset
5
127e8c3466d1 convert: cvs.py - Allow user to use built-in CVS changeset code.
Frank Kingswood <frank@kingswood-consulting.co.uk>
parents:
diff changeset
6 "$TESTDIR/hghave" cvs || exit 80
127e8c3466d1 convert: cvs.py - Allow user to use built-in CVS changeset code.
Frank Kingswood <frank@kingswood-consulting.co.uk>
parents:
diff changeset
7
127e8c3466d1 convert: cvs.py - Allow user to use built-in CVS changeset code.
Frank Kingswood <frank@kingswood-consulting.co.uk>
parents:
diff changeset
8 cvscall()
127e8c3466d1 convert: cvs.py - Allow user to use built-in CVS changeset code.
Frank Kingswood <frank@kingswood-consulting.co.uk>
parents:
diff changeset
9 {
127e8c3466d1 convert: cvs.py - Allow user to use built-in CVS changeset code.
Frank Kingswood <frank@kingswood-consulting.co.uk>
parents:
diff changeset
10 cvs -f "$@"
127e8c3466d1 convert: cvs.py - Allow user to use built-in CVS changeset code.
Frank Kingswood <frank@kingswood-consulting.co.uk>
parents:
diff changeset
11 }
127e8c3466d1 convert: cvs.py - Allow user to use built-in CVS changeset code.
Frank Kingswood <frank@kingswood-consulting.co.uk>
parents:
diff changeset
12
127e8c3466d1 convert: cvs.py - Allow user to use built-in CVS changeset code.
Frank Kingswood <frank@kingswood-consulting.co.uk>
parents:
diff changeset
13 echo "[extensions]" >> $HGRCPATH
127e8c3466d1 convert: cvs.py - Allow user to use built-in CVS changeset code.
Frank Kingswood <frank@kingswood-consulting.co.uk>
parents:
diff changeset
14 echo "convert = " >> $HGRCPATH
127e8c3466d1 convert: cvs.py - Allow user to use built-in CVS changeset code.
Frank Kingswood <frank@kingswood-consulting.co.uk>
parents:
diff changeset
15 echo "graphlog = " >> $HGRCPATH
127e8c3466d1 convert: cvs.py - Allow user to use built-in CVS changeset code.
Frank Kingswood <frank@kingswood-consulting.co.uk>
parents:
diff changeset
16 echo "[convert]" >> $HGRCPATH
8169
6584953be356 convert/cvs: add an option to disable remote log caching
Patrick Mezard <pmezard@gmail.com>
parents: 7812
diff changeset
17 echo "cvsps.cache=0" >> $HGRCPATH
6690
127e8c3466d1 convert: cvs.py - Allow user to use built-in CVS changeset code.
Frank Kingswood <frank@kingswood-consulting.co.uk>
parents:
diff changeset
18
127e8c3466d1 convert: cvs.py - Allow user to use built-in CVS changeset code.
Frank Kingswood <frank@kingswood-consulting.co.uk>
parents:
diff changeset
19 echo % create cvs repository
127e8c3466d1 convert: cvs.py - Allow user to use built-in CVS changeset code.
Frank Kingswood <frank@kingswood-consulting.co.uk>
parents:
diff changeset
20 mkdir cvsrepo
127e8c3466d1 convert: cvs.py - Allow user to use built-in CVS changeset code.
Frank Kingswood <frank@kingswood-consulting.co.uk>
parents:
diff changeset
21 cd cvsrepo
8350
1f0f01bc86a5 tests: avoid export FOO=bar bashism
Martin Geisler <mg@lazybytes.net>
parents: 8169
diff changeset
22 CVSROOT=`pwd`
1f0f01bc86a5 tests: avoid export FOO=bar bashism
Martin Geisler <mg@lazybytes.net>
parents: 8169
diff changeset
23 export CVSROOT
1f0f01bc86a5 tests: avoid export FOO=bar bashism
Martin Geisler <mg@lazybytes.net>
parents: 8169
diff changeset
24 CVS_OPTIONS=-f
1f0f01bc86a5 tests: avoid export FOO=bar bashism
Martin Geisler <mg@lazybytes.net>
parents: 8169
diff changeset
25 export CVS_OPTIONS
6690
127e8c3466d1 convert: cvs.py - Allow user to use built-in CVS changeset code.
Frank Kingswood <frank@kingswood-consulting.co.uk>
parents:
diff changeset
26 cd ..
127e8c3466d1 convert: cvs.py - Allow user to use built-in CVS changeset code.
Frank Kingswood <frank@kingswood-consulting.co.uk>
parents:
diff changeset
27
127e8c3466d1 convert: cvs.py - Allow user to use built-in CVS changeset code.
Frank Kingswood <frank@kingswood-consulting.co.uk>
parents:
diff changeset
28 cvscall -q -d "$CVSROOT" init
127e8c3466d1 convert: cvs.py - Allow user to use built-in CVS changeset code.
Frank Kingswood <frank@kingswood-consulting.co.uk>
parents:
diff changeset
29
127e8c3466d1 convert: cvs.py - Allow user to use built-in CVS changeset code.
Frank Kingswood <frank@kingswood-consulting.co.uk>
parents:
diff changeset
30 echo % Create a new project
127e8c3466d1 convert: cvs.py - Allow user to use built-in CVS changeset code.
Frank Kingswood <frank@kingswood-consulting.co.uk>
parents:
diff changeset
31
127e8c3466d1 convert: cvs.py - Allow user to use built-in CVS changeset code.
Frank Kingswood <frank@kingswood-consulting.co.uk>
parents:
diff changeset
32 mkdir src
127e8c3466d1 convert: cvs.py - Allow user to use built-in CVS changeset code.
Frank Kingswood <frank@kingswood-consulting.co.uk>
parents:
diff changeset
33 cd src
7465
8f0305874701 tests: allow cvs import to reorder its filename list
Frank Kingswood <frank@kingswood-consulting.co.uk>
parents: 6690
diff changeset
34 echo "1" > a
8f0305874701 tests: allow cvs import to reorder its filename list
Frank Kingswood <frank@kingswood-consulting.co.uk>
parents: 6690
diff changeset
35 echo "1" > b
8f0305874701 tests: allow cvs import to reorder its filename list
Frank Kingswood <frank@kingswood-consulting.co.uk>
parents: 6690
diff changeset
36 cvscall import -m "init" src v0 r0 | sort
6690
127e8c3466d1 convert: cvs.py - Allow user to use built-in CVS changeset code.
Frank Kingswood <frank@kingswood-consulting.co.uk>
parents:
diff changeset
37 cd ..
127e8c3466d1 convert: cvs.py - Allow user to use built-in CVS changeset code.
Frank Kingswood <frank@kingswood-consulting.co.uk>
parents:
diff changeset
38 cvscall co src
127e8c3466d1 convert: cvs.py - Allow user to use built-in CVS changeset code.
Frank Kingswood <frank@kingswood-consulting.co.uk>
parents:
diff changeset
39 cd src
127e8c3466d1 convert: cvs.py - Allow user to use built-in CVS changeset code.
Frank Kingswood <frank@kingswood-consulting.co.uk>
parents:
diff changeset
40
127e8c3466d1 convert: cvs.py - Allow user to use built-in CVS changeset code.
Frank Kingswood <frank@kingswood-consulting.co.uk>
parents:
diff changeset
41 echo % Branch the project
127e8c3466d1 convert: cvs.py - Allow user to use built-in CVS changeset code.
Frank Kingswood <frank@kingswood-consulting.co.uk>
parents:
diff changeset
42
127e8c3466d1 convert: cvs.py - Allow user to use built-in CVS changeset code.
Frank Kingswood <frank@kingswood-consulting.co.uk>
parents:
diff changeset
43 cvscall tag -b BRANCH
7812
18048153fd4e test-convert-cvs*: mute output from "cvs up"
Mads Kiilerich <mads@kiilerich.com>
parents: 7465
diff changeset
44 cvscall up -r BRANCH > /dev/null
6690
127e8c3466d1 convert: cvs.py - Allow user to use built-in CVS changeset code.
Frank Kingswood <frank@kingswood-consulting.co.uk>
parents:
diff changeset
45
127e8c3466d1 convert: cvs.py - Allow user to use built-in CVS changeset code.
Frank Kingswood <frank@kingswood-consulting.co.uk>
parents:
diff changeset
46 echo % Modify file a, then b, then a
127e8c3466d1 convert: cvs.py - Allow user to use built-in CVS changeset code.
Frank Kingswood <frank@kingswood-consulting.co.uk>
parents:
diff changeset
47
127e8c3466d1 convert: cvs.py - Allow user to use built-in CVS changeset code.
Frank Kingswood <frank@kingswood-consulting.co.uk>
parents:
diff changeset
48 echo "2" > a
127e8c3466d1 convert: cvs.py - Allow user to use built-in CVS changeset code.
Frank Kingswood <frank@kingswood-consulting.co.uk>
parents:
diff changeset
49 cvscall ci -m "mod a" | grep '<--' | sed -e 's:.*src/\(.*\),v.*:checking in src/\1,v:g'
127e8c3466d1 convert: cvs.py - Allow user to use built-in CVS changeset code.
Frank Kingswood <frank@kingswood-consulting.co.uk>
parents:
diff changeset
50
127e8c3466d1 convert: cvs.py - Allow user to use built-in CVS changeset code.
Frank Kingswood <frank@kingswood-consulting.co.uk>
parents:
diff changeset
51 echo "2" > b
127e8c3466d1 convert: cvs.py - Allow user to use built-in CVS changeset code.
Frank Kingswood <frank@kingswood-consulting.co.uk>
parents:
diff changeset
52 cvscall ci -m "mod b" | grep '<--' | sed -e 's:.*src/\(.*\),v.*:checking in src/\1,v:g'
127e8c3466d1 convert: cvs.py - Allow user to use built-in CVS changeset code.
Frank Kingswood <frank@kingswood-consulting.co.uk>
parents:
diff changeset
53
127e8c3466d1 convert: cvs.py - Allow user to use built-in CVS changeset code.
Frank Kingswood <frank@kingswood-consulting.co.uk>
parents:
diff changeset
54 echo "3" > a
127e8c3466d1 convert: cvs.py - Allow user to use built-in CVS changeset code.
Frank Kingswood <frank@kingswood-consulting.co.uk>
parents:
diff changeset
55 cvscall ci -m "mod a again" | grep '<--' | sed -e 's:.*src/\(.*\),v.*:checking in src/\1,v:g'
127e8c3466d1 convert: cvs.py - Allow user to use built-in CVS changeset code.
Frank Kingswood <frank@kingswood-consulting.co.uk>
parents:
diff changeset
56
127e8c3466d1 convert: cvs.py - Allow user to use built-in CVS changeset code.
Frank Kingswood <frank@kingswood-consulting.co.uk>
parents:
diff changeset
57 echo % Convert
127e8c3466d1 convert: cvs.py - Allow user to use built-in CVS changeset code.
Frank Kingswood <frank@kingswood-consulting.co.uk>
parents:
diff changeset
58
127e8c3466d1 convert: cvs.py - Allow user to use built-in CVS changeset code.
Frank Kingswood <frank@kingswood-consulting.co.uk>
parents:
diff changeset
59 cd ..
127e8c3466d1 convert: cvs.py - Allow user to use built-in CVS changeset code.
Frank Kingswood <frank@kingswood-consulting.co.uk>
parents:
diff changeset
60 hg convert src | sed -e 's/connecting to.*cvsrepo/connecting to cvsrepo/g'
127e8c3466d1 convert: cvs.py - Allow user to use built-in CVS changeset code.
Frank Kingswood <frank@kingswood-consulting.co.uk>
parents:
diff changeset
61
127e8c3466d1 convert: cvs.py - Allow user to use built-in CVS changeset code.
Frank Kingswood <frank@kingswood-consulting.co.uk>
parents:
diff changeset
62 echo % Check the result
127e8c3466d1 convert: cvs.py - Allow user to use built-in CVS changeset code.
Frank Kingswood <frank@kingswood-consulting.co.uk>
parents:
diff changeset
63
8523
5b7da468531b tests: replace #...# syntax with {...}
Martin Geisler <mg@lazybytes.net>
parents: 8350
diff changeset
64 hg -R src-hg glog --template '{rev} ({branches}) {desc} files: {files}\n'
8756
6019e6517f95 convert: better support for CVS branchpoints (issue1447)
Henrik Stuart <hg@hstuart.dk>
parents: 8523
diff changeset
65
6019e6517f95 convert: better support for CVS branchpoints (issue1447)
Henrik Stuart <hg@hstuart.dk>
parents: 8523
diff changeset
66 echo ""
6019e6517f95 convert: better support for CVS branchpoints (issue1447)
Henrik Stuart <hg@hstuart.dk>
parents: 8523
diff changeset
67
6019e6517f95 convert: better support for CVS branchpoints (issue1447)
Henrik Stuart <hg@hstuart.dk>
parents: 8523
diff changeset
68 echo % issue 1447
6019e6517f95 convert: better support for CVS branchpoints (issue1447)
Henrik Stuart <hg@hstuart.dk>
parents: 8523
diff changeset
69 cvscall()
6019e6517f95 convert: better support for CVS branchpoints (issue1447)
Henrik Stuart <hg@hstuart.dk>
parents: 8523
diff changeset
70 {
6019e6517f95 convert: better support for CVS branchpoints (issue1447)
Henrik Stuart <hg@hstuart.dk>
parents: 8523
diff changeset
71 echo cvs -f "$@"
6019e6517f95 convert: better support for CVS branchpoints (issue1447)
Henrik Stuart <hg@hstuart.dk>
parents: 8523
diff changeset
72 cvs -f "$@"
6019e6517f95 convert: better support for CVS branchpoints (issue1447)
Henrik Stuart <hg@hstuart.dk>
parents: 8523
diff changeset
73 sleep 1
6019e6517f95 convert: better support for CVS branchpoints (issue1447)
Henrik Stuart <hg@hstuart.dk>
parents: 8523
diff changeset
74 }
6019e6517f95 convert: better support for CVS branchpoints (issue1447)
Henrik Stuart <hg@hstuart.dk>
parents: 8523
diff changeset
75
6019e6517f95 convert: better support for CVS branchpoints (issue1447)
Henrik Stuart <hg@hstuart.dk>
parents: 8523
diff changeset
76 cvsci()
6019e6517f95 convert: better support for CVS branchpoints (issue1447)
Henrik Stuart <hg@hstuart.dk>
parents: 8523
diff changeset
77 {
6019e6517f95 convert: better support for CVS branchpoints (issue1447)
Henrik Stuart <hg@hstuart.dk>
parents: 8523
diff changeset
78 echo cvs -f ci "$@"
6019e6517f95 convert: better support for CVS branchpoints (issue1447)
Henrik Stuart <hg@hstuart.dk>
parents: 8523
diff changeset
79 cvs -f ci "$@" >/dev/null 2>&1
6019e6517f95 convert: better support for CVS branchpoints (issue1447)
Henrik Stuart <hg@hstuart.dk>
parents: 8523
diff changeset
80 sleep 1
6019e6517f95 convert: better support for CVS branchpoints (issue1447)
Henrik Stuart <hg@hstuart.dk>
parents: 8523
diff changeset
81 }
6019e6517f95 convert: better support for CVS branchpoints (issue1447)
Henrik Stuart <hg@hstuart.dk>
parents: 8523
diff changeset
82
6019e6517f95 convert: better support for CVS branchpoints (issue1447)
Henrik Stuart <hg@hstuart.dk>
parents: 8523
diff changeset
83 cvscall -Q -d `pwd`/cvsmaster2 init >/dev/null 2>&1
6019e6517f95 convert: better support for CVS branchpoints (issue1447)
Henrik Stuart <hg@hstuart.dk>
parents: 8523
diff changeset
84 cd cvsmaster2
9040
4743d1a65dfe test: fix for compatibilty with true Bourne /bin/sh
David Champion <dgc@uchicago.edu>
parents: 8936
diff changeset
85 CVSROOT=`pwd`
4743d1a65dfe test: fix for compatibilty with true Bourne /bin/sh
David Champion <dgc@uchicago.edu>
parents: 8936
diff changeset
86 export CVSROOT
8756
6019e6517f95 convert: better support for CVS branchpoints (issue1447)
Henrik Stuart <hg@hstuart.dk>
parents: 8523
diff changeset
87 mkdir foo
6019e6517f95 convert: better support for CVS branchpoints (issue1447)
Henrik Stuart <hg@hstuart.dk>
parents: 8523
diff changeset
88 cd ..
6019e6517f95 convert: better support for CVS branchpoints (issue1447)
Henrik Stuart <hg@hstuart.dk>
parents: 8523
diff changeset
89 cvscall -Q co -d cvswork2 foo
6019e6517f95 convert: better support for CVS branchpoints (issue1447)
Henrik Stuart <hg@hstuart.dk>
parents: 8523
diff changeset
90
6019e6517f95 convert: better support for CVS branchpoints (issue1447)
Henrik Stuart <hg@hstuart.dk>
parents: 8523
diff changeset
91 cd cvswork2
6019e6517f95 convert: better support for CVS branchpoints (issue1447)
Henrik Stuart <hg@hstuart.dk>
parents: 8523
diff changeset
92 echo foo > a.txt
6019e6517f95 convert: better support for CVS branchpoints (issue1447)
Henrik Stuart <hg@hstuart.dk>
parents: 8523
diff changeset
93 echo bar > b.txt
6019e6517f95 convert: better support for CVS branchpoints (issue1447)
Henrik Stuart <hg@hstuart.dk>
parents: 8523
diff changeset
94 cvscall -Q add a.txt b.txt
6019e6517f95 convert: better support for CVS branchpoints (issue1447)
Henrik Stuart <hg@hstuart.dk>
parents: 8523
diff changeset
95 cvsci -m "Initial commit"
6019e6517f95 convert: better support for CVS branchpoints (issue1447)
Henrik Stuart <hg@hstuart.dk>
parents: 8523
diff changeset
96
6019e6517f95 convert: better support for CVS branchpoints (issue1447)
Henrik Stuart <hg@hstuart.dk>
parents: 8523
diff changeset
97 echo foo > b.txt
6019e6517f95 convert: better support for CVS branchpoints (issue1447)
Henrik Stuart <hg@hstuart.dk>
parents: 8523
diff changeset
98 cvsci -m "Fix b on HEAD"
6019e6517f95 convert: better support for CVS branchpoints (issue1447)
Henrik Stuart <hg@hstuart.dk>
parents: 8523
diff changeset
99
6019e6517f95 convert: better support for CVS branchpoints (issue1447)
Henrik Stuart <hg@hstuart.dk>
parents: 8523
diff changeset
100 echo bar > a.txt
6019e6517f95 convert: better support for CVS branchpoints (issue1447)
Henrik Stuart <hg@hstuart.dk>
parents: 8523
diff changeset
101 cvsci -m "Small fix in a on HEAD"
6019e6517f95 convert: better support for CVS branchpoints (issue1447)
Henrik Stuart <hg@hstuart.dk>
parents: 8523
diff changeset
102
6019e6517f95 convert: better support for CVS branchpoints (issue1447)
Henrik Stuart <hg@hstuart.dk>
parents: 8523
diff changeset
103 cvscall -Q tag -b BRANCH
6019e6517f95 convert: better support for CVS branchpoints (issue1447)
Henrik Stuart <hg@hstuart.dk>
parents: 8523
diff changeset
104 cvscall -Q up -P -rBRANCH
6019e6517f95 convert: better support for CVS branchpoints (issue1447)
Henrik Stuart <hg@hstuart.dk>
parents: 8523
diff changeset
105
6019e6517f95 convert: better support for CVS branchpoints (issue1447)
Henrik Stuart <hg@hstuart.dk>
parents: 8523
diff changeset
106 echo baz > b.txt
6019e6517f95 convert: better support for CVS branchpoints (issue1447)
Henrik Stuart <hg@hstuart.dk>
parents: 8523
diff changeset
107 cvsci -m "Change on BRANCH in b"
6019e6517f95 convert: better support for CVS branchpoints (issue1447)
Henrik Stuart <hg@hstuart.dk>
parents: 8523
diff changeset
108
6019e6517f95 convert: better support for CVS branchpoints (issue1447)
Henrik Stuart <hg@hstuart.dk>
parents: 8523
diff changeset
109 hg debugcvsps -x --parents foo | sed -e 's/Author:.*/Author:/' -e 's/Date:.*/Date:/'
6019e6517f95 convert: better support for CVS branchpoints (issue1447)
Henrik Stuart <hg@hstuart.dk>
parents: 8523
diff changeset
110
6019e6517f95 convert: better support for CVS branchpoints (issue1447)
Henrik Stuart <hg@hstuart.dk>
parents: 8523
diff changeset
111 cd ..
6019e6517f95 convert: better support for CVS branchpoints (issue1447)
Henrik Stuart <hg@hstuart.dk>
parents: 8523
diff changeset
112