tests/test-convert-cvs
author Brodie Rao <brodie@bitheap.org>
Wed, 22 Sep 2010 16:05:59 -0500
changeset 12373 58885f00b998
parent 12153 d598d24a7e67
permissions -rwxr-xr-x
tests: don't match blank output lines as regexes in unified tests Currently, the following unified test will pass: $ echo foo A blank output line (a line containing just two spaces) will match any output. The patch modifies the unified test runner to ignore empty strings strings when do regular expression matching.
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
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
127e8c3466d1 convert: cvs.py - Allow user to use built-in CVS changeset code.
Frank Kingswood <frank@kingswood-consulting.co.uk>
parents:
diff changeset
     3
"$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
     4
127e8c3466d1 convert: cvs.py - Allow user to use built-in CVS changeset code.
Frank Kingswood <frank@kingswood-consulting.co.uk>
parents:
diff changeset
     5
cvscall()
127e8c3466d1 convert: cvs.py - Allow user to use built-in CVS changeset code.
Frank Kingswood <frank@kingswood-consulting.co.uk>
parents:
diff changeset
     6
{
127e8c3466d1 convert: cvs.py - Allow user to use built-in CVS changeset code.
Frank Kingswood <frank@kingswood-consulting.co.uk>
parents:
diff changeset
     7
    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
     8
}
127e8c3466d1 convert: cvs.py - Allow user to use built-in CVS changeset code.
Frank Kingswood <frank@kingswood-consulting.co.uk>
parents:
diff changeset
     9
6717
2011bb8ada9a convert: hg sink commits without working dir
Patrick Mezard <pmezard@gmail.com>
parents: 6690
diff changeset
    10
hgcat()
2011bb8ada9a convert: hg sink commits without working dir
Patrick Mezard <pmezard@gmail.com>
parents: 6690
diff changeset
    11
{
2011bb8ada9a convert: hg sink commits without working dir
Patrick Mezard <pmezard@gmail.com>
parents: 6690
diff changeset
    12
    hg --cwd src-hg cat -r tip "$1"
2011bb8ada9a convert: hg sink commits without working dir
Patrick Mezard <pmezard@gmail.com>
parents: 6690
diff changeset
    13
}
2011bb8ada9a convert: hg sink commits without working dir
Patrick Mezard <pmezard@gmail.com>
parents: 6690
diff changeset
    14
6690
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 "[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
    16
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
    17
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
    18
10095
69ce7a10e593 convert: implement two hooks in builtin cvsps
Frank Kingswood <frank@kingswood-consulting.co.uk>
parents: 9602
diff changeset
    19
cat > cvshooks.py <<EOF
69ce7a10e593 convert: implement two hooks in builtin cvsps
Frank Kingswood <frank@kingswood-consulting.co.uk>
parents: 9602
diff changeset
    20
def cvslog(ui,repo,hooktype,log):
69ce7a10e593 convert: implement two hooks in builtin cvsps
Frank Kingswood <frank@kingswood-consulting.co.uk>
parents: 9602
diff changeset
    21
    print "%s hook: %d entries"%(hooktype,len(log))
69ce7a10e593 convert: implement two hooks in builtin cvsps
Frank Kingswood <frank@kingswood-consulting.co.uk>
parents: 9602
diff changeset
    22
69ce7a10e593 convert: implement two hooks in builtin cvsps
Frank Kingswood <frank@kingswood-consulting.co.uk>
parents: 9602
diff changeset
    23
def cvschangesets(ui,repo,hooktype,changesets):
69ce7a10e593 convert: implement two hooks in builtin cvsps
Frank Kingswood <frank@kingswood-consulting.co.uk>
parents: 9602
diff changeset
    24
    print "%s hook: %d changesets"%(hooktype,len(changesets))
69ce7a10e593 convert: implement two hooks in builtin cvsps
Frank Kingswood <frank@kingswood-consulting.co.uk>
parents: 9602
diff changeset
    25
