annotate tests/test-convert-authormap @ 7961:52e442fe43f4

convert: Add testcase for convert authormap.
author Marti Raudsepp <marti@juffo.org>
date Sat, 14 Mar 2009 14:31:08 +0200
parents
children 62154415821f
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
7961
52e442fe43f4 convert: Add testcase for convert authormap.
Marti Raudsepp <marti@juffo.org>
parents:
diff changeset
1 #!/bin/sh
52e442fe43f4 convert: Add testcase for convert authormap.
Marti Raudsepp <marti@juffo.org>
parents:
diff changeset
2
52e442fe43f4 convert: Add testcase for convert authormap.
Marti Raudsepp <marti@juffo.org>
parents:
diff changeset
3 cat >> $HGRCPATH <<EOF
52e442fe43f4 convert: Add testcase for convert authormap.
Marti Raudsepp <marti@juffo.org>
parents:
diff changeset
4 [extensions]
52e442fe43f4 convert: Add testcase for convert authormap.
Marti Raudsepp <marti@juffo.org>
parents:
diff changeset
5 convert=
52e442fe43f4 convert: Add testcase for convert authormap.
Marti Raudsepp <marti@juffo.org>
parents:
diff changeset
6 EOF
52e442fe43f4 convert: Add testcase for convert authormap.
Marti Raudsepp <marti@juffo.org>
parents:
diff changeset
7
52e442fe43f4 convert: Add testcase for convert authormap.
Marti Raudsepp <marti@juffo.org>
parents:
diff changeset
8 # Prepare orig repo
52e442fe43f4 convert: Add testcase for convert authormap.
Marti Raudsepp <marti@juffo.org>
parents:
diff changeset
9 hg init orig
52e442fe43f4 convert: Add testcase for convert authormap.
Marti Raudsepp <marti@juffo.org>
parents:
diff changeset
10 cd orig
52e442fe43f4 convert: Add testcase for convert authormap.
Marti Raudsepp <marti@juffo.org>
parents:
diff changeset
11 echo foo > foo
52e442fe43f4 convert: Add testcase for convert authormap.
Marti Raudsepp <marti@juffo.org>
parents:
diff changeset
12 HGUSER='user name' hg ci -qAm 'foo' -d '0 0'
52e442fe43f4 convert: Add testcase for convert authormap.
Marti Raudsepp <marti@juffo.org>
parents:
diff changeset
13 cd ..
52e442fe43f4 convert: Add testcase for convert authormap.
Marti Raudsepp <marti@juffo.org>
parents:
diff changeset
14
52e442fe43f4 convert: Add testcase for convert authormap.
Marti Raudsepp <marti@juffo.org>
parents:
diff changeset
15 # Explicit --authors
52e442fe43f4 convert: Add testcase for convert authormap.
Marti Raudsepp <marti@juffo.org>
parents:
diff changeset
16 cat > authormap.txt <<EOF
52e442fe43f4 convert: Add testcase for convert authormap.
Marti Raudsepp <marti@juffo.org>
parents:
diff changeset
17 user name = Long User Name
52e442fe43f4 convert: Add testcase for convert authormap.
Marti Raudsepp <marti@juffo.org>
parents:
diff changeset
18 EOF
52e442fe43f4 convert: Add testcase for convert authormap.
Marti Raudsepp <marti@juffo.org>
parents:
diff changeset
19
52e442fe43f4 convert: Add testcase for convert authormap.
Marti Raudsepp <marti@juffo.org>
parents:
diff changeset
20 hg convert --authors authormap.txt orig new
52e442fe43f4 convert: Add testcase for convert authormap.
Marti Raudsepp <marti@juffo.org>
parents:
diff changeset
21 echo $?
52e442fe43f4 convert: Add testcase for convert authormap.
Marti Raudsepp <marti@juffo.org>
parents:
diff changeset
22 cat new/.hg/authormap
52e442fe43f4 convert: Add testcase for convert authormap.
Marti Raudsepp <marti@juffo.org>
parents:
diff changeset
23
52e442fe43f4 convert: Add testcase for convert authormap.
Marti Raudsepp <marti@juffo.org>
parents:
diff changeset
24 hg -Rnew log
52e442fe43f4 convert: Add testcase for convert authormap.
Marti Raudsepp <marti@juffo.org>
parents:
diff changeset
25 rm -rf new
52e442fe43f4 convert: Add testcase for convert authormap.
Marti Raudsepp <marti@juffo.org>
parents:
diff changeset
26
52e442fe43f4 convert: Add testcase for convert authormap.
Marti Raudsepp <marti@juffo.org>
parents:
diff changeset
27 # Implicit .hg/authormap
52e442fe43f4 convert: Add testcase for convert authormap.
Marti Raudsepp <marti@juffo.org>
parents:
diff changeset
28 hg init new
52e442fe43f4 convert: Add testcase for convert authormap.
Marti Raudsepp <marti@juffo.org>
parents:
diff changeset
29 mv authormap.txt new/.hg/authormap
52e442fe43f4 convert: Add testcase for convert authormap.
Marti Raudsepp <marti@juffo.org>
parents:
diff changeset
30
52e442fe43f4 convert: Add testcase for convert authormap.
Marti Raudsepp <marti@juffo.org>
parents:
diff changeset
31 hg convert orig new
52e442fe43f4 convert: Add testcase for convert authormap.
Marti Raudsepp <marti@juffo.org>
parents:
diff changeset
32 echo $?
52e442fe43f4 convert: Add testcase for convert authormap.
Marti Raudsepp <marti@juffo.org>
parents:
diff changeset
33
52e442fe43f4 convert: Add testcase for convert authormap.
Marti Raudsepp <marti@juffo.org>
parents:
diff changeset
34 hg -Rnew log