##// END OF EJS Templates
tests: unify test-convert-authormap
Matt Mackall -
r12511:0fefeb4f default
parent child Browse files
Show More
@@ -1,37 +1,58 b''
1 #!/bin/sh
2
1
3 cat >> $HGRCPATH <<EOF
2 $ cat >> $HGRCPATH <<EOF
4 [extensions]
3 > [extensions]
5 convert=
4 > convert=
6 EOF
5 > EOF
6
7 Prepare orig repo
7
8
8 # Prepare orig repo
9 $ hg init orig
9 hg init orig
10 $ cd orig
10 cd orig
11 $ echo foo > foo
11 echo foo > foo
12 $ HGUSER='user name' hg ci -qAm 'foo'
12 HGUSER='user name' hg ci -qAm 'foo'
13 $ cd ..
13 cd ..
14
14
15 # Explicit --authors
15 Explicit --authors
16 cat > authormap.txt <<EOF
17 user name = Long User Name
18
16
19 # comment
17 $ cat > authormap.txt <<EOF
20 this line is ignored
18 > user name = Long User Name
21 EOF
19 >
22
20 > # comment
23 hg convert --authors authormap.txt orig new
21 > this line is ignored
24 echo $?
22 > EOF
25 cat new/.hg/authormap
23 $ hg convert --authors authormap.txt orig new
24 initializing destination new repository
25 Ignoring bad line in author map file authormap.txt: this line is ignored
26 scanning source...
27 sorting...
28 converting...
29 0 foo
30 Writing author map file new/.hg/authormap
31 $ cat new/.hg/authormap
32 user name=Long User Name
33 $ hg -Rnew log
34 changeset: 0:d89716e88087
35 tag: tip
36 user: Long User Name
37 date: Thu Jan 01 00:00:00 1970 +0000
38 summary: foo
39
40 $ rm -rf new
26
41
27 hg -Rnew log
42 Implicit .hg/authormap
28 rm -rf new
29
43
30 # Implicit .hg/authormap
44 $ hg init new
31 hg init new
45 $ mv authormap.txt new/.hg/authormap
32 mv authormap.txt new/.hg/authormap
46 $ hg convert orig new
33
47 Ignoring bad line in author map file new/.hg/authormap: this line is ignored
34 hg convert orig new
48 scanning source...
35 echo $?
49 sorting...
36
50 converting...
37 hg -Rnew log
51 0 foo
52 $ hg -Rnew log
53 changeset: 0:d89716e88087
54 tag: tip
55 user: Long User Name
56 date: Thu Jan 01 00:00:00 1970 +0000
57 summary: foo
58
1 NO CONTENT: file was removed
NO CONTENT: file was removed
General Comments 0
You need to be logged in to leave comments. Login now