EOF
10276
6109a02c682b Merge with stable
Martin Geisler <mg@lazybytes.net>
parents: 10095
diff changeset
    26
hookpath=`pwd`
10095
69ce7a10e593 convert: implement two hooks in builtin cvsps
Frank Kingswood <frank@kingswood-consulting.co.uk>
parents: 9602
diff changeset
    27
69ce7a10e593 convert: implement two hooks in builtin cvsps
Frank Kingswood <frank@kingswood-consulting.co.uk>
parents: 9602
diff changeset
    28
echo "[hooks]" >> $HGRCPATH
69ce7a10e593 convert: implement two hooks in builtin cvsps
Frank Kingswood <frank@kingswood-consulting.co.uk>
parents: 9602
diff changeset
    29
echo "cvslog=python:$hookpath/cvshooks.py:cvslog" >> $HGRCPATH
69ce7a10e593 convert: implement two hooks in builtin cvsps
Frank Kingswood <frank@kingswood-consulting.co.uk>
parents: 9602
diff changeset
    30
echo "cvschangesets=python:$hookpath/cvshooks.py:cvschangesets" >> $HGRCPATH
69ce7a10e593 convert: implement two hooks in builtin cvsps
Frank Kingswood <frank@kingswood-consulting.co.uk>
parents: 9602
diff changeset
    31
6690
127e8c3466d1 convert: cvs.py - Allow user to use built-in CVS changeset code.
Frank Kingswood <frank@kingswood-consulting.co.uk>
parents:
diff changeset
    32
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
    33
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
    34
cd cvsrepo
10276
6109a02c682b Merge with stable
Martin Geisler <mg@lazybytes.net>
parents: 10095
diff changeset
    35
CVSROOT=`pwd`
8350
1f0f01bc86a5 tests: avoid export FOO=bar bashism
Martin Geisler <mg@lazybytes.net>
parents: 7812
diff changeset
    36
export CVSROOT
1f0f01bc86a5 tests: avoid export FOO=bar bashism
Martin Geisler <mg@lazybytes.net>
parents: 7812
diff changeset
    37
CVS_OPTIONS=-f
1f0f01bc86a5 tests: avoid export FOO=bar bashism
Martin Geisler <mg@lazybytes.net>
parents: 7812
diff changeset
    38
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
    39
cd ..
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
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
    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
echo % create source directory
127e8c3466d1 convert: cvs.py - Allow user to use built-in CVS changeset code.
Frank Kingswood <frank@kingswood-consulting.co.uk>
parents:
diff changeset
    44
mkdir src-temp
127e8c3466d1 convert: cvs.py - Allow user to use built-in CVS changeset code.
Frank Kingswood <frank@kingswood-consulting.co.uk>
parents:
diff changeset
    45
cd src-temp
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 a > 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
mkdir b
127e8c3466d1 convert: cvs.py - Allow user to use built-in CVS changeset code.
Frank Kingswood <frank@kingswood-consulting.co.uk>
parents:
diff changeset
    48
cd b
127e8c3466d1 convert: cvs.py - Allow user to use built-in CVS changeset code.
Frank Kingswood <frank@kingswood-consulting.co.uk>
parents:
diff changeset
    49
echo c > c
127e8c3466d1 convert: cvs.py - Allow user to use built-in CVS changeset code.
Frank Kingswood <frank@kingswood-consulting.co.uk>
parents:
diff changeset
    50
cd ..
127e8c3466d1 convert: cvs.py - Allow user to use built-in CVS changeset code.
Frank Kingswood <frank@kingswood-consulting.co.uk>
parents:
diff changeset
    51
127e8c3466d1 convert: cvs.py - Allow user to use built-in CVS changeset code.
Frank Kingswood <frank@kingswood-consulting.co.uk>
parents:
diff changeset
    52
echo % import source directory
127e8c3466d1 convert: cvs.py - Allow user to use built-in CVS changeset code.
Frank Kingswood <frank@kingswood-consulting.co.uk>
parents:
diff changeset
    53
