Show More
@@ -1,82 +1,139 b'' | |||
|
1 | 1 | =============================================== |
|
2 | 2 | Testing merge involving change to the exec flag |
|
3 | 3 | =============================================== |
|
4 | 4 | |
|
5 | 5 | #require execbit |
|
6 | 6 | |
|
7 | 7 | |
|
8 | 8 | Initial setup |
|
9 | 9 | ============== |
|
10 | 10 | |
|
11 | 11 | |
|
12 | 12 | $ hg init base-repo |
|
13 | 13 | $ cd base-repo |
|
14 | 14 | $ cat << EOF > a |
|
15 | 15 | > 1 |
|
16 | 16 | > 2 |
|
17 | 17 | > 3 |
|
18 | 18 | > 4 |
|
19 | 19 | > 5 |
|
20 | 20 | > 6 |
|
21 | 21 | > 7 |
|
22 | 22 | > 8 |
|
23 | 23 | > 9 |
|
24 | 24 | > EOF |
|
25 | 25 | $ touch b |
|
26 | 26 | $ hg add a b |
|
27 | 27 | $ hg commit -m "initial commit" |
|
28 | 28 | $ cd .. |
|
29 | 29 | |
|
30 | 30 | Testing merging mode change |
|
31 | 31 | =========================== |
|
32 | 32 | |
|
33 | 33 | setup |
|
34 | 34 | |
|
35 | 35 | Change on one side, executable bit on the other |
|
36 | 36 | |
|
37 | 37 | $ hg clone base-repo simple-merge-repo |
|
38 | 38 | updating to branch default |
|
39 | 39 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
40 | 40 | $ cd simple-merge-repo |
|
41 | 41 | $ chmod +x a |
|
42 | 42 | $ hg ci -m "make a executable, no change" |
|
43 | 43 | $ [ -x a ] || echo "executable bit not recorded" |
|
44 | 44 | $ hg up ".^" |
|
45 | 45 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
46 | 46 | $ cat << EOF > a |
|
47 | 47 | > 1 |
|
48 | 48 | > 2 |
|
49 | 49 | > 3 |
|
50 | 50 | > 4 |
|
51 | 51 | > 5 |
|
52 | 52 | > 6 |
|
53 | 53 | > 7 |
|
54 | 54 | > x |
|
55 | 55 | > 9 |
|
56 | 56 | > EOF |
|
57 | 57 | $ hg commit -m "edit end of file" |
|
58 | 58 | created new head |
|
59 | 59 | |
|
60 | 60 | merge them (from the update side) |
|
61 | 61 | |
|
62 | 62 | $ hg merge 'desc("make a executable, no change")' |
|
63 | 63 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
64 | 64 | (branch merge, don't forget to commit) |
|
65 | 65 | $ hg st |
|
66 | 66 | M a |
|
67 | 67 | $ [ -x a ] || echo "executable bit lost" |
|
68 | 68 | |
|
69 | 69 | merge them (from the chmod side) |
|
70 | 70 | |
|
71 | 71 | $ hg up -C 'desc("make a executable, no change")' |
|
72 | 72 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
73 | 73 | $ hg merge 'desc("edit end of file")' |
|
74 | 74 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
75 | 75 | (branch merge, don't forget to commit) |
|
76 | 76 | $ hg st |
|
77 | 77 | M a |
|
78 | 78 | $ [ -x a ] || echo "executable bit lost" |
|
79 | 79 | |
|
80 | 80 | |
|
81 | 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