Mercurial > hg
annotate tests/test-convert-cvs-synthetic @ 7992:0e7f02eaa63b
hgk: word-wrap help texts at 70 characters
author | Martin Geisler <mg@daimi.au.dk> |
---|---|
date | Sat, 04 Apr 2009 23:17:33 +0200 |
parents | 02981000012e |
children | 6c3b8132078e |
rev | line source |
---|---|
7862
02981000012e
cvsps: recognize and eliminate CVS' synthetic "file added" revisions.
Greg Ward <greg-hg@gerg.ca>
parents:
diff
changeset
|
1 #!/bin/sh |
02981000012e
cvsps: recognize and eliminate CVS' synthetic "file added" revisions.
Greg Ward <greg-hg@gerg.ca>
parents:
diff
changeset
|
2 |
02981000012e
cvsps: recognize and eliminate CVS' synthetic "file added" revisions.
Greg Ward <greg-hg@gerg.ca>
parents:
diff
changeset
|
3 # This feature requires use of builtin cvsps! |
02981000012e
cvsps: recognize and eliminate CVS' synthetic "file added" revisions.
Greg Ward <greg-hg@gerg.ca>
parents:
diff
changeset
|
4 "$TESTDIR/hghave" cvs || exit 80 |
02981000012e
cvsps: recognize and eliminate CVS' synthetic "file added" revisions.
Greg Ward <greg-hg@gerg.ca>
parents:
diff
changeset
|
5 |
02981000012e
cvsps: recognize and eliminate CVS' synthetic "file added" revisions.
Greg Ward <greg-hg@gerg.ca>
parents:
diff
changeset
|
6 # XXX lots of duplication with other test-convert-cvs* scripts |
02981000012e
cvsps: recognize and eliminate CVS' synthetic "file added" revisions.
Greg Ward <greg-hg@gerg.ca>
parents:
diff
changeset
|
7 |
02981000012e
cvsps: recognize and eliminate CVS' synthetic "file added" revisions.
Greg Ward <greg-hg@gerg.ca>
parents:
diff
changeset
|
8 set -e |
02981000012e
cvsps: recognize and eliminate CVS' synthetic "file added" revisions.
Greg Ward <greg-hg@gerg.ca>
parents:
diff
changeset
|
9 |
02981000012e
cvsps: recognize and eliminate CVS' synthetic "file added" revisions.
Greg Ward <greg-hg@gerg.ca>
parents:
diff
changeset
|
10 echo "[extensions]" >> $HGRCPATH |
02981000012e
cvsps: recognize and eliminate CVS' synthetic "file added" revisions.
Greg Ward <greg-hg@gerg.ca>
parents:
diff
changeset
|
11 echo "convert = " >> $HGRCPATH |
02981000012e
cvsps: recognize and eliminate CVS' synthetic "file added" revisions.
Greg Ward <greg-hg@gerg.ca>
parents:
diff
changeset
|
12 echo "[convert]" >> $HGRCPATH |
02981000012e
cvsps: recognize and eliminate CVS' synthetic "file added" revisions.
Greg Ward <greg-hg@gerg.ca>
parents:
diff
changeset
|
13 echo "cvsps=builtin" >> $HGRCPATH |
02981000012e
cvsps: recognize and eliminate CVS' synthetic "file added" revisions.
Greg Ward <greg-hg@gerg.ca>
parents:
diff
changeset
|
14 |
02981000012e
cvsps: recognize and eliminate CVS' synthetic "file added" revisions.
Greg Ward <greg-hg@gerg.ca>
parents:
diff
changeset
|
15 echo % create cvs repository with one project |
02981000012e
cvsps: recognize and eliminate CVS' synthetic "file added" revisions.
Greg Ward <greg-hg@gerg.ca>
parents:
diff
changeset
|
16 mkdir cvsrepo |
02981000012e
cvsps: recognize and eliminate CVS' synthetic "file added" revisions.
Greg Ward <greg-hg@gerg.ca>
parents:
diff
changeset
|
17 cd cvsrepo |
02981000012e
cvsps: recognize and eliminate CVS' synthetic "file added" revisions.
Greg Ward <greg-hg@gerg.ca>
parents:
diff
changeset
|
18 export CVSROOT=`pwd` |
02981000012e
cvsps: recognize and eliminate CVS' synthetic "file added" revisions.
Greg Ward <greg-hg@gerg.ca>
parents:
diff
changeset
|
19 export CVS_OPTIONS=-f |
02981000012e
cvsps: recognize and eliminate CVS' synthetic "file added" revisions.
Greg Ward <greg-hg@gerg.ca>
parents:
diff
changeset
|
20 cd .. |
02981000012e
cvsps: recognize and eliminate CVS' synthetic "file added" revisions.
Greg Ward <greg-hg@gerg.ca>
parents:
diff
changeset
|
21 |
02981000012e
cvsps: recognize and eliminate CVS' synthetic "file added" revisions.
Greg Ward <greg-hg@gerg.ca>
parents:
diff
changeset
|
22 filter='sed "s:$CVSROOT:*REPO*:g"' |
02981000012e
cvsps: recognize and eliminate CVS' synthetic "file added" revisions.
Greg Ward <greg-hg@gerg.ca>
parents:
diff
changeset
|
23 cvscall() |
02981000012e
cvsps: recognize and eliminate CVS' synthetic "file added" revisions.
Greg Ward <greg-hg@gerg.ca>
parents:
diff
changeset
|
24 { |
02981000012e
cvsps: recognize and eliminate CVS' synthetic "file added" revisions.
Greg Ward <greg-hg@gerg.ca>
parents:
diff
changeset
|
25 cvs -f "$@" | eval $filter |
02981000012e
cvsps: recognize and eliminate CVS' synthetic "file added" revisions.
Greg Ward <greg-hg@gerg.ca>
parents:
diff
changeset
|
26 } |
02981000012e
cvsps: recognize and eliminate CVS' synthetic "file added" revisions.
Greg Ward <greg-hg@gerg.ca>
parents:
diff
changeset
|
27 |
02981000012e
cvsps: recognize and eliminate CVS' synthetic "file added" revisions.
Greg Ward <greg-hg@gerg.ca>
parents:
diff
changeset
|
28 cvscall -q -d "$CVSROOT" init |
02981000012e
cvsps: recognize and eliminate CVS' synthetic "file added" revisions.
Greg Ward <greg-hg@gerg.ca>
parents:
diff
changeset
|
29 mkdir cvsrepo/proj |
02981000012e
cvsps: recognize and eliminate CVS' synthetic "file added" revisions.
Greg Ward <greg-hg@gerg.ca>
parents:
diff
changeset
|
30 |
02981000012e
cvsps: recognize and eliminate CVS' synthetic "file added" revisions.
Greg Ward <greg-hg@gerg.ca>
parents:
diff
changeset
|
31 cvscall co proj |
02981000012e
cvsps: recognize and eliminate CVS' synthetic "file added" revisions.
Greg Ward <greg-hg@gerg.ca>
parents:
diff
changeset
|
32 |
02981000012e
cvsps: recognize and eliminate CVS' synthetic "file added" revisions.
Greg Ward <greg-hg@gerg.ca>
parents:
diff
changeset
|
33 echo % create file1 on the trunk |
02981000012e
cvsps: recognize and eliminate CVS' synthetic "file added" revisions.
Greg Ward <greg-hg@gerg.ca>
parents:
diff
changeset
|
34 cd proj |
02981000012e
cvsps: recognize and eliminate CVS' synthetic "file added" revisions.
Greg Ward <greg-hg@gerg.ca>
parents:
diff
changeset
|
35 touch file1 |
02981000012e
cvsps: recognize and eliminate CVS' synthetic "file added" revisions.
Greg Ward <greg-hg@gerg.ca>
parents:
diff
changeset
|
36 cvscall add file1 |
02981000012e
cvsps: recognize and eliminate CVS' synthetic "file added" revisions.
Greg Ward <greg-hg@gerg.ca>
parents:
diff
changeset
|
37 cvscall ci -m"add file1 on trunk" file1 |
02981000012e
cvsps: recognize and eliminate CVS' synthetic "file added" revisions.
Greg Ward <greg-hg@gerg.ca>
parents:
diff
changeset
|
38 |
02981000012e
cvsps: recognize and eliminate CVS' synthetic "file added" revisions.
Greg Ward <greg-hg@gerg.ca>
parents:
diff
changeset
|
39 echo % create two branches |
02981000012e
cvsps: recognize and eliminate CVS' synthetic "file added" revisions.
Greg Ward <greg-hg@gerg.ca>
parents:
diff
changeset
|
40 cvscall tag -b v1_0 |
02981000012e
cvsps: recognize and eliminate CVS' synthetic "file added" revisions.
Greg Ward <greg-hg@gerg.ca>
parents:
diff
changeset
|
41 cvscall tag -b v1_1 |
02981000012e
cvsps: recognize and eliminate CVS' synthetic "file added" revisions.
Greg Ward <greg-hg@gerg.ca>
parents:
diff
changeset
|
42 |
02981000012e
cvsps: recognize and eliminate CVS' synthetic "file added" revisions.
Greg Ward <greg-hg@gerg.ca>
parents:
diff
changeset
|
43 echo % create file2 on branch v1_0 |
02981000012e
cvsps: recognize and eliminate CVS' synthetic "file added" revisions.
Greg Ward <greg-hg@gerg.ca>
parents:
diff
changeset
|
44 cvs up -rv1_0 |
02981000012e
cvsps: recognize and eliminate CVS' synthetic "file added" revisions.
Greg Ward <greg-hg@gerg.ca>
parents:
diff
changeset
|
45 touch file2 |
02981000012e
cvsps: recognize and eliminate CVS' synthetic "file added" revisions.
Greg Ward <greg-hg@gerg.ca>
parents:
diff
changeset
|
46 cvscall add file2 |
02981000012e
cvsps: recognize and eliminate CVS' synthetic "file added" revisions.
Greg Ward <greg-hg@gerg.ca>
parents:
diff
changeset
|
47 cvscall ci -m"add file2 on branch v1_0" file2 |
02981000012e
cvsps: recognize and eliminate CVS' synthetic "file added" revisions.
Greg Ward <greg-hg@gerg.ca>
parents:
diff
changeset
|
48 |
02981000012e
cvsps: recognize and eliminate CVS' synthetic "file added" revisions.
Greg Ward <greg-hg@gerg.ca>
parents:
diff
changeset
|
49 echo % create file3, file4 on branch v1_1 |
02981000012e
cvsps: recognize and eliminate CVS' synthetic "file added" revisions.
Greg Ward <greg-hg@gerg.ca>
parents:
diff
changeset
|
50 cvs up -rv1_1 |
02981000012e
cvsps: recognize and eliminate CVS' synthetic "file added" revisions.
Greg Ward <greg-hg@gerg.ca>
parents:
diff
changeset
|
51 touch file3 |
02981000012e
cvsps: recognize and eliminate CVS' synthetic "file added" revisions.
Greg Ward <greg-hg@gerg.ca>
parents:
diff
changeset
|
52 touch file4 |
02981000012e
cvsps: recognize and eliminate CVS' synthetic "file added" revisions.
Greg Ward <greg-hg@gerg.ca>
parents:
diff
changeset
|
53 cvscall add file3 file4 |
02981000012e
cvsps: recognize and eliminate CVS' synthetic "file added" revisions.
Greg Ward <greg-hg@gerg.ca>
parents:
diff
changeset
|
54 cvscall ci -m"add file3, file4 on branch v1_1" file3 file4 |
02981000012e
cvsps: recognize and eliminate CVS' synthetic "file added" revisions.
Greg Ward <greg-hg@gerg.ca>
parents:
diff
changeset
|
55 |
02981000012e
cvsps: recognize and eliminate CVS' synthetic "file added" revisions.
Greg Ward <greg-hg@gerg.ca>
parents:
diff
changeset
|
56 echo % merge file2 from v1_0 to v1_1 |
02981000012e
cvsps: recognize and eliminate CVS' synthetic "file added" revisions.
Greg Ward <greg-hg@gerg.ca>
parents:
diff
changeset
|
57 cvscall up -jv1_0 |
02981000012e
cvsps: recognize and eliminate CVS' synthetic "file added" revisions.
Greg Ward <greg-hg@gerg.ca>
parents:
diff
changeset
|
58 cvscall ci -m"merge file2 from v1_0 to v1_1" |
02981000012e
cvsps: recognize and eliminate CVS' synthetic "file added" revisions.
Greg Ward <greg-hg@gerg.ca>
parents:
diff
changeset
|
59 |
02981000012e
cvsps: recognize and eliminate CVS' synthetic "file added" revisions.
Greg Ward <greg-hg@gerg.ca>
parents:
diff
changeset
|
60 echo % convert to hg |
02981000012e
cvsps: recognize and eliminate CVS' synthetic "file added" revisions.
Greg Ward <greg-hg@gerg.ca>
parents:
diff
changeset
|
61 cd .. |
02981000012e
cvsps: recognize and eliminate CVS' synthetic "file added" revisions.
Greg Ward <greg-hg@gerg.ca>
parents:
diff
changeset
|
62 hg convert proj proj.hg | eval $filter |
02981000012e
cvsps: recognize and eliminate CVS' synthetic "file added" revisions.
Greg Ward <greg-hg@gerg.ca>
parents:
diff
changeset
|
63 |
02981000012e
cvsps: recognize and eliminate CVS' synthetic "file added" revisions.
Greg Ward <greg-hg@gerg.ca>
parents:
diff
changeset
|
64 echo % hg log output |
02981000012e
cvsps: recognize and eliminate CVS' synthetic "file added" revisions.
Greg Ward <greg-hg@gerg.ca>
parents:
diff
changeset
|
65 hg -R proj.hg log --template "{rev} {desc}\n" |