cvscall -q import -m import src INITIAL start
127e8c3466d1 convert: cvs.py - Allow user to use built-in CVS changeset code.
Frank Kingswood <frank@kingswood-consulting.co.uk>
parents:
diff changeset
    54
cd ..
127e8c3466d1 convert: cvs.py - Allow user to use built-in CVS changeset code.
Frank Kingswood <frank@kingswood-consulting.co.uk>
parents:
diff changeset
    55
127e8c3466d1 convert: cvs.py - Allow user to use built-in CVS changeset code.
Frank Kingswood <frank@kingswood-consulting.co.uk>
parents:
diff changeset
    56
echo % checkout source directory
127e8c3466d1 convert: cvs.py - Allow user to use built-in CVS changeset code.
Frank Kingswood <frank@kingswood-consulting.co.uk>
parents:
diff changeset
    57
cvscall -q checkout src
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
echo % commit a new revision changing b/c
127e8c3466d1 convert: cvs.py - Allow user to use built-in CVS changeset code.
Frank Kingswood <frank@kingswood-consulting.co.uk>
parents:
diff changeset
    60
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
    61
sleep 1
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 c >> b/c
127e8c3466d1 convert: cvs.py - Allow user to use built-in CVS changeset code.
Frank Kingswood <frank@kingswood-consulting.co.uk>
parents:
diff changeset
    63
cvscall -q commit -mci0 . | grep '<--' |\
127e8c3466d1 convert: cvs.py - Allow user to use built-in CVS changeset code.
Frank Kingswood <frank@kingswood-consulting.co.uk>
parents:
diff changeset
    64
    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
    65
cd ..
127e8c3466d1 convert: cvs.py - Allow user to use built-in CVS changeset code.
Frank Kingswood <frank@kingswood-consulting.co.uk>
parents:
diff changeset
    66
127e8c3466d1 convert: cvs.py - Allow user to use built-in CVS changeset code.
Frank Kingswood <frank@kingswood-consulting.co.uk>
parents:
diff changeset
    67
echo % convert fresh repo
127e8c3466d1 convert: cvs.py - Allow user to use built-in CVS changeset code.
Frank Kingswood <frank@kingswood-consulting.co.uk>
parents:
diff changeset
    68
hg convert src src-hg | sed -e 's/connecting to.*cvsrepo/connecting to cvsrepo/g'
6717
2011bb8ada9a convert: hg sink commits without working dir
Patrick Mezard <pmezard@gmail.com>
parents: 6690
diff changeset
    69
hgcat a
2011bb8ada9a convert: hg sink commits without working dir
Patrick Mezard <pmezard@gmail.com>
parents: 6690
diff changeset
    70
hgcat b/c
6690
127e8c3466d1 convert: cvs.py - Allow user to use built-in CVS changeset code.
Frank Kingswood <frank@kingswood-consulting.co.uk>
parents:
diff changeset
    71
127e8c3466d1 convert: cvs.py - Allow user to use built-in CVS changeset code.
Frank Kingswood <frank@kingswood-consulting.co.uk>
parents:
diff changeset
    72
echo % convert fresh repo with --filemap
127e8c3466d1 convert: cvs.py - Allow user to use built-in CVS changeset code.
Frank Kingswood <frank@kingswood-consulting.co.uk>
parents:
diff changeset
    73
echo include b/c > filemap
127e8c3466d1 convert: cvs.py - Allow user to use built-in CVS changeset code.
Frank Kingswood <frank@kingswood-consulting.co.uk>
parents:
diff changeset
    74
hg convert --filemap filemap src src-filemap | sed -e 's/connecting to.*cvsrepo/connecting to cvsrepo/g'
6717
2011bb8ada9a convert: hg sink commits without working dir
Patrick Mezard <pmezard@gmail.com>
parents: 6690
diff changeset
    75
hgcat b/c
8523
5b7da468531b tests: replace #...# syntax with {...}
Martin Geisler <mg@lazybytes.net>
parents: 8350
diff changeset
    76
