Mercurial > hg
annotate tests/test-merge-exec.t @ 44907:bf5ed664f467 stable
flags: introduce explicit testing for merging change to exec flag
It turns out that we do not seems to test the simple case for merging exec flag
changes. More advanced case are test (merging exec flag without a common
ancestors, merging with a symlink, etc…) but not the basic.
We are about introduce various fixes to merging flag change across renames,
having the most basic case tested first seems useful.
note: We are only testing "adding" an exec flag here, not removing it. We
introduce basic test on stable and will consolidate them on default.
Differential Revision: https://phab.mercurial-scm.org/D8529
author | Pierre-Yves David <pierre-yves.david@octobus.net> |
---|---|
date | Sat, 16 May 2020 20:37:33 +0200 |
parents | |
children | 9438c84d1dce |
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 |