Show More
@@ -1,82 +1,139 b'' | |||||
1 | =============================================== |
|
1 | =============================================== | |
2 | Testing merge involving change to the exec flag |
|
2 | Testing merge involving change to the exec flag | |
3 | =============================================== |
|
3 | =============================================== | |
4 |
|
4 | |||
5 | #require execbit |
|
5 | #require execbit | |
6 |
|
6 | |||
7 |
|
7 | |||
8 | Initial setup |
|
8 | Initial setup | |
9 | ============== |
|
9 | ============== | |
10 |
|
10 | |||
11 |
|
11 | |||
12 | $ hg init base-repo |
|
12 | $ hg init base-repo | |
13 | $ cd base-repo |
|
13 | $ cd base-repo | |
14 | $ cat << EOF > a |
|
14 | $ cat << EOF > a | |
15 | > 1 |
|
15 | > 1 | |
16 | > 2 |
|
16 | > 2 | |
17 | > 3 |
|
17 | > 3 | |
18 | > 4 |
|
18 | > 4 | |
19 | > 5 |
|
19 | > 5 | |
20 | > 6 |
|
20 | > 6 | |
21 | > 7 |
|
21 | > 7 | |
22 | > 8 |
|
22 | > 8 | |
23 | > 9 |
|
23 | > 9 | |
24 | > EOF |
|
24 | > EOF | |
25 | $ touch b |
|
25 | $ touch b | |
26 | $ hg add a b |
|
26 | $ hg add a b | |
27 | $ hg commit -m "initial commit" |
|
27 | $ hg commit -m "initial commit" | |
28 | $ cd .. |
|
28 | $ cd .. | |
29 |
|
29 | |||
30 | Testing merging mode change |
|
30 | Testing merging mode change | |
31 | =========================== |
|
31 | =========================== | |
32 |
|
32 | |||
33 | setup |
|
33 | setup | |
34 |
|
34 | |||
35 | Change on one side, executable bit on the other |
|
35 | Change on one side, executable bit on the other | |
36 |
|
36 | |||
37 | $ hg clone base-repo simple-merge-repo |
|
37 | $ hg clone base-repo simple-merge-repo | |
38 | updating to branch default |
|
38 | updating to branch default | |
39 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
39 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
40 | $ cd simple-merge-repo |
|
40 | $ cd simple-merge-repo | |
41 | $ chmod +x a |
|
41 | $ chmod +x a | |
42 | $ hg ci -m "make a executable, no change" |
|
42 | $ hg ci -m "make a executable, no change" | |
43 | $ [ -x a ] || echo "executable bit not recorded" |
|
43 | $ [ -x a ] || echo "executable bit not recorded" | |
44 | $ hg up ".^" |
|
44 | $ hg up ".^" | |
45 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
45 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
46 | $ cat << EOF > a |
|
46 | $ cat << EOF > a | |
47 | > 1 |
|
47 | > 1 | |
48 | > 2 |
|
48 | > 2 | |
49 | > 3 |
|
49 | > 3 | |
50 | > 4 |
|
50 | > 4 | |
51 | > 5 |
|
51 | > 5 | |
52 | > 6 |
|
52 | > 6 | |
53 | > 7 |
|
53 | > 7 | |
54 | > x |
|
54 | > x | |
55 | > 9 |
|
55 | > 9 | |
56 | > EOF |
|
56 | > EOF | |
57 | $ hg commit -m "edit end of file" |
|
57 | $ hg commit -m "edit end of file" | |
58 | created new head |
|
58 | created new head | |
59 |
|
59 | |||
60 | merge them (from the update side) |
|
60 | merge them (from the update side) | |
61 |
|
61 | |||
62 | $ hg merge 'desc("make a executable, no change")' |
|
62 | $ hg merge 'desc("make a executable, no change")' | |
63 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
63 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
64 | (branch merge, don't forget to commit) |
|
64 | (branch merge, don't forget to commit) | |
65 | $ hg st |
|
65 | $ hg st | |
66 | M a |
|
66 | M a | |
67 | $ [ -x a ] || echo "executable bit lost" |
|
67 | $ [ -x a ] || echo "executable bit lost" | |
68 |
|
68 | |||
69 | merge them (from the chmod side) |
|
69 | merge them (from the chmod side) | |
70 |
|
70 | |||
71 | $ hg up -C 'desc("make a executable, no change")' |
|
71 | $ hg up -C 'desc("make a executable, no change")' | |
72 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
72 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
73 | $ hg merge 'desc("edit end of file")' |
|
73 | $ hg merge 'desc("edit end of file")' | |
74 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
74 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
75 | (branch merge, don't forget to commit) |
|
75 | (branch merge, don't forget to commit) | |
76 | $ hg st |
|
76 | $ hg st | |
77 | M a |
|
77 | M a | |
78 | $ [ -x a ] || echo "executable bit lost" |
|
78 | $ [ -x a ] || echo "executable bit lost" | |
79 |
|
79 | |||
80 |
|
80 | |||
81 | $ cd .. |
|
81 | $ cd .. | |
82 |
|
82 | |||
|
83 | Testing merging mode change with rename | |||
|
84 | ======================================= | |||
|
85 | ||||
|
86 | $ hg clone base-repo rename-merge-repo | |||
|
87 | updating to branch default | |||
|
88 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved | |||
|
89 | $ cd rename-merge-repo | |||
|
90 | ||||
|
91 | make "a" executable on one side | |||
|
92 | ||||
|
93 | $ chmod +x a | |||
|
94 | $ hg status | |||
|
95 | M a | |||
|
96 | $ hg ci -m "make a executable" | |||
|
97 | $ [ -x a ] || echo "executable bit not recorded" | |||
|
98 | $ hg up ".^" | |||
|
99 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |||
|
100 | ||||
|
101 | make "a" renamed on the other side | |||
|
102 | ||||
|
103 | $ hg mv a z | |||
|
104 | $ hg st --copies | |||
|
105 | A z | |||
|
106 | a | |||
|
107 | R a | |||
|
108 | $ hg ci -m "rename a to z" | |||
|
109 | created new head | |||
|
110 | ||||
|
111 | merge them (from the rename side) | |||
|
112 | ||||
|
113 | $ hg merge 'desc("make a executable")' | |||
|
114 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved (false !) | |||
|
115 | 0 files updated, 0 files merged, 0 files removed, 0 files unresolved (true !) | |||
|
116 | (branch merge, don't forget to commit) | |||
|
117 | $ hg st --copies | |||
|
118 | M z (false !) | |||
|
119 | a (false !) | |||
|
120 | $ [ -x z ] || echo "executable bit lost" | |||
|
121 | executable bit lost (true !) | |||
|
122 | ||||
|
123 | merge them (from the chmod side) | |||
|
124 | ||||
|
125 | $ hg up -C 'desc("make a executable")' | |||
|
126 | 1 files updated, 0 files merged, 1 files removed, 0 files unresolved | |||
|
127 | $ hg merge 'desc("rename a to z")' | |||
|
128 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved (false !) | |||
|
129 | 1 files updated, 0 files merged, 1 files removed, 0 files unresolved (true !) | |||
|
130 | (branch merge, don't forget to commit) | |||
|
131 | $ hg st --copies | |||
|
132 | M z | |||
|
133 | a (false !) | |||
|
134 | R a | |||
|
135 | $ [ -x z ] || echo "executable bit lost" | |||
|
136 | executable bit lost (true !) | |||
|
137 | ||||
|
138 | ||||
|
139 | $ cd .. |
General Comments 0
You need to be logged in to leave comments.
Login now