hg -R src-filemap log --template '{rev} {desc} files: {files}\n'
6690
127e8c3466d1 convert: cvs.py - Allow user to use built-in CVS changeset code.
Frank Kingswood <frank@kingswood-consulting.co.uk>
parents:
diff changeset
    77
10695
b4b16e90712f convert: teach cvsps to handle . repository (issue1649)
Mathieu Clabaut <mathieu.clabaut@systerel.fr>
parents: 10276
diff changeset
    78
echo % 'convert full repository (issue1649)'
b4b16e90712f convert: teach cvsps to handle . repository (issue1649)
Mathieu Clabaut <mathieu.clabaut@systerel.fr>
parents: 10276
diff changeset
    79
cvscall -q -d "$CVSROOT" checkout -d srcfull "." | grep -v CVSROOT
b4b16e90712f convert: teach cvsps to handle . repository (issue1649)
Mathieu Clabaut <mathieu.clabaut@systerel.fr>
parents: 10276
diff changeset
    80
ls srcfull
b4b16e90712f convert: teach cvsps to handle . repository (issue1649)
Mathieu Clabaut <mathieu.clabaut@systerel.fr>
parents: 10276
diff changeset
    81
hg convert srcfull srcfull-hg \
b4b16e90712f convert: teach cvsps to handle . repository (issue1649)
Mathieu Clabaut <mathieu.clabaut@systerel.fr>
parents: 10276
diff changeset
    82
    | sed -e 's/connecting to.*cvsrepo/connecting to cvsrepo/g' \
10760
bdb60057f905 test-convert-cvs: filter unstable cvs output.
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 10695
diff changeset
    83
    | grep -v 'log entries' | grep -v 'hook:' \
bdb60057f905 test-convert-cvs: filter unstable cvs output.
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 10695
diff changeset
    84
    | grep -v '^[0-3] .*' # filter instable changeset order
10695
b4b16e90712f convert: teach cvsps to handle . repository (issue1649)
Mathieu Clabaut <mathieu.clabaut@systerel.fr>
parents: 10276
diff changeset
    85
hg cat -r tip srcfull-hg/src/a
b4b16e90712f convert: teach cvsps to handle . repository (issue1649)
Mathieu Clabaut <mathieu.clabaut@systerel.fr>
parents: 10276
diff changeset
    86
hg cat -r tip srcfull-hg/src/b/c
b4b16e90712f convert: teach cvsps to handle . repository (issue1649)
Mathieu Clabaut <mathieu.clabaut@systerel.fr>
parents: 10276
diff changeset
    87
6690
127e8c3466d1 convert: cvs.py - Allow user to use built-in CVS changeset code.
Frank Kingswood <frank@kingswood-consulting.co.uk>
parents:
diff changeset
    88
echo % commit new file revisions
127e8c3466d1 convert: cvs.py - Allow user to use built-in CVS changeset code.
Frank Kingswood <frank@kingswood-consulting.co.uk>
parents:
diff changeset
    89
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
    90
echo a >> a
127e8c3466d1 convert: cvs.py - Allow user to use built-in CVS changeset code.
Frank Kingswood <frank@kingswood-consulting.co.uk>
parents:
diff changeset
    91
echo c >> b/c
127e8c3466d1 convert: cvs.py - Allow user to use built-in CVS changeset code.
Frank Kingswood <frank@kingswood-consulting.co.uk>
parents:
diff changeset
    92
cvscall -q commit -mci1 . | grep '<--' |\
127e8c3466d1 convert: cvs.py - Allow user to use built-in CVS changeset code.
Frank Kingswood <frank@kingswood-consulting.co.uk>
parents:
diff changeset
    93
    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
    94
cd ..
127e8c3466d1 convert: cvs.py - Allow user to use built-in CVS changeset code.
Frank Kingswood <frank@kingswood-consulting.co.uk>
parents:
diff changeset
    95
