annotate tests/test-git-import @ 3685:193e9c6d1a6d

Issue424: mq patch loses guard when qrenamed
author Mathieu Clabaut <mathieu.clabaut@gmail.com>
date Sun, 19 Nov 2006 23:47:19 +0100
parents 1c9b6f1237e0
children 05c8704a3743
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
2864
e2b69dbb2daa Tests for git import
Brendan Cully <brendan@kublai.com>
parents:
diff changeset
1 #!/bin/sh
e2b69dbb2daa Tests for git import
Brendan Cully <brendan@kublai.com>
parents:
diff changeset
2
e2b69dbb2daa Tests for git import
Brendan Cully <brendan@kublai.com>
parents:
diff changeset
3 hg init a
e2b69dbb2daa Tests for git import
Brendan Cully <brendan@kublai.com>
parents:
diff changeset
4 cd a
e2b69dbb2daa Tests for git import
Brendan Cully <brendan@kublai.com>
parents:
diff changeset
5
e2b69dbb2daa Tests for git import
Brendan Cully <brendan@kublai.com>
parents:
diff changeset
6 echo % new file
e2b69dbb2daa Tests for git import
Brendan Cully <brendan@kublai.com>
parents:
diff changeset
7 hg import -mnew - <<EOF
e2b69dbb2daa Tests for git import
Brendan Cully <brendan@kublai.com>
parents:
diff changeset
8 diff --git a/new b/new
e2b69dbb2daa Tests for git import
Brendan Cully <brendan@kublai.com>
parents:
diff changeset
9 new file mode 100644
e2b69dbb2daa Tests for git import
Brendan Cully <brendan@kublai.com>
parents:
diff changeset
10 index 0000000..7898192
e2b69dbb2daa Tests for git import
Brendan Cully <brendan@kublai.com>
parents:
diff changeset
11 --- /dev/null
e2b69dbb2daa Tests for git import
Brendan Cully <brendan@kublai.com>
parents:
diff changeset
12 +++ b/new
e2b69dbb2daa Tests for git import
Brendan Cully <brendan@kublai.com>
parents:
diff changeset
13 @@ -0,0 +1 @@
e2b69dbb2daa Tests for git import
Brendan Cully <brendan@kublai.com>
parents:
diff changeset
14 +a
e2b69dbb2daa Tests for git import
Brendan Cully <brendan@kublai.com>
parents:
diff changeset
15 EOF
e2b69dbb2daa Tests for git import
Brendan Cully <brendan@kublai.com>
parents:
diff changeset
16
3589
1c9b6f1237e0 test for git empty new files
Brendan Cully <brendan@kublai.com>
parents: 2864
diff changeset
17 echo % new empty file
1c9b6f1237e0 test for git empty new files
Brendan Cully <brendan@kublai.com>
parents: 2864
diff changeset
18 hg import -mempty - <<EOF
1c9b6f1237e0 test for git empty new files
Brendan Cully <brendan@kublai.com>
parents: 2864
diff changeset
19 diff --git a/empty b/empty
1c9b6f1237e0 test for git empty new files
Brendan Cully <brendan@kublai.com>
parents: 2864
diff changeset
20 new file mode 100644
1c9b6f1237e0 test for git empty new files
Brendan Cully <brendan@kublai.com>
parents: 2864
diff changeset
21 EOF
1c9b6f1237e0 test for git empty new files
Brendan Cully <brendan@kublai.com>
parents: 2864
diff changeset
22 hg locate empty
1c9b6f1237e0 test for git empty new files
Brendan Cully <brendan@kublai.com>
parents: 2864
diff changeset
23
2864
e2b69dbb2daa Tests for git import
Brendan Cully <brendan@kublai.com>
parents:
diff changeset
24 echo % chmod +x
e2b69dbb2daa Tests for git import
Brendan Cully <brendan@kublai.com>
parents:
diff changeset
25 hg import -msetx - <<EOF
e2b69dbb2daa Tests for git import
Brendan Cully <brendan@kublai.com>
parents:
diff changeset
26 diff --git a/new b/new
e2b69dbb2daa Tests for git import
Brendan Cully <brendan@kublai.com>
parents:
diff changeset
27 old mode 100644
e2b69dbb2daa Tests for git import
Brendan Cully <brendan@kublai.com>
parents:
diff changeset
28 new mode 100755
e2b69dbb2daa Tests for git import
Brendan Cully <brendan@kublai.com>
parents:
diff changeset
29 EOF
e2b69dbb2daa Tests for git import
Brendan Cully <brendan@kublai.com>
parents:
diff changeset
30
e2b69dbb2daa Tests for git import
Brendan Cully <brendan@kublai.com>
parents:
diff changeset
31 test -x new || echo failed
e2b69dbb2daa Tests for git import
Brendan Cully <brendan@kublai.com>
parents:
diff changeset
32
e2b69dbb2daa Tests for git import
Brendan Cully <brendan@kublai.com>
parents:
diff changeset
33 echo % copy
e2b69dbb2daa Tests for git import
Brendan Cully <brendan@kublai.com>
parents:
diff changeset
34 hg import -mcopy - <<EOF
e2b69dbb2daa Tests for git import
Brendan Cully <brendan@kublai.com>
parents:
diff changeset
35 diff --git a/new b/copy
e2b69dbb2daa Tests for git import
Brendan Cully <brendan@kublai.com>
parents:
diff changeset
36 old mode 100755
e2b69dbb2daa Tests for git import
Brendan Cully <brendan@kublai.com>
parents:
diff changeset
37 new mode 100644
e2b69dbb2daa Tests for git import
Brendan Cully <brendan@kublai.com>
parents:
diff changeset
38 similarity index 100%
e2b69dbb2daa Tests for git import
Brendan Cully <brendan@kublai.com>
parents:
diff changeset
39 copy from new
e2b69dbb2daa Tests for git import
Brendan Cully <brendan@kublai.com>
parents:
diff changeset
40 copy to copy
e2b69dbb2daa Tests for git import
Brendan Cully <brendan@kublai.com>
parents:
diff changeset
41 diff --git a/new b/copyx
e2b69dbb2daa Tests for git import
Brendan Cully <brendan@kublai.com>
parents:
diff changeset
42 similarity index 100%
e2b69dbb2daa Tests for git import
Brendan Cully <brendan@kublai.com>
parents:
diff changeset
43 copy from new
e2b69dbb2daa Tests for git import
Brendan Cully <brendan@kublai.com>
parents:
diff changeset
44 copy to copyx
e2b69dbb2daa Tests for git import
Brendan Cully <brendan@kublai.com>
parents:
diff changeset
45 EOF
e2b69dbb2daa Tests for git import
Brendan Cully <brendan@kublai.com>
parents:
diff changeset
46
e2b69dbb2daa Tests for git import
Brendan Cully <brendan@kublai.com>
parents:
diff changeset
47 test -f copy -a ! -x copy || echo failed
e2b69dbb2daa Tests for git import
Brendan Cully <brendan@kublai.com>
parents:
diff changeset
48 test -x copyx || echo failed
e2b69dbb2daa Tests for git import
Brendan Cully <brendan@kublai.com>
parents:
diff changeset
49 cat copy
e2b69dbb2daa Tests for git import
Brendan Cully <brendan@kublai.com>
parents:
diff changeset
50 hg cat copy
e2b69dbb2daa Tests for git import
Brendan Cully <brendan@kublai.com>
parents:
diff changeset
51
e2b69dbb2daa Tests for git import
Brendan Cully <brendan@kublai.com>
parents:
diff changeset
52 echo % rename
e2b69dbb2daa Tests for git import
Brendan Cully <brendan@kublai.com>
parents:
diff changeset
53 hg import -mrename - <<EOF
e2b69dbb2daa Tests for git import
Brendan Cully <brendan@kublai.com>
parents:
diff changeset
54 diff --git a/copy b/rename
e2b69dbb2daa Tests for git import
Brendan Cully <brendan@kublai.com>
parents:
diff changeset
55 similarity index 100%
e2b69dbb2daa Tests for git import
Brendan Cully <brendan@kublai.com>
parents:
diff changeset
56 rename from copy
e2b69dbb2daa Tests for git import
Brendan Cully <brendan@kublai.com>
parents:
diff changeset
57 rename to rename
e2b69dbb2daa Tests for git import
Brendan Cully <brendan@kublai.com>
parents:
diff changeset
58 EOF
e2b69dbb2daa Tests for git import
Brendan Cully <brendan@kublai.com>
parents:
diff changeset
59
e2b69dbb2daa Tests for git import
Brendan Cully <brendan@kublai.com>
parents:
diff changeset
60 hg locate
e2b69dbb2daa Tests for git import
Brendan Cully <brendan@kublai.com>
parents:
diff changeset
61
e2b69dbb2daa Tests for git import
Brendan Cully <brendan@kublai.com>
parents:
diff changeset
62 echo % delete
e2b69dbb2daa Tests for git import
Brendan Cully <brendan@kublai.com>
parents:
diff changeset
63 hg import -mdelete - <<EOF
e2b69dbb2daa Tests for git import
Brendan Cully <brendan@kublai.com>
parents:
diff changeset
64 diff --git a/copyx b/copyx
e2b69dbb2daa Tests for git import
Brendan Cully <brendan@kublai.com>
parents:
diff changeset
65 deleted file mode 100755
e2b69dbb2daa Tests for git import
Brendan Cully <brendan@kublai.com>
parents:
diff changeset
66 index 7898192..0000000
e2b69dbb2daa Tests for git import
Brendan Cully <brendan@kublai.com>
parents:
diff changeset
67 --- a/copyx
e2b69dbb2daa Tests for git import
Brendan Cully <brendan@kublai.com>
parents:
diff changeset
68 +++ /dev/null
e2b69dbb2daa Tests for git import
Brendan Cully <brendan@kublai.com>
parents:
diff changeset
69 @@ -1 +0,0 @@
e2b69dbb2daa Tests for git import
Brendan Cully <brendan@kublai.com>
parents:
diff changeset
70 -a
e2b69dbb2daa Tests for git import
Brendan Cully <brendan@kublai.com>
parents:
diff changeset
71 EOF
e2b69dbb2daa Tests for git import
Brendan Cully <brendan@kublai.com>
parents:
diff changeset
72
e2b69dbb2daa Tests for git import
Brendan Cully <brendan@kublai.com>
parents:
diff changeset
73 hg locate
e2b69dbb2daa Tests for git import
Brendan Cully <brendan@kublai.com>
parents:
diff changeset
74 test -f copyx && echo failed || true
e2b69dbb2daa Tests for git import
Brendan Cully <brendan@kublai.com>
parents:
diff changeset
75
e2b69dbb2daa Tests for git import
Brendan Cully <brendan@kublai.com>
parents:
diff changeset
76 echo % regular diff
e2b69dbb2daa Tests for git import
Brendan Cully <brendan@kublai.com>
parents:
diff changeset
77 hg import -mregular - <<EOF
e2b69dbb2daa Tests for git import
Brendan Cully <brendan@kublai.com>
parents:
diff changeset
78 diff --git a/rename b/rename
e2b69dbb2daa Tests for git import
Brendan Cully <brendan@kublai.com>
parents:
diff changeset
79 index 7898192..72e1fe3 100644
e2b69dbb2daa Tests for git import
Brendan Cully <brendan@kublai.com>
parents:
diff changeset
80 --- a/rename
e2b69dbb2daa Tests for git import
Brendan Cully <brendan@kublai.com>
parents:
diff changeset
81 +++ b/rename
e2b69dbb2daa Tests for git import
Brendan Cully <brendan@kublai.com>
parents:
diff changeset
82 @@ -1 +1,5 @@
e2b69dbb2daa Tests for git import
Brendan Cully <brendan@kublai.com>
parents:
diff changeset
83 a
e2b69dbb2daa Tests for git import
Brendan Cully <brendan@kublai.com>
parents:
diff changeset
84 +a
e2b69dbb2daa Tests for git import
Brendan Cully <brendan@kublai.com>
parents:
diff changeset
85 +a
e2b69dbb2daa Tests for git import
Brendan Cully <brendan@kublai.com>
parents:
diff changeset
86 +a
e2b69dbb2daa Tests for git import
Brendan Cully <brendan@kublai.com>
parents:
diff changeset
87 +a
e2b69dbb2daa Tests for git import
Brendan Cully <brendan@kublai.com>
parents:
diff changeset
88 EOF
e2b69dbb2daa Tests for git import
Brendan Cully <brendan@kublai.com>
parents:
diff changeset
89
e2b69dbb2daa Tests for git import
Brendan Cully <brendan@kublai.com>
parents:
diff changeset
90 echo % copy and modify
e2b69dbb2daa Tests for git import
Brendan Cully <brendan@kublai.com>
parents:
diff changeset
91 hg import -mcopymod - <<EOF
e2b69dbb2daa Tests for git import
Brendan Cully <brendan@kublai.com>
parents:
diff changeset
92 diff --git a/rename b/copy2
e2b69dbb2daa Tests for git import
Brendan Cully <brendan@kublai.com>
parents:
diff changeset
93 similarity index 80%
e2b69dbb2daa Tests for git import
Brendan Cully <brendan@kublai.com>
parents:
diff changeset
94 copy from rename
e2b69dbb2daa Tests for git import
Brendan Cully <brendan@kublai.com>
parents:
diff changeset
95 copy to copy2
e2b69dbb2daa Tests for git import
Brendan Cully <brendan@kublai.com>
parents:
diff changeset
96 index 72e1fe3..b53c148 100644
e2b69dbb2daa Tests for git import
Brendan Cully <brendan@kublai.com>
parents:
diff changeset
97 --- a/rename
e2b69dbb2daa Tests for git import
Brendan Cully <brendan@kublai.com>
parents:
diff changeset
98 +++ b/copy2
e2b69dbb2daa Tests for git import
Brendan Cully <brendan@kublai.com>
parents:
diff changeset
99 @@ -1,5 +1,5 @@
e2b69dbb2daa Tests for git import
Brendan Cully <brendan@kublai.com>
parents:
diff changeset
100 a
e2b69dbb2daa Tests for git import
Brendan Cully <brendan@kublai.com>
parents:
diff changeset
101 a
e2b69dbb2daa Tests for git import
Brendan Cully <brendan@kublai.com>
parents:
diff changeset
102 -a
e2b69dbb2daa Tests for git import
Brendan Cully <brendan@kublai.com>
parents:
diff changeset
103 +b
e2b69dbb2daa Tests for git import
Brendan Cully <brendan@kublai.com>
parents:
diff changeset
104 a
e2b69dbb2daa Tests for git import
Brendan Cully <brendan@kublai.com>
parents:
diff changeset
105 a
e2b69dbb2daa Tests for git import
Brendan Cully <brendan@kublai.com>
parents:
diff changeset
106 EOF
e2b69dbb2daa Tests for git import
Brendan Cully <brendan@kublai.com>
parents:
diff changeset
107
e2b69dbb2daa Tests for git import
Brendan Cully <brendan@kublai.com>
parents:
diff changeset
108 hg cat copy2
e2b69dbb2daa Tests for git import
Brendan Cully <brendan@kublai.com>
parents:
diff changeset
109
e2b69dbb2daa Tests for git import
Brendan Cully <brendan@kublai.com>
parents:
diff changeset
110 echo % rename and modify
e2b69dbb2daa Tests for git import
Brendan Cully <brendan@kublai.com>
parents:
diff changeset
111 hg import -mrenamemod - <<EOF
e2b69dbb2daa Tests for git import
Brendan Cully <brendan@kublai.com>
parents:
diff changeset
112 diff --git a/copy2 b/rename2
e2b69dbb2daa Tests for git import
Brendan Cully <brendan@kublai.com>
parents:
diff changeset
113 similarity index 80%
e2b69dbb2daa Tests for git import
Brendan Cully <brendan@kublai.com>
parents:
diff changeset
114 rename from copy2
e2b69dbb2daa Tests for git import
Brendan Cully <brendan@kublai.com>
parents:
diff changeset
115 rename to rename2
e2b69dbb2daa Tests for git import
Brendan Cully <brendan@kublai.com>
parents:
diff changeset
116 index b53c148..8f81e29 100644
e2b69dbb2daa Tests for git import
Brendan Cully <brendan@kublai.com>
parents:
diff changeset
117 --- a/copy2
e2b69dbb2daa Tests for git import
Brendan Cully <brendan@kublai.com>
parents:
diff changeset
118 +++ b/rename2
e2b69dbb2daa Tests for git import
Brendan Cully <brendan@kublai.com>
parents:
diff changeset
119 @@ -1,5 +1,5 @@
e2b69dbb2daa Tests for git import
Brendan Cully <brendan@kublai.com>
parents:
diff changeset
120 a
e2b69dbb2daa Tests for git import
Brendan Cully <brendan@kublai.com>
parents:
diff changeset
121 a
e2b69dbb2daa Tests for git import
Brendan Cully <brendan@kublai.com>
parents:
diff changeset
122 b
e2b69dbb2daa Tests for git import
Brendan Cully <brendan@kublai.com>
parents:
diff changeset
123 -a
e2b69dbb2daa Tests for git import
Brendan Cully <brendan@kublai.com>
parents:
diff changeset
124 +c
e2b69dbb2daa Tests for git import
Brendan Cully <brendan@kublai.com>
parents:
diff changeset
125 a
e2b69dbb2daa Tests for git import
Brendan Cully <brendan@kublai.com>
parents:
diff changeset
126 EOF
e2b69dbb2daa Tests for git import
Brendan Cully <brendan@kublai.com>
parents:
diff changeset
127
e2b69dbb2daa Tests for git import
Brendan Cully <brendan@kublai.com>
parents:
diff changeset
128 hg locate copy2
e2b69dbb2daa Tests for git import
Brendan Cully <brendan@kublai.com>
parents:
diff changeset
129 hg cat rename2