Mercurial > hg
annotate tests/test-merge-exec.t @ 44910:783f059509e4 stable
flags: add a test for merging exec flag change with rename and file change
Changing the file activate other code path that also have bugsā¦ There are two
distinct bugs depending of which side of the merge you stand on. They both
leading to exec flag loss.
We add tests for both, the fix are coming in later changesets.
Differential Revision: https://phab.mercurial-scm.org/D8532
author | Pierre-Yves David <pierre-yves.david@octobus.net> |
---|---|
date | Sat, 16 May 2020 20:38:07 +0200 |
parents | d452acc8cce8 |
children | 84614212ae39 |
rev | line source |
---|---|
44907
bf5ed664f467
flags: introduce explicit testing for merging change to exec flag
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
1 =============================================== |
bf5ed664f467
flags: introduce explicit testing for merging change to exec flag
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
2 Testing merge involving change to the exec flag |
bf5ed664f467
flags: introduce explicit testing for merging change to exec flag
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
3 =============================================== |
bf5ed664f467
flags: introduce explicit testing for merging change to exec flag
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
4 |
bf5ed664f467
flags: introduce explicit testing for merging change to exec flag
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
5 #require execbit |
bf5ed664f467
flags: introduce explicit testing for merging change to exec flag
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
6 |
bf5ed664f467
flags: introduce explicit testing for merging change to exec flag
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
7 |
bf5ed664f467
flags: introduce explicit testing for merging change to exec flag
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
8 Initial setup |
bf5ed664f467
flags: introduce explicit testing for merging change to exec flag
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
9 ============== |
bf5ed664f467
flags: introduce explicit testing for merging change to exec flag
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
10 |
bf5ed664f467
flags: introduce explicit testing for merging change to exec flag
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
11 |
bf5ed664f467
flags: introduce explicit testing for merging change to exec flag
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
12 $ hg init base-repo |
bf5ed664f467
flags: introduce explicit testing for merging change to exec flag
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
13 $ cd base-repo |
bf5ed664f467
flags: introduce explicit testing for merging change to exec flag
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
14 $ cat << EOF > a |
bf5ed664f467
flags: introduce explicit testing for merging change to exec flag
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
15 > 1 |
bf5ed664f467
flags: introduce explicit testing for merging change to exec flag
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
16 > 2 |
bf5ed664f467
flags: introduce explicit testing for merging change to exec flag
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
17 > 3 |
bf5ed664f467
flags: introduce explicit testing for merging change to exec flag
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
18 > 4 |
bf5ed664f467
flags: introduce explicit testing for merging change to exec flag
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
19 > 5 |
bf5ed664f467
flags: introduce explicit testing for merging change to exec flag
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
20 > 6 |
bf5ed664f467
flags: introduce explicit testing for merging change to exec flag
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
21 > 7 |
bf5ed664f467
flags: introduce explicit testing for merging change to exec flag
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
22 > 8 |
bf5ed664f467
flags: introduce explicit testing for merging change to exec flag
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
23 > 9 |
bf5ed664f467
flags: introduce explicit testing for merging change to exec flag
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
24 > EOF |
bf5ed664f467
flags: introduce explicit testing for merging change to exec flag
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
25 $ touch b |
bf5ed664f467
flags: introduce explicit testing for merging change to exec flag
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
26 $ hg add a b |
bf5ed664f467
flags: introduce explicit testing for merging change to exec flag
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
27 $ hg commit -m "initial commit" |
bf5ed664f467
flags: introduce explicit testing for merging change to exec flag
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
28 $ cd .. |
bf5ed664f467
flags: introduce explicit testing for merging change to exec flag
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
29 |
bf5ed664f467
flags: introduce explicit testing for merging change to exec flag
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
30 Testing merging mode change |
bf5ed664f467
flags: introduce explicit testing for merging change to exec flag
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
31 =========================== |
bf5ed664f467
flags: introduce explicit testing for merging change to exec flag
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
32 |
bf5ed664f467
flags: introduce explicit testing for merging change to exec flag
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
33 setup |
bf5ed664f467
flags: introduce explicit testing for merging change to exec flag
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
34 |
bf5ed664f467
flags: introduce explicit testing for merging change to exec flag
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
35 Change on one side, executable bit on the other |
bf5ed664f467
flags: introduce explicit testing for merging change to exec flag
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
36 |
bf5ed664f467
flags: introduce explicit testing for merging change to exec flag
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
37 $ hg clone base-repo simple-merge-repo |
bf5ed664f467
flags: introduce explicit testing for merging change to exec flag
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
38 updating to branch default |
bf5ed664f467
flags: introduce explicit testing for merging change to exec flag
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
39 2 files updated, 0 files merged, 0 files removed, 0 files unresolved |
bf5ed664f467
flags: introduce explicit testing for merging change to exec flag
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
40 $ cd simple-merge-repo |
bf5ed664f467
flags: introduce explicit testing for merging change to exec flag
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
41 $ chmod +x a |
bf5ed664f467
flags: introduce explicit testing for merging change to exec flag
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
42 $ hg ci -m "make a executable, no change" |
bf5ed664f467
flags: introduce explicit testing for merging change to exec flag
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
43 $ [ -x a ] || echo "executable bit not recorded" |
bf5ed664f467
flags: introduce explicit testing for merging change to exec flag
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
44 $ hg up ".^" |
bf5ed664f467
flags: introduce explicit testing for merging change to exec flag
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
45 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
bf5ed664f467
flags: introduce explicit testing for merging change to exec flag
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
46 $ cat << EOF > a |
bf5ed664f467
flags: introduce explicit testing for merging change to exec flag
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
47 > 1 |
bf5ed664f467
flags: introduce explicit testing for merging change to exec flag
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
48 > 2 |
bf5ed664f467
flags: introduce explicit testing for merging change to exec flag
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
49 > 3 |
bf5ed664f467
flags: introduce explicit testing for merging change to exec flag
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
50 > 4 |
bf5ed664f467
flags: introduce explicit testing for merging change to exec flag
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
51 > 5 |
bf5ed664f467
flags: introduce explicit testing for merging change to exec flag
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
52 > 6 |
bf5ed664f467
flags: introduce explicit testing for merging change to exec flag
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
53 > 7 |
bf5ed664f467
flags: introduce explicit testing for merging change to exec flag
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
54 > x |
bf5ed664f467
flags: introduce explicit testing for merging change to exec flag
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
55 > 9 |
bf5ed664f467
flags: introduce explicit testing for merging change to exec flag
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
56 > EOF |
bf5ed664f467
flags: introduce explicit testing for merging change to exec flag
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
57 $ hg commit -m "edit end of file" |
bf5ed664f467
flags: introduce explicit testing for merging change to exec flag
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
58 created new head |
bf5ed664f467
flags: introduce explicit testing for merging change to exec flag
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
59 |
bf5ed664f467
flags: introduce explicit testing for merging change to exec flag
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
60 merge them (from the update side) |
bf5ed664f467
flags: introduce explicit testing for merging change to exec flag
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
61 |
bf5ed664f467
flags: introduce explicit testing for merging change to exec flag
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
62 $ hg merge 'desc("make a executable, no change")' |
bf5ed664f467
flags: introduce explicit testing for merging change to exec flag
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
63 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
bf5ed664f467
flags: introduce explicit testing for merging change to exec flag
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
64 (branch merge, don't forget to commit) |
bf5ed664f467
flags: introduce explicit testing for merging change to exec flag
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
65 $ hg st |
bf5ed664f467
flags: introduce explicit testing for merging change to exec flag
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
66 M a |
bf5ed664f467
flags: introduce explicit testing for merging change to exec flag
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
67 $ [ -x a ] || echo "executable bit lost" |
bf5ed664f467
flags: introduce explicit testing for merging change to exec flag
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
68 |
bf5ed664f467
flags: introduce explicit testing for merging change to exec flag
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
69 merge them (from the chmod side) |
bf5ed664f467
flags: introduce explicit testing for merging change to exec flag
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
70 |
bf5ed664f467
flags: introduce explicit testing for merging change to exec flag
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
71 $ hg up -C 'desc("make a executable, no change")' |
bf5ed664f467
flags: introduce explicit testing for merging change to exec flag
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
72 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
bf5ed664f467
flags: introduce explicit testing for merging change to exec flag
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
73 $ hg merge 'desc("edit end of file")' |
bf5ed664f467
flags: introduce explicit testing for merging change to exec flag
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
74 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
bf5ed664f467
flags: introduce explicit testing for merging change to exec flag
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
75 (branch merge, don't forget to commit) |
bf5ed664f467
flags: introduce explicit testing for merging change to exec flag
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
76 $ hg st |
bf5ed664f467
flags: introduce explicit testing for merging change to exec flag
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
77 M a |
bf5ed664f467
flags: introduce explicit testing for merging change to exec flag
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
78 $ [ -x a ] || echo "executable bit lost" |
bf5ed664f467
flags: introduce explicit testing for merging change to exec flag
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
79 |
bf5ed664f467
flags: introduce explicit testing for merging change to exec flag
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
80 |
bf5ed664f467
flags: introduce explicit testing for merging change to exec flag
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
81 $ cd .. |
bf5ed664f467
flags: introduce explicit testing for merging change to exec flag
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
82 |
44908
9438c84d1dce
flags: also test merging a rename with and exec flag change
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
44907
diff
changeset
|
83 Testing merging mode change with rename |
9438c84d1dce
flags: also test merging a rename with and exec flag change
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
44907
diff
changeset
|
84 ======================================= |
9438c84d1dce
flags: also test merging a rename with and exec flag change
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
44907
diff
changeset
|
85 |
9438c84d1dce
flags: also test merging a rename with and exec flag change
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
44907
diff
changeset
|
86 $ hg clone base-repo rename-merge-repo |
9438c84d1dce
flags: also test merging a rename with and exec flag change
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
44907
diff
changeset
|
87 updating to branch default |
9438c84d1dce
flags: also test merging a rename with and exec flag change
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
44907
diff
changeset
|
88 2 files updated, 0 files merged, 0 files removed, 0 files unresolved |
9438c84d1dce
flags: also test merging a rename with and exec flag change
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
44907
diff
changeset
|
89 $ cd rename-merge-repo |
9438c84d1dce
flags: also test merging a rename with and exec flag change
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
44907
diff
changeset
|
90 |
9438c84d1dce
flags: also test merging a rename with and exec flag change
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
44907
diff
changeset
|
91 make "a" executable on one side |
9438c84d1dce
flags: also test merging a rename with and exec flag change
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
44907
diff
changeset
|
92 |
9438c84d1dce
flags: also test merging a rename with and exec flag change
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
44907
diff
changeset
|
93 $ chmod +x a |
9438c84d1dce
flags: also test merging a rename with and exec flag change
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
44907
diff
changeset
|
94 $ hg status |
9438c84d1dce
flags: also test merging a rename with and exec flag change
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
44907
diff
changeset
|
95 M a |
9438c84d1dce
flags: also test merging a rename with and exec flag change
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
44907
diff
changeset
|
96 $ hg ci -m "make a executable" |
9438c84d1dce
flags: also test merging a rename with and exec flag change
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
44907
diff
changeset
|
97 $ [ -x a ] || echo "executable bit not recorded" |
9438c84d1dce
flags: also test merging a rename with and exec flag change
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
44907
diff
changeset
|
98 $ hg up ".^" |
9438c84d1dce
flags: also test merging a rename with and exec flag change
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
44907
diff
changeset
|
99 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
9438c84d1dce
flags: also test merging a rename with and exec flag change
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
44907
diff
changeset
|
100 |
9438c84d1dce
flags: also test merging a rename with and exec flag change
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
44907
diff
changeset
|
101 make "a" renamed on the other side |
9438c84d1dce
flags: also test merging a rename with and exec flag change
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
44907
diff
changeset
|
102 |
9438c84d1dce
flags: also test merging a rename with and exec flag change
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
44907
diff
changeset
|
103 $ hg mv a z |
9438c84d1dce
flags: also test merging a rename with and exec flag change
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
44907
diff
changeset
|
104 $ hg st --copies |
9438c84d1dce
flags: also test merging a rename with and exec flag change
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
44907
diff
changeset
|
105 A z |
9438c84d1dce
flags: also test merging a rename with and exec flag change
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
44907
diff
changeset
|
106 a |
9438c84d1dce
flags: also test merging a rename with and exec flag change
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
44907
diff
changeset
|
107 R a |
9438c84d1dce
flags: also test merging a rename with and exec flag change
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
44907
diff
changeset
|
108 $ hg ci -m "rename a to z" |
9438c84d1dce
flags: also test merging a rename with and exec flag change
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
44907
diff
changeset
|
109 created new head |
9438c84d1dce
flags: also test merging a rename with and exec flag change
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
44907
diff
changeset
|
110 |
9438c84d1dce
flags: also test merging a rename with and exec flag change
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
44907
diff
changeset
|
111 merge them (from the rename side) |
9438c84d1dce
flags: also test merging a rename with and exec flag change
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
44907
diff
changeset
|
112 |
9438c84d1dce
flags: also test merging a rename with and exec flag change
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
44907
diff
changeset
|
113 $ hg merge 'desc("make a executable")' |
44909
d452acc8cce8
flags: account for flag change when tracking rename relevant to merge
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
44908
diff
changeset
|
114 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
44908
9438c84d1dce
flags: also test merging a rename with and exec flag change
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
44907
diff
changeset
|
115 (branch merge, don't forget to commit) |
9438c84d1dce
flags: also test merging a rename with and exec flag change
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
44907
diff
changeset
|
116 $ hg st --copies |
44909
d452acc8cce8
flags: account for flag change when tracking rename relevant to merge
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
44908
diff
changeset
|
117 M z |
d452acc8cce8
flags: account for flag change when tracking rename relevant to merge
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
44908
diff
changeset
|
118 a |
44908
9438c84d1dce
flags: also test merging a rename with and exec flag change
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
44907
diff
changeset
|
119 $ [ -x z ] || echo "executable bit lost" |
9438c84d1dce
flags: also test merging a rename with and exec flag change
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
44907
diff
changeset
|
120 |
9438c84d1dce
flags: also test merging a rename with and exec flag change
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
44907
diff
changeset
|
121 merge them (from the chmod side) |
9438c84d1dce
flags: also test merging a rename with and exec flag change
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
44907
diff
changeset
|
122 |
9438c84d1dce
flags: also test merging a rename with and exec flag change
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
44907
diff
changeset
|
123 $ hg up -C 'desc("make a executable")' |
9438c84d1dce
flags: also test merging a rename with and exec flag change
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
44907
diff
changeset
|
124 1 files updated, 0 files merged, 1 files removed, 0 files unresolved |
9438c84d1dce
flags: also test merging a rename with and exec flag change
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
44907
diff
changeset
|
125 $ hg merge 'desc("rename a to z")' |
44909
d452acc8cce8
flags: account for flag change when tracking rename relevant to merge
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
44908
diff
changeset
|
126 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
44908
9438c84d1dce
flags: also test merging a rename with and exec flag change
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
44907
diff
changeset
|
127 (branch merge, don't forget to commit) |
9438c84d1dce
flags: also test merging a rename with and exec flag change
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
44907
diff
changeset
|
128 $ hg st --copies |
9438c84d1dce
flags: also test merging a rename with and exec flag change
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
44907
diff
changeset
|
129 M z |
44909
d452acc8cce8
flags: account for flag change when tracking rename relevant to merge
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
44908
diff
changeset
|
130 a |
44908
9438c84d1dce
flags: also test merging a rename with and exec flag change
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
44907
diff
changeset
|
131 R a |
9438c84d1dce
flags: also test merging a rename with and exec flag change
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
44907
diff
changeset
|
132 $ [ -x z ] || echo "executable bit lost" |
9438c84d1dce
flags: also test merging a rename with and exec flag change
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
44907
diff
changeset
|
133 |
9438c84d1dce
flags: also test merging a rename with and exec flag change
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
44907
diff
changeset
|
134 |
9438c84d1dce
flags: also test merging a rename with and exec flag change
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
44907
diff
changeset
|
135 $ cd .. |
44910
783f059509e4
flags: add a test for merging exec flag change with rename and file change
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
44909
diff
changeset
|
136 |
783f059509e4
flags: add a test for merging exec flag change with rename and file change
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
44909
diff
changeset
|
137 Testing merging mode change with rename + modification on both side |
783f059509e4
flags: add a test for merging exec flag change with rename and file change
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
44909
diff
changeset
|
138 =================================================================== |
783f059509e4
flags: add a test for merging exec flag change with rename and file change
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
44909
diff
changeset
|
139 |
783f059509e4
flags: add a test for merging exec flag change with rename and file change
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
44909
diff
changeset
|
140 |
783f059509e4
flags: add a test for merging exec flag change with rename and file change
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
44909
diff
changeset
|
141 $ hg clone base-repo rename+mod-merge-repo |
783f059509e4
flags: add a test for merging exec flag change with rename and file change
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
44909
diff
changeset
|
142 updating to branch default |
783f059509e4
flags: add a test for merging exec flag change with rename and file change
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
44909
diff
changeset
|
143 2 files updated, 0 files merged, 0 files removed, 0 files unresolved |
783f059509e4
flags: add a test for merging exec flag change with rename and file change
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
44909
diff
changeset
|
144 $ cd rename+mod-merge-repo |
783f059509e4
flags: add a test for merging exec flag change with rename and file change
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
44909
diff
changeset
|
145 |
783f059509e4
flags: add a test for merging exec flag change with rename and file change
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
44909
diff
changeset
|
146 make "a" executable on one side |
783f059509e4
flags: add a test for merging exec flag change with rename and file change
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
44909
diff
changeset
|
147 |
783f059509e4
flags: add a test for merging exec flag change with rename and file change
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
44909
diff
changeset
|
148 $ chmod +x a |
783f059509e4
flags: add a test for merging exec flag change with rename and file change
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
44909
diff
changeset
|
149 $ cat << EOF > a |
783f059509e4
flags: add a test for merging exec flag change with rename and file change
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
44909
diff
changeset
|
150 > 1 |
783f059509e4
flags: add a test for merging exec flag change with rename and file change
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
44909
diff
changeset
|
151 > x |
783f059509e4
flags: add a test for merging exec flag change with rename and file change
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
44909
diff
changeset
|
152 > 3 |
783f059509e4
flags: add a test for merging exec flag change with rename and file change
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
44909
diff
changeset
|
153 > 4 |
783f059509e4
flags: add a test for merging exec flag change with rename and file change
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
44909
diff
changeset
|
154 > 5 |
783f059509e4
flags: add a test for merging exec flag change with rename and file change
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
44909
diff
changeset
|
155 > 6 |
783f059509e4
flags: add a test for merging exec flag change with rename and file change
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
44909
diff
changeset
|
156 > 7 |
783f059509e4
flags: add a test for merging exec flag change with rename and file change
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
44909
diff
changeset
|
157 > 8 |
783f059509e4
flags: add a test for merging exec flag change with rename and file change
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
44909
diff
changeset
|
158 > 9 |
783f059509e4
flags: add a test for merging exec flag change with rename and file change
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
44909
diff
changeset
|
159 > EOF |
783f059509e4
flags: add a test for merging exec flag change with rename and file change
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
44909
diff
changeset
|
160 $ hg status |
783f059509e4
flags: add a test for merging exec flag change with rename and file change
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
44909
diff
changeset
|
161 M a |
783f059509e4
flags: add a test for merging exec flag change with rename and file change
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
44909
diff
changeset
|
162 $ hg ci -m "make a executable, and change start" |
783f059509e4
flags: add a test for merging exec flag change with rename and file change
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
44909
diff
changeset
|
163 $ [ -x a ] || echo "executable bit not recorded" |
783f059509e4
flags: add a test for merging exec flag change with rename and file change
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
44909
diff
changeset
|
164 $ hg up ".^" |
783f059509e4
flags: add a test for merging exec flag change with rename and file change
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
44909
diff
changeset
|
165 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
783f059509e4
flags: add a test for merging exec flag change with rename and file change
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
44909
diff
changeset
|
166 |
783f059509e4
flags: add a test for merging exec flag change with rename and file change
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
44909
diff
changeset
|
167 make "a" renamed on the other side |
783f059509e4
flags: add a test for merging exec flag change with rename and file change
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
44909
diff
changeset
|
168 |
783f059509e4
flags: add a test for merging exec flag change with rename and file change
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
44909
diff
changeset
|
169 $ hg mv a z |
783f059509e4
flags: add a test for merging exec flag change with rename and file change
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
44909
diff
changeset
|
170 $ hg st --copies |
783f059509e4
flags: add a test for merging exec flag change with rename and file change
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
44909
diff
changeset
|
171 A z |
783f059509e4
flags: add a test for merging exec flag change with rename and file change
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
44909
diff
changeset
|
172 a |
783f059509e4
flags: add a test for merging exec flag change with rename and file change
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
44909
diff
changeset
|
173 R a |
783f059509e4
flags: add a test for merging exec flag change with rename and file change
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
44909
diff
changeset
|
174 $ cat << EOF > z |
783f059509e4
flags: add a test for merging exec flag change with rename and file change
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
44909
diff
changeset
|
175 > 1 |
783f059509e4
flags: add a test for merging exec flag change with rename and file change
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
44909
diff
changeset
|
176 > 2 |
783f059509e4
flags: add a test for merging exec flag change with rename and file change
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
44909
diff
changeset
|
177 > 3 |
783f059509e4
flags: add a test for merging exec flag change with rename and file change
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
44909
diff
changeset
|
178 > 4 |
783f059509e4
flags: add a test for merging exec flag change with rename and file change
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
44909
diff
changeset
|
179 > 5 |
783f059509e4
flags: add a test for merging exec flag change with rename and file change
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
44909
diff
changeset
|
180 > 6 |
783f059509e4
flags: add a test for merging exec flag change with rename and file change
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
44909
diff
changeset
|
181 > 7 |
783f059509e4
flags: add a test for merging exec flag change with rename and file change
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
44909
diff
changeset
|
182 > x |
783f059509e4
flags: add a test for merging exec flag change with rename and file change
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
44909
diff
changeset
|
183 > 9 |
783f059509e4
flags: add a test for merging exec flag change with rename and file change
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
44909
diff
changeset
|
184 > EOF |
783f059509e4
flags: add a test for merging exec flag change with rename and file change
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
44909
diff
changeset
|
185 $ hg ci -m "rename a to z, and change end" |
783f059509e4
flags: add a test for merging exec flag change with rename and file change
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
44909
diff
changeset
|
186 created new head |
783f059509e4
flags: add a test for merging exec flag change with rename and file change
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
44909
diff
changeset
|
187 |
783f059509e4
flags: add a test for merging exec flag change with rename and file change
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
44909
diff
changeset
|
188 merge them (from the rename side) |
783f059509e4
flags: add a test for merging exec flag change with rename and file change
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
44909
diff
changeset
|
189 |
783f059509e4
flags: add a test for merging exec flag change with rename and file change
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
44909
diff
changeset
|
190 $ hg merge 'desc("make a executable")' |
783f059509e4
flags: add a test for merging exec flag change with rename and file change
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
44909
diff
changeset
|
191 merging z and a to z |
783f059509e4
flags: add a test for merging exec flag change with rename and file change
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
44909
diff
changeset
|
192 0 files updated, 1 files merged, 0 files removed, 0 files unresolved |
783f059509e4
flags: add a test for merging exec flag change with rename and file change
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
44909
diff
changeset
|
193 (branch merge, don't forget to commit) |
783f059509e4
flags: add a test for merging exec flag change with rename and file change
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
44909
diff
changeset
|
194 $ hg st --copies |
783f059509e4
flags: add a test for merging exec flag change with rename and file change
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
44909
diff
changeset
|
195 M z |
783f059509e4
flags: add a test for merging exec flag change with rename and file change
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
44909
diff
changeset
|
196 a |
783f059509e4
flags: add a test for merging exec flag change with rename and file change
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
44909
diff
changeset
|
197 $ [ -x z ] || echo "executable bit lost" |
783f059509e4
flags: add a test for merging exec flag change with rename and file change
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
44909
diff
changeset
|
198 executable bit lost |
783f059509e4
flags: add a test for merging exec flag change with rename and file change
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
44909
diff
changeset
|
199 |
783f059509e4
flags: add a test for merging exec flag change with rename and file change
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
44909
diff
changeset
|
200 merge them (from the chmod side) |
783f059509e4
flags: add a test for merging exec flag change with rename and file change
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
44909
diff
changeset
|
201 |
783f059509e4
flags: add a test for merging exec flag change with rename and file change
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
44909
diff
changeset
|
202 $ hg up -C 'desc("make a executable")' |
783f059509e4
flags: add a test for merging exec flag change with rename and file change
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
44909
diff
changeset
|
203 1 files updated, 0 files merged, 1 files removed, 0 files unresolved |
783f059509e4
flags: add a test for merging exec flag change with rename and file change
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
44909
diff
changeset
|
204 $ hg merge 'desc("rename a to z")' |
783f059509e4
flags: add a test for merging exec flag change with rename and file change
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
44909
diff
changeset
|
205 merging a and z to z |
783f059509e4
flags: add a test for merging exec flag change with rename and file change
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
44909
diff
changeset
|
206 0 files updated, 1 files merged, 0 files removed, 0 files unresolved |
783f059509e4
flags: add a test for merging exec flag change with rename and file change
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
44909
diff
changeset
|
207 (branch merge, don't forget to commit) |
783f059509e4
flags: add a test for merging exec flag change with rename and file change
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
44909
diff
changeset
|
208 $ hg st --copies |
783f059509e4
flags: add a test for merging exec flag change with rename and file change
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
44909
diff
changeset
|
209 M z |
783f059509e4
flags: add a test for merging exec flag change with rename and file change
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
44909
diff
changeset
|
210 a |
783f059509e4
flags: add a test for merging exec flag change with rename and file change
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
44909
diff
changeset
|
211 R a |
783f059509e4
flags: add a test for merging exec flag change with rename and file change
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
44909
diff
changeset
|
212 $ [ -x z ] || echo "executable bit lost" |
783f059509e4
flags: add a test for merging exec flag change with rename and file change
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
44909
diff
changeset
|
213 executable bit lost |
783f059509e4
flags: add a test for merging exec flag change with rename and file change
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
44909
diff
changeset
|
214 |
783f059509e4
flags: add a test for merging exec flag change with rename and file change
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
44909
diff
changeset
|
215 $ cd .. |