127e8c3466d1 convert: cvs.py - Allow user to use built-in CVS changeset code.
Frank Kingswood <frank@kingswood-consulting.co.uk>
parents:
diff changeset
    96
echo % convert again
127e8c3466d1 convert: cvs.py - Allow user to use built-in CVS changeset code.
Frank Kingswood <frank@kingswood-consulting.co.uk>
parents:
diff changeset
    97
hg convert src src-hg | sed -e 's/connecting to.*cvsrepo/connecting to cvsrepo/g'
6717
2011bb8ada9a convert: hg sink commits without working dir
Patrick Mezard <pmezard@gmail.com>
parents: 6690
diff changeset
    98
hgcat a
2011bb8ada9a convert: hg sink commits without working dir
Patrick Mezard <pmezard@gmail.com>
parents: 6690
diff changeset
    99
hgcat b/c
6690
127e8c3466d1 convert: cvs.py - Allow user to use built-in CVS changeset code.
Frank Kingswood <frank@kingswood-consulting.co.uk>
parents:
diff changeset
   100
127e8c3466d1 convert: cvs.py - Allow user to use built-in CVS changeset code.
Frank Kingswood <frank@kingswood-consulting.co.uk>
parents:
diff changeset
   101
echo % convert again with --filemap
127e8c3466d1 convert: cvs.py - Allow user to use built-in CVS changeset code.
Frank Kingswood <frank@kingswood-consulting.co.uk>
parents:
diff changeset
   102
hg convert --filemap filemap src src-filemap | sed -e 's/connecting to.*cvsrepo/connecting to cvsrepo/g'
6717
2011bb8ada9a convert: hg sink commits without working dir
Patrick Mezard <pmezard@gmail.com>
parents: 6690
diff changeset
   103
hgcat b/c
8523
5b7da468531b tests: replace #...# syntax with {...}
Martin Geisler <mg@lazybytes.net>
parents: 8350
diff changeset
   104
hg -R src-filemap log --template '{rev} {desc} files: {files}\n'
6690
127e8c3466d1 convert: cvs.py - Allow user to use built-in CVS changeset code.
Frank Kingswood <frank@kingswood-consulting.co.uk>
parents:
diff changeset
   105
127e8c3466d1 convert: cvs.py - Allow user to use built-in CVS changeset code.
Frank Kingswood <frank@kingswood-consulting.co.uk>
parents:
diff changeset
   106
echo % commit branch
127e8c3466d1 convert: cvs.py - Allow user to use built-in CVS changeset code.
Frank Kingswood <frank@kingswood-consulting.co.uk>
parents:
diff changeset
   107
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
   108
cvs -q update -r1.1 b/c
127e8c3466d1 convert: cvs.py - Allow user to use built-in CVS changeset code.
Frank Kingswood <frank@kingswood-consulting.co.uk>
parents:
diff changeset
   109
cvs -q tag -b branch
7812
18048153fd4e test-convert-cvs*: mute output from "cvs up"
Mads Kiilerich <mads@kiilerich.com>
parents: 7594
diff changeset
   110
cvs -q update -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
   111
echo d >> b/c
127e8c3466d1 convert: cvs.py - Allow user to use built-in CVS changeset code.
Frank Kingswood <frank@kingswood-consulting.co.uk>
parents:
diff changeset
   112
cvs -q commit -mci2 . | grep '<--' |\
127e8c3466d1 convert: cvs.py - Allow user to use built-in CVS changeset code.
Frank Kingswood <frank@kingswood-consulting.co.uk>
parents:
diff changeset
   113
    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
   114
cd ..
127e8c3466d1 convert: cvs.py - Allow user to use built-in CVS changeset code.
Frank Kingswood <frank@kingswood-consulting.co.uk>
parents:
diff changeset
   115
127e8c3466d1 convert: cvs.py - Allow user to use built-in CVS changeset code.
Frank Kingswood <frank@kingswood-consulting.co.uk>
parents:
diff changeset
   116
echo % convert again
127e8c3466d1 convert: cvs.py - Allow user to use built-in CVS changeset code.
Frank Kingswood <frank@kingswood-consulting.co.uk>
parents:
diff changeset
   117
hg convert src src-hg | sed -e 's/connecting to.*cvsrepo/connecting to cvsrepo/g'
6717
2011bb8ada9a convert: hg sink commits without working dir
Patrick Mezard <pmezard@gmail.com>
parents: 6690
diff changeset
   118
hgcat b/c
6690
127e8c3466d1 convert: cvs.py - Allow user to use built-in CVS changeset code.
Frank Kingswood <frank@kingswood-consulting.co.uk>
parents:
diff changeset
   119
127e8c3466d1 convert: cvs.py - Allow user to use built-in CVS changeset code.
Frank Kingswood <frank@kingswood-consulting.co.uk>
parents:
diff changeset
   120
echo % convert again with --filemap
127e8c3466d1 convert: cvs.py - Allow user to use built-in CVS changeset code.
Frank Kingswood <frank@kingswood-consulting.co.uk>
parents:
diff changeset
   121
hg convert --filemap filemap src src-filemap | sed -e 's/connecting to.*cvsrepo/connecting to cvsrepo/g'
6717
2011bb8ada9a convert: hg sink commits without working dir
Patrick Mezard <pmezard@gmail.com>
parents: 6690
diff changeset
   122
hgcat b/c
8523
5b7da468531b tests: replace #...# syntax with {...}
Martin Geisler <mg@lazybytes.net>
parents: 8350
diff changeset
   123
hg -R src-filemap log --template '{rev} {desc} files: {files}\n'
6690
127e8c3466d1 convert: cvs.py - Allow user to use built-in CVS changeset code.
Frank Kingswood <frank@kingswood-consulting.co.uk>
parents:
diff changeset
   124
7594
a204547790bc test: added testcase for cvsps log message lookahead
Frank Kingswood <frank@kingswood-consulting.co.uk>
parents: 7503
diff changeset
   125
echo % commit a new revision with funny log message
a204547790bc test: added testcase for cvsps log message lookahead
Frank Kingswood <frank@kingswood-consulting.co.uk>
parents: 7503
diff changeset
   126
cd src
a204547790bc test: added testcase for cvsps log message lookahead
Frank Kingswood <frank@kingswood-consulting.co.uk>
parents: 7503
diff changeset
   127
sleep 1
a204547790bc test: added testcase for cvsps log message lookahead
Frank Kingswood <frank@kingswood-consulting.co.uk>
parents: 7503
diff changeset
   128
echo e >> a
a204547790bc test: added testcase for cvsps log message lookahead
Frank Kingswood <frank@kingswood-consulting.co.uk>
parents: 7503
diff changeset
   129
cvscall -q commit -m'funny
a204547790bc test: added testcase for cvsps log message lookahead
Frank Kingswood <frank@kingswood-consulting.co.uk>
parents: 7503
diff changeset
   130
----------------------------
a204547790bc test: added testcase for cvsps log message lookahead
Frank Kingswood <frank@kingswood-consulting.co.uk>
parents: 7503
diff changeset
   131
log message' . | grep '<--' |\
a204547790bc test: added testcase for cvsps log message lookahead
Frank Kingswood <frank@kingswood-consulting.co.uk>
parents: 7503
diff changeset
   132
    sed -e 's:.*src/\(.*\),v.*:checking in src/\1,v:g'
a204547790bc test: added testcase for cvsps log message lookahead
Frank Kingswood <frank@kingswood-consulting.co.uk>
parents: 7503
diff changeset
   133
cd ..
a204547790bc test: added testcase for cvsps log message lookahead
Frank Kingswood <frank@kingswood-consulting.co.uk>
parents: 7503
diff changeset
   134
12029
84a09639d9f1 test-convert-cvs: test fuzz
Mads Kiilerich <mads at kiilerich.com>
parents: 10760
diff changeset
   135
echo % commit new file revisions with some fuzz
84a09639d9f1 test-convert-cvs: test fuzz
Mads Kiilerich <mads at kiilerich.com>
parents: 10760
diff changeset
   136
cd src
12153
d598d24a7e67 test-convert-cvs: add a sleep to make test more stable
Mads Kiilerich <mads@kiilerich.com>
parents: 12029
diff changeset
   137
sleep 1
12029
84a09639d9f1 test-convert-cvs: test fuzz
Mads Kiilerich <mads at kiilerich.com>
parents: 10760
diff changeset
   138
echo f >> a
84a09639d9f1 test-convert-cvs: test fuzz
Mads Kiilerich <mads at kiilerich.com>
parents: 10760
diff changeset
   139
cvscall -q commit -mfuzzy . | grep '<--' |\
84a09639d9f1 test-convert-cvs: test fuzz
Mads Kiilerich <mads at kiilerich.com>
parents: 10760
diff changeset
   140
    sed -e 's:.*src/\(.*\),v.*:checking in src/\1,v:g'
84a09639d9f1 test-convert-cvs: test fuzz
Mads Kiilerich <mads at kiilerich.com>
parents: 10760
diff changeset
   141
sleep 4 # the two changes will be split if fuzz < 4
84a09639d9f1 test-convert-cvs: test fuzz
Mads Kiilerich <mads at kiilerich.com>
parents: 10760
diff changeset
   142
echo g >> b/c
84a09639d9f1 test-convert-cvs: test fuzz
Mads Kiilerich <mads at kiilerich.com>
parents: 10760
diff changeset
   143
cvscall -q commit -mfuzzy . | grep '<--' |\
84a09639d9f1 test-convert-cvs: test fuzz
Mads Kiilerich <mads at kiilerich.com>
parents: 10760
diff changeset
   144
    sed -e 's:.*src/\(.*\),v.*:checking in src/\1,v:g'
84a09639d9f1 test-convert-cvs: test fuzz
Mads Kiilerich <mads at kiilerich.com>
parents: 10760
diff changeset
   145
cd ..
84a09639d9f1 test-convert-cvs: test fuzz
Mads Kiilerich <mads at kiilerich.com>
parents: 10760
diff changeset
   146
7594
a204547790bc test: added testcase for cvsps log message lookahead
Frank Kingswood <frank@kingswood-consulting.co.uk>
parents: 7503
diff changeset
   147
echo % convert again
12029
84a09639d9f1 test-convert-cvs: test fuzz
Mads Kiilerich <mads at kiilerich.com>
parents: 10760
diff changeset
   148
hg convert --config convert.cvsps.fuzz=2 src src-hg | sed -e 's/connecting to.*cvsrepo/connecting to cvsrepo/g'
7594
a204547790bc test: added testcase for cvsps log message lookahead
Frank Kingswood <frank@kingswood-consulting.co.uk>
parents: 7503
diff changeset
   149
8523
5b7da468531b tests: replace #...# syntax with {...}
Martin Geisler <mg@lazybytes.net>
parents: 8350
diff changeset
   150
hg -R src-hg glog --template '{rev} ({branches}) {desc} files: {files}\n'
7503
09508f8e2fa4 test-convert-cvs-builtincvsps: test debugcvsps command
Patrick Mezard <pmezard@gmail.com>
parents: 6717
diff changeset
   151
09508f8e2fa4 test-convert-cvs-builtincvsps: test debugcvsps command
Patrick Mezard <pmezard@gmail.com>
parents: 6717
diff changeset
   152
echo % testing debugcvsps
09508f8e2fa4 test-convert-cvs-builtincvsps: test debugcvsps command
Patrick Mezard <pmezard@gmail.com>
parents: 6717
diff changeset
   153
cd src
12029
84a09639d9f1 test-convert-cvs: test fuzz
Mads Kiilerich <mads at kiilerich.com>
parents: 10760
diff changeset
   154
hg debugcvsps --fuzz=2 | sed -e 's/Author:.*/Author:/' -e 's/Date:.*/Date:/'