Mercurial > hg
annotate tests/test-merge-no-file-change.t @ 41355:77763dc5b07b
py3: add b'' prefixes in doc/check-seclevel.py
# skip-blame because just b'' prefixes
Differential Revision: https://phab.mercurial-scm.org/D5670
author | Pulkit Goyal <pulkit@yandex-team.ru> |
---|---|
date | Thu, 24 Jan 2019 18:09:34 +0300 |
parents | 46da52f4b820 |
children | 8988e640a8ac |
rev | line source |
---|---|
39110
f0c2653ca706
merge: add tests for commit with no content change
Yuya Nishihara <yuya@tcha.org>
parents:
diff
changeset
|
1 $ cat <<'EOF' >> "$HGRCPATH" |
f0c2653ca706
merge: add tests for commit with no content change
Yuya Nishihara <yuya@tcha.org>
parents:
diff
changeset
|
2 > [extensions] |
f0c2653ca706
merge: add tests for commit with no content change
Yuya Nishihara <yuya@tcha.org>
parents:
diff
changeset
|
3 > convert = |
f0c2653ca706
merge: add tests for commit with no content change
Yuya Nishihara <yuya@tcha.org>
parents:
diff
changeset
|
4 > [templates] |
f0c2653ca706
merge: add tests for commit with no content change
Yuya Nishihara <yuya@tcha.org>
parents:
diff
changeset
|
5 > l = '{rev}:{node|short} p={p1rev},{p2rev} m={manifest} f={files|json}' |
f0c2653ca706
merge: add tests for commit with no content change
Yuya Nishihara <yuya@tcha.org>
parents:
diff
changeset
|
6 > EOF |
f0c2653ca706
merge: add tests for commit with no content change
Yuya Nishihara <yuya@tcha.org>
parents:
diff
changeset
|
7 |
f0c2653ca706
merge: add tests for commit with no content change
Yuya Nishihara <yuya@tcha.org>
parents:
diff
changeset
|
8 $ check_convert_identity () { |
f0c2653ca706
merge: add tests for commit with no content change
Yuya Nishihara <yuya@tcha.org>
parents:
diff
changeset
|
9 > hg convert -q "$1" "$1.converted" |
f0c2653ca706
merge: add tests for commit with no content change
Yuya Nishihara <yuya@tcha.org>
parents:
diff
changeset
|
10 > hg outgoing -q -R "$1.converted" "$1" |
f0c2653ca706
merge: add tests for commit with no content change
Yuya Nishihara <yuya@tcha.org>
parents:
diff
changeset
|
11 > if [ "$?" != 1 ]; then |
f0c2653ca706
merge: add tests for commit with no content change
Yuya Nishihara <yuya@tcha.org>
parents:
diff
changeset
|
12 > echo '*** BUG: hash changes on convert ***' |
f0c2653ca706
merge: add tests for commit with no content change
Yuya Nishihara <yuya@tcha.org>
parents:
diff
changeset
|
13 > hg log -R "$1.converted" -GTl |
f0c2653ca706
merge: add tests for commit with no content change
Yuya Nishihara <yuya@tcha.org>
parents:
diff
changeset
|
14 > fi |
f0c2653ca706
merge: add tests for commit with no content change
Yuya Nishihara <yuya@tcha.org>
parents:
diff
changeset
|
15 > } |
f0c2653ca706
merge: add tests for commit with no content change
Yuya Nishihara <yuya@tcha.org>
parents:
diff
changeset
|
16 |
f0c2653ca706
merge: add tests for commit with no content change
Yuya Nishihara <yuya@tcha.org>
parents:
diff
changeset
|
17 Files added at both parents: |
f0c2653ca706
merge: add tests for commit with no content change
Yuya Nishihara <yuya@tcha.org>
parents:
diff
changeset
|
18 |
f0c2653ca706
merge: add tests for commit with no content change
Yuya Nishihara <yuya@tcha.org>
parents:
diff
changeset
|
19 $ hg init added-both |
f0c2653ca706
merge: add tests for commit with no content change
Yuya Nishihara <yuya@tcha.org>
parents:
diff
changeset
|
20 $ cd added-both |
f0c2653ca706
merge: add tests for commit with no content change
Yuya Nishihara <yuya@tcha.org>
parents:
diff
changeset
|
21 $ touch a b c |
f0c2653ca706
merge: add tests for commit with no content change
Yuya Nishihara <yuya@tcha.org>
parents:
diff
changeset
|
22 $ hg ci -qAm0 a |
f0c2653ca706
merge: add tests for commit with no content change
Yuya Nishihara <yuya@tcha.org>
parents:
diff
changeset
|
23 $ hg ci -qAm1 b |
f0c2653ca706
merge: add tests for commit with no content change
Yuya Nishihara <yuya@tcha.org>
parents:
diff
changeset
|
24 $ hg up -q 0 |
f0c2653ca706
merge: add tests for commit with no content change
Yuya Nishihara <yuya@tcha.org>
parents:
diff
changeset
|
25 $ hg ci -qAm2 c |
f0c2653ca706
merge: add tests for commit with no content change
Yuya Nishihara <yuya@tcha.org>
parents:
diff
changeset
|
26 |
f0c2653ca706
merge: add tests for commit with no content change
Yuya Nishihara <yuya@tcha.org>
parents:
diff
changeset
|
27 $ hg merge |
f0c2653ca706
merge: add tests for commit with no content change
Yuya Nishihara <yuya@tcha.org>
parents:
diff
changeset
|
28 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
f0c2653ca706
merge: add tests for commit with no content change
Yuya Nishihara <yuya@tcha.org>
parents:
diff
changeset
|
29 (branch merge, don't forget to commit) |
f0c2653ca706
merge: add tests for commit with no content change
Yuya Nishihara <yuya@tcha.org>
parents:
diff
changeset
|
30 $ hg ci --debug -m merge |
f0c2653ca706
merge: add tests for commit with no content change
Yuya Nishihara <yuya@tcha.org>
parents:
diff
changeset
|
31 committing files: |
f0c2653ca706
merge: add tests for commit with no content change
Yuya Nishihara <yuya@tcha.org>
parents:
diff
changeset
|
32 b |
39111
46da52f4b820
commit: try hard to reuse p1 manifest if nothing changed
Yuya Nishihara <yuya@tcha.org>
parents:
39110
diff
changeset
|
33 not reusing manifest (no file change in changelog, but manifest differs) |
39110
f0c2653ca706
merge: add tests for commit with no content change
Yuya Nishihara <yuya@tcha.org>
parents:
diff
changeset
|
34 committing manifest |
f0c2653ca706
merge: add tests for commit with no content change
Yuya Nishihara <yuya@tcha.org>
parents:
diff
changeset
|
35 committing changelog |
f0c2653ca706
merge: add tests for commit with no content change
Yuya Nishihara <yuya@tcha.org>
parents:
diff
changeset
|
36 updating the branch cache |
f0c2653ca706
merge: add tests for commit with no content change
Yuya Nishihara <yuya@tcha.org>
parents:
diff
changeset
|
37 committed changeset 3:7aa8a293f5d97377037afc21e871e036e718d659 |
f0c2653ca706
merge: add tests for commit with no content change
Yuya Nishihara <yuya@tcha.org>
parents:
diff
changeset
|
38 $ hg log -GTl |
f0c2653ca706
merge: add tests for commit with no content change
Yuya Nishihara <yuya@tcha.org>
parents:
diff
changeset
|
39 @ 3:7aa8a293f5d9 p=2,1 m=3:8667461869a1 f=[] |
f0c2653ca706
merge: add tests for commit with no content change
Yuya Nishihara <yuya@tcha.org>
parents:
diff
changeset
|
40 |\ |
f0c2653ca706
merge: add tests for commit with no content change
Yuya Nishihara <yuya@tcha.org>
parents:
diff
changeset
|
41 | o 2:e0ea47086fce p=0,-1 m=2:b2e5b07f9374 f=["c"] |
f0c2653ca706
merge: add tests for commit with no content change
Yuya Nishihara <yuya@tcha.org>
parents:
diff
changeset
|
42 | | |
f0c2653ca706
merge: add tests for commit with no content change
Yuya Nishihara <yuya@tcha.org>
parents:
diff
changeset
|
43 o | 1:64d01526d4c2 p=0,-1 m=1:686dbf0aeca4 f=["b"] |
f0c2653ca706
merge: add tests for commit with no content change
Yuya Nishihara <yuya@tcha.org>
parents:
diff
changeset
|
44 |/ |
f0c2653ca706
merge: add tests for commit with no content change
Yuya Nishihara <yuya@tcha.org>
parents:
diff
changeset
|
45 o 0:487a0a245cea p=-1,-1 m=0:8515d4bfda76 f=["a"] |
f0c2653ca706
merge: add tests for commit with no content change
Yuya Nishihara <yuya@tcha.org>
parents:
diff
changeset
|
46 |
f0c2653ca706
merge: add tests for commit with no content change
Yuya Nishihara <yuya@tcha.org>
parents:
diff
changeset
|
47 |
f0c2653ca706
merge: add tests for commit with no content change
Yuya Nishihara <yuya@tcha.org>
parents:
diff
changeset
|
48 $ cd .. |
f0c2653ca706
merge: add tests for commit with no content change
Yuya Nishihara <yuya@tcha.org>
parents:
diff
changeset
|
49 $ check_convert_identity added-both |
f0c2653ca706
merge: add tests for commit with no content change
Yuya Nishihara <yuya@tcha.org>
parents:
diff
changeset
|
50 |
f0c2653ca706
merge: add tests for commit with no content change
Yuya Nishihara <yuya@tcha.org>
parents:
diff
changeset
|
51 Files added at both parents, but the other removed at the merge: |
f0c2653ca706
merge: add tests for commit with no content change
Yuya Nishihara <yuya@tcha.org>
parents:
diff
changeset
|
52 (In this case, ctx.files() after the commit contains the removed file "b", but |
f0c2653ca706
merge: add tests for commit with no content change
Yuya Nishihara <yuya@tcha.org>
parents:
diff
changeset
|
53 its manifest does not differ from p1.) |
f0c2653ca706
merge: add tests for commit with no content change
Yuya Nishihara <yuya@tcha.org>
parents:
diff
changeset
|
54 |
f0c2653ca706
merge: add tests for commit with no content change
Yuya Nishihara <yuya@tcha.org>
parents:
diff
changeset
|
55 $ hg init added-both-removed-at-merge |
f0c2653ca706
merge: add tests for commit with no content change
Yuya Nishihara <yuya@tcha.org>
parents:
diff
changeset
|
56 $ cd added-both-removed-at-merge |
f0c2653ca706
merge: add tests for commit with no content change
Yuya Nishihara <yuya@tcha.org>
parents:
diff
changeset
|
57 $ touch a b c |
f0c2653ca706
merge: add tests for commit with no content change
Yuya Nishihara <yuya@tcha.org>
parents:
diff
changeset
|
58 $ hg ci -qAm0 a |
f0c2653ca706
merge: add tests for commit with no content change
Yuya Nishihara <yuya@tcha.org>
parents:
diff
changeset
|
59 $ hg ci -qAm1 b |
f0c2653ca706
merge: add tests for commit with no content change
Yuya Nishihara <yuya@tcha.org>
parents:
diff
changeset
|
60 $ hg up -q 0 |
f0c2653ca706
merge: add tests for commit with no content change
Yuya Nishihara <yuya@tcha.org>
parents:
diff
changeset
|
61 $ hg ci -qAm2 c |
f0c2653ca706
merge: add tests for commit with no content change
Yuya Nishihara <yuya@tcha.org>
parents:
diff
changeset
|
62 |
f0c2653ca706
merge: add tests for commit with no content change
Yuya Nishihara <yuya@tcha.org>
parents:
diff
changeset
|
63 $ hg merge |
f0c2653ca706
merge: add tests for commit with no content change
Yuya Nishihara <yuya@tcha.org>
parents:
diff
changeset
|
64 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
f0c2653ca706
merge: add tests for commit with no content change
Yuya Nishihara <yuya@tcha.org>
parents:
diff
changeset
|
65 (branch merge, don't forget to commit) |
f0c2653ca706
merge: add tests for commit with no content change
Yuya Nishihara <yuya@tcha.org>
parents:
diff
changeset
|
66 $ hg rm -f b |
f0c2653ca706
merge: add tests for commit with no content change
Yuya Nishihara <yuya@tcha.org>
parents:
diff
changeset
|
67 $ hg ci --debug -m merge |
f0c2653ca706
merge: add tests for commit with no content change
Yuya Nishihara <yuya@tcha.org>
parents:
diff
changeset
|
68 committing files: |
f0c2653ca706
merge: add tests for commit with no content change
Yuya Nishihara <yuya@tcha.org>
parents:
diff
changeset
|
69 committing manifest |
f0c2653ca706
merge: add tests for commit with no content change
Yuya Nishihara <yuya@tcha.org>
parents:
diff
changeset
|
70 committing changelog |
f0c2653ca706
merge: add tests for commit with no content change
Yuya Nishihara <yuya@tcha.org>
parents:
diff
changeset
|
71 updating the branch cache |
f0c2653ca706
merge: add tests for commit with no content change
Yuya Nishihara <yuya@tcha.org>
parents:
diff
changeset
|
72 committed changeset 3:915745f3ca3d9d699925269474c2d0a9526e8dfa |
f0c2653ca706
merge: add tests for commit with no content change
Yuya Nishihara <yuya@tcha.org>
parents:
diff
changeset
|
73 $ hg log -GTl |
f0c2653ca706
merge: add tests for commit with no content change
Yuya Nishihara <yuya@tcha.org>
parents:
diff
changeset
|
74 @ 3:915745f3ca3d p=2,1 m=3:8e9cf3456921 f=["b"] |
f0c2653ca706
merge: add tests for commit with no content change
Yuya Nishihara <yuya@tcha.org>
parents:
diff
changeset
|
75 |\ |
f0c2653ca706
merge: add tests for commit with no content change
Yuya Nishihara <yuya@tcha.org>
parents:
diff
changeset
|
76 | o 2:e0ea47086fce p=0,-1 m=2:b2e5b07f9374 f=["c"] |
f0c2653ca706
merge: add tests for commit with no content change
Yuya Nishihara <yuya@tcha.org>
parents:
diff
changeset
|
77 | | |
f0c2653ca706
merge: add tests for commit with no content change
Yuya Nishihara <yuya@tcha.org>
parents:
diff
changeset
|
78 o | 1:64d01526d4c2 p=0,-1 m=1:686dbf0aeca4 f=["b"] |
f0c2653ca706
merge: add tests for commit with no content change
Yuya Nishihara <yuya@tcha.org>
parents:
diff
changeset
|
79 |/ |
f0c2653ca706
merge: add tests for commit with no content change
Yuya Nishihara <yuya@tcha.org>
parents:
diff
changeset
|
80 o 0:487a0a245cea p=-1,-1 m=0:8515d4bfda76 f=["a"] |
f0c2653ca706
merge: add tests for commit with no content change
Yuya Nishihara <yuya@tcha.org>
parents:
diff
changeset
|
81 |
f0c2653ca706
merge: add tests for commit with no content change
Yuya Nishihara <yuya@tcha.org>
parents:
diff
changeset
|
82 |
f0c2653ca706
merge: add tests for commit with no content change
Yuya Nishihara <yuya@tcha.org>
parents:
diff
changeset
|
83 $ cd .. |
f0c2653ca706
merge: add tests for commit with no content change
Yuya Nishihara <yuya@tcha.org>
parents:
diff
changeset
|
84 $ check_convert_identity added-both |
f0c2653ca706
merge: add tests for commit with no content change
Yuya Nishihara <yuya@tcha.org>
parents:
diff
changeset
|
85 |
f0c2653ca706
merge: add tests for commit with no content change
Yuya Nishihara <yuya@tcha.org>
parents:
diff
changeset
|
86 An identical file added at both parents: |
f0c2653ca706
merge: add tests for commit with no content change
Yuya Nishihara <yuya@tcha.org>
parents:
diff
changeset
|
87 |
f0c2653ca706
merge: add tests for commit with no content change
Yuya Nishihara <yuya@tcha.org>
parents:
diff
changeset
|
88 $ hg init added-identical |
f0c2653ca706
merge: add tests for commit with no content change
Yuya Nishihara <yuya@tcha.org>
parents:
diff
changeset
|
89 $ cd added-identical |
f0c2653ca706
merge: add tests for commit with no content change
Yuya Nishihara <yuya@tcha.org>
parents:
diff
changeset
|
90 $ touch a b |
f0c2653ca706
merge: add tests for commit with no content change
Yuya Nishihara <yuya@tcha.org>
parents:
diff
changeset
|
91 $ hg ci -qAm0 a |
f0c2653ca706
merge: add tests for commit with no content change
Yuya Nishihara <yuya@tcha.org>
parents:
diff
changeset
|
92 $ hg ci -qAm1 b |
f0c2653ca706
merge: add tests for commit with no content change
Yuya Nishihara <yuya@tcha.org>
parents:
diff
changeset
|
93 $ hg up -q 0 |
f0c2653ca706
merge: add tests for commit with no content change
Yuya Nishihara <yuya@tcha.org>
parents:
diff
changeset
|
94 $ touch b |
f0c2653ca706
merge: add tests for commit with no content change
Yuya Nishihara <yuya@tcha.org>
parents:
diff
changeset
|
95 $ hg ci -qAm2 b |
f0c2653ca706
merge: add tests for commit with no content change
Yuya Nishihara <yuya@tcha.org>
parents:
diff
changeset
|
96 |
f0c2653ca706
merge: add tests for commit with no content change
Yuya Nishihara <yuya@tcha.org>
parents:
diff
changeset
|
97 $ hg merge |
f0c2653ca706
merge: add tests for commit with no content change
Yuya Nishihara <yuya@tcha.org>
parents:
diff
changeset
|
98 0 files updated, 0 files merged, 0 files removed, 0 files unresolved |
f0c2653ca706
merge: add tests for commit with no content change
Yuya Nishihara <yuya@tcha.org>
parents:
diff
changeset
|
99 (branch merge, don't forget to commit) |
f0c2653ca706
merge: add tests for commit with no content change
Yuya Nishihara <yuya@tcha.org>
parents:
diff
changeset
|
100 $ hg ci --debug -m merge |
f0c2653ca706
merge: add tests for commit with no content change
Yuya Nishihara <yuya@tcha.org>
parents:
diff
changeset
|
101 reusing manifest from p1 (no file change) |
f0c2653ca706
merge: add tests for commit with no content change
Yuya Nishihara <yuya@tcha.org>
parents:
diff
changeset
|
102 committing changelog |
f0c2653ca706
merge: add tests for commit with no content change
Yuya Nishihara <yuya@tcha.org>
parents:
diff
changeset
|
103 updating the branch cache |
f0c2653ca706
merge: add tests for commit with no content change
Yuya Nishihara <yuya@tcha.org>
parents:
diff
changeset
|
104 committed changeset 3:de26182cd210f0c3fb175ca7616704ab963d3024 |
f0c2653ca706
merge: add tests for commit with no content change
Yuya Nishihara <yuya@tcha.org>
parents:
diff
changeset
|
105 $ hg log -GTl |
f0c2653ca706
merge: add tests for commit with no content change
Yuya Nishihara <yuya@tcha.org>
parents:
diff
changeset
|
106 @ 3:de26182cd210 p=2,1 m=1:686dbf0aeca4 f=[] |
f0c2653ca706
merge: add tests for commit with no content change
Yuya Nishihara <yuya@tcha.org>
parents:
diff
changeset
|
107 |\ |
f0c2653ca706
merge: add tests for commit with no content change
Yuya Nishihara <yuya@tcha.org>
parents:
diff
changeset
|
108 | o 2:f00991f11eca p=0,-1 m=1:686dbf0aeca4 f=["b"] |
f0c2653ca706
merge: add tests for commit with no content change
Yuya Nishihara <yuya@tcha.org>
parents:
diff
changeset
|
109 | | |
f0c2653ca706
merge: add tests for commit with no content change
Yuya Nishihara <yuya@tcha.org>
parents:
diff
changeset
|
110 o | 1:64d01526d4c2 p=0,-1 m=1:686dbf0aeca4 f=["b"] |
f0c2653ca706
merge: add tests for commit with no content change
Yuya Nishihara <yuya@tcha.org>
parents:
diff
changeset
|
111 |/ |
f0c2653ca706
merge: add tests for commit with no content change
Yuya Nishihara <yuya@tcha.org>
parents:
diff
changeset
|
112 o 0:487a0a245cea p=-1,-1 m=0:8515d4bfda76 f=["a"] |
f0c2653ca706
merge: add tests for commit with no content change
Yuya Nishihara <yuya@tcha.org>
parents:
diff
changeset
|
113 |
f0c2653ca706
merge: add tests for commit with no content change
Yuya Nishihara <yuya@tcha.org>
parents:
diff
changeset
|
114 |
f0c2653ca706
merge: add tests for commit with no content change
Yuya Nishihara <yuya@tcha.org>
parents:
diff
changeset
|
115 $ cd .. |
f0c2653ca706
merge: add tests for commit with no content change
Yuya Nishihara <yuya@tcha.org>
parents:
diff
changeset
|
116 $ check_convert_identity added-identical |
f0c2653ca706
merge: add tests for commit with no content change
Yuya Nishihara <yuya@tcha.org>
parents:
diff
changeset
|
117 |
f0c2653ca706
merge: add tests for commit with no content change
Yuya Nishihara <yuya@tcha.org>
parents:
diff
changeset
|
118 #if execbit |
f0c2653ca706
merge: add tests for commit with no content change
Yuya Nishihara <yuya@tcha.org>
parents:
diff
changeset
|
119 |
f0c2653ca706
merge: add tests for commit with no content change
Yuya Nishihara <yuya@tcha.org>
parents:
diff
changeset
|
120 An identical file added at both parents, but the flag differs. Take local: |
f0c2653ca706
merge: add tests for commit with no content change
Yuya Nishihara <yuya@tcha.org>
parents:
diff
changeset
|
121 |
f0c2653ca706
merge: add tests for commit with no content change
Yuya Nishihara <yuya@tcha.org>
parents:
diff
changeset
|
122 $ hg init flag-change-take-p1 |
f0c2653ca706
merge: add tests for commit with no content change
Yuya Nishihara <yuya@tcha.org>
parents:
diff
changeset
|
123 $ cd flag-change-take-p1 |
f0c2653ca706
merge: add tests for commit with no content change
Yuya Nishihara <yuya@tcha.org>
parents:
diff
changeset
|
124 $ touch a b |
f0c2653ca706
merge: add tests for commit with no content change
Yuya Nishihara <yuya@tcha.org>
parents:
diff
changeset
|
125 $ hg ci -qAm0 a |
f0c2653ca706
merge: add tests for commit with no content change
Yuya Nishihara <yuya@tcha.org>
parents:
diff
changeset
|
126 $ hg ci -qAm1 b |
f0c2653ca706
merge: add tests for commit with no content change
Yuya Nishihara <yuya@tcha.org>
parents:
diff
changeset
|
127 $ hg up -q 0 |
f0c2653ca706
merge: add tests for commit with no content change
Yuya Nishihara <yuya@tcha.org>
parents:
diff
changeset
|
128 $ touch b |
f0c2653ca706
merge: add tests for commit with no content change
Yuya Nishihara <yuya@tcha.org>
parents:
diff
changeset
|
129 $ chmod +x b |
f0c2653ca706
merge: add tests for commit with no content change
Yuya Nishihara <yuya@tcha.org>
parents:
diff
changeset
|
130 $ hg ci -qAm2 b |
f0c2653ca706
merge: add tests for commit with no content change
Yuya Nishihara <yuya@tcha.org>
parents:
diff
changeset
|
131 |
f0c2653ca706
merge: add tests for commit with no content change
Yuya Nishihara <yuya@tcha.org>
parents:
diff
changeset
|
132 $ hg merge |
f0c2653ca706
merge: add tests for commit with no content change
Yuya Nishihara <yuya@tcha.org>
parents:
diff
changeset
|
133 warning: cannot merge flags for b without common ancestor - keeping local flags |
f0c2653ca706
merge: add tests for commit with no content change
Yuya Nishihara <yuya@tcha.org>
parents:
diff
changeset
|
134 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
f0c2653ca706
merge: add tests for commit with no content change
Yuya Nishihara <yuya@tcha.org>
parents:
diff
changeset
|
135 (branch merge, don't forget to commit) |
f0c2653ca706
merge: add tests for commit with no content change
Yuya Nishihara <yuya@tcha.org>
parents:
diff
changeset
|
136 $ chmod +x b |
f0c2653ca706
merge: add tests for commit with no content change
Yuya Nishihara <yuya@tcha.org>
parents:
diff
changeset
|
137 $ hg ci --debug -m merge |
f0c2653ca706
merge: add tests for commit with no content change
Yuya Nishihara <yuya@tcha.org>
parents:
diff
changeset
|
138 committing files: |
f0c2653ca706
merge: add tests for commit with no content change
Yuya Nishihara <yuya@tcha.org>
parents:
diff
changeset
|
139 b |
39111
46da52f4b820
commit: try hard to reuse p1 manifest if nothing changed
Yuya Nishihara <yuya@tcha.org>
parents:
39110
diff
changeset
|
140 reusing manifest form p1 (listed files actually unchanged) |
39110
f0c2653ca706
merge: add tests for commit with no content change
Yuya Nishihara <yuya@tcha.org>
parents:
diff
changeset
|
141 committing changelog |
f0c2653ca706
merge: add tests for commit with no content change
Yuya Nishihara <yuya@tcha.org>
parents:
diff
changeset
|
142 updating the branch cache |
39111
46da52f4b820
commit: try hard to reuse p1 manifest if nothing changed
Yuya Nishihara <yuya@tcha.org>
parents:
39110
diff
changeset
|
143 committed changeset 3:c8d50407916ef8a5a97cb6e36ca9bc844a6ee13e |
39110
f0c2653ca706
merge: add tests for commit with no content change
Yuya Nishihara <yuya@tcha.org>
parents:
diff
changeset
|
144 $ hg log -GTl |
39111
46da52f4b820
commit: try hard to reuse p1 manifest if nothing changed
Yuya Nishihara <yuya@tcha.org>
parents:
39110
diff
changeset
|
145 @ 3:c8d50407916e p=2,1 m=2:36b69ba4b24b f=[] |
39110
f0c2653ca706
merge: add tests for commit with no content change
Yuya Nishihara <yuya@tcha.org>
parents:
diff
changeset
|
146 |\ |
f0c2653ca706
merge: add tests for commit with no content change
Yuya Nishihara <yuya@tcha.org>
parents:
diff
changeset
|
147 | o 2:99451f16b3f5 p=0,-1 m=2:36b69ba4b24b f=["b"] |
f0c2653ca706
merge: add tests for commit with no content change
Yuya Nishihara <yuya@tcha.org>
parents:
diff
changeset
|
148 | | |
f0c2653ca706
merge: add tests for commit with no content change
Yuya Nishihara <yuya@tcha.org>
parents:
diff
changeset
|
149 o | 1:64d01526d4c2 p=0,-1 m=1:686dbf0aeca4 f=["b"] |
f0c2653ca706
merge: add tests for commit with no content change
Yuya Nishihara <yuya@tcha.org>
parents:
diff
changeset
|
150 |/ |
f0c2653ca706
merge: add tests for commit with no content change
Yuya Nishihara <yuya@tcha.org>
parents:
diff
changeset
|
151 o 0:487a0a245cea p=-1,-1 m=0:8515d4bfda76 f=["a"] |
f0c2653ca706
merge: add tests for commit with no content change
Yuya Nishihara <yuya@tcha.org>
parents:
diff
changeset
|
152 |
f0c2653ca706
merge: add tests for commit with no content change
Yuya Nishihara <yuya@tcha.org>
parents:
diff
changeset
|
153 $ hg files -vr3 |
f0c2653ca706
merge: add tests for commit with no content change
Yuya Nishihara <yuya@tcha.org>
parents:
diff
changeset
|
154 0 a |
f0c2653ca706
merge: add tests for commit with no content change
Yuya Nishihara <yuya@tcha.org>
parents:
diff
changeset
|
155 0 x b |
f0c2653ca706
merge: add tests for commit with no content change
Yuya Nishihara <yuya@tcha.org>
parents:
diff
changeset
|
156 |
f0c2653ca706
merge: add tests for commit with no content change
Yuya Nishihara <yuya@tcha.org>
parents:
diff
changeset
|
157 $ cd .. |
f0c2653ca706
merge: add tests for commit with no content change
Yuya Nishihara <yuya@tcha.org>
parents:
diff
changeset
|
158 $ check_convert_identity flag-change-take-p1 |
f0c2653ca706
merge: add tests for commit with no content change
Yuya Nishihara <yuya@tcha.org>
parents:
diff
changeset
|
159 |
f0c2653ca706
merge: add tests for commit with no content change
Yuya Nishihara <yuya@tcha.org>
parents:
diff
changeset
|
160 An identical file added at both parents, but the flag differs. Take other: |
f0c2653ca706
merge: add tests for commit with no content change
Yuya Nishihara <yuya@tcha.org>
parents:
diff
changeset
|
161 |
f0c2653ca706
merge: add tests for commit with no content change
Yuya Nishihara <yuya@tcha.org>
parents:
diff
changeset
|
162 $ hg init flag-change-take-p2 |
f0c2653ca706
merge: add tests for commit with no content change
Yuya Nishihara <yuya@tcha.org>
parents:
diff
changeset
|
163 $ cd flag-change-take-p2 |
f0c2653ca706
merge: add tests for commit with no content change
Yuya Nishihara <yuya@tcha.org>
parents:
diff
changeset
|
164 $ touch a b |
f0c2653ca706
merge: add tests for commit with no content change
Yuya Nishihara <yuya@tcha.org>
parents:
diff
changeset
|
165 $ hg ci -qAm0 a |
f0c2653ca706
merge: add tests for commit with no content change
Yuya Nishihara <yuya@tcha.org>
parents:
diff
changeset
|
166 $ hg ci -qAm1 b |
f0c2653ca706
merge: add tests for commit with no content change
Yuya Nishihara <yuya@tcha.org>
parents:
diff
changeset
|
167 $ hg up -q 0 |
f0c2653ca706
merge: add tests for commit with no content change
Yuya Nishihara <yuya@tcha.org>
parents:
diff
changeset
|
168 $ touch b |
f0c2653ca706
merge: add tests for commit with no content change
Yuya Nishihara <yuya@tcha.org>
parents:
diff
changeset
|
169 $ chmod +x b |
f0c2653ca706
merge: add tests for commit with no content change
Yuya Nishihara <yuya@tcha.org>
parents:
diff
changeset
|
170 $ hg ci -qAm2 b |
f0c2653ca706
merge: add tests for commit with no content change
Yuya Nishihara <yuya@tcha.org>
parents:
diff
changeset
|
171 |
f0c2653ca706
merge: add tests for commit with no content change
Yuya Nishihara <yuya@tcha.org>
parents:
diff
changeset
|
172 $ hg merge |
f0c2653ca706
merge: add tests for commit with no content change
Yuya Nishihara <yuya@tcha.org>
parents:
diff
changeset
|
173 warning: cannot merge flags for b without common ancestor - keeping local flags |
f0c2653ca706
merge: add tests for commit with no content change
Yuya Nishihara <yuya@tcha.org>
parents:
diff
changeset
|
174 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
f0c2653ca706
merge: add tests for commit with no content change
Yuya Nishihara <yuya@tcha.org>
parents:
diff
changeset
|
175 (branch merge, don't forget to commit) |
f0c2653ca706
merge: add tests for commit with no content change
Yuya Nishihara <yuya@tcha.org>
parents:
diff
changeset
|
176 $ chmod -x b |
f0c2653ca706
merge: add tests for commit with no content change
Yuya Nishihara <yuya@tcha.org>
parents:
diff
changeset
|
177 $ hg ci --debug -m merge |
f0c2653ca706
merge: add tests for commit with no content change
Yuya Nishihara <yuya@tcha.org>
parents:
diff
changeset
|
178 committing files: |
f0c2653ca706
merge: add tests for commit with no content change
Yuya Nishihara <yuya@tcha.org>
parents:
diff
changeset
|
179 b |
f0c2653ca706
merge: add tests for commit with no content change
Yuya Nishihara <yuya@tcha.org>
parents:
diff
changeset
|
180 committing manifest |
f0c2653ca706
merge: add tests for commit with no content change
Yuya Nishihara <yuya@tcha.org>
parents:
diff
changeset
|
181 committing changelog |
f0c2653ca706
merge: add tests for commit with no content change
Yuya Nishihara <yuya@tcha.org>
parents:
diff
changeset
|
182 updating the branch cache |
f0c2653ca706
merge: add tests for commit with no content change
Yuya Nishihara <yuya@tcha.org>
parents:
diff
changeset
|
183 committed changeset 3:06a62a687d87c7d8944743dee1ee9d8c66b3f6e3 |
f0c2653ca706
merge: add tests for commit with no content change
Yuya Nishihara <yuya@tcha.org>
parents:
diff
changeset
|
184 $ hg log -GTl |
f0c2653ca706
merge: add tests for commit with no content change
Yuya Nishihara <yuya@tcha.org>
parents:
diff
changeset
|
185 @ 3:06a62a687d87 p=2,1 m=3:2a315ba1aa45 f=["b"] |
f0c2653ca706
merge: add tests for commit with no content change
Yuya Nishihara <yuya@tcha.org>
parents:
diff
changeset
|
186 |\ |
f0c2653ca706
merge: add tests for commit with no content change
Yuya Nishihara <yuya@tcha.org>
parents:
diff
changeset
|
187 | o 2:99451f16b3f5 p=0,-1 m=2:36b69ba4b24b f=["b"] |
f0c2653ca706
merge: add tests for commit with no content change
Yuya Nishihara <yuya@tcha.org>
parents:
diff
changeset
|
188 | | |
f0c2653ca706
merge: add tests for commit with no content change
Yuya Nishihara <yuya@tcha.org>
parents:
diff
changeset
|
189 o | 1:64d01526d4c2 p=0,-1 m=1:686dbf0aeca4 f=["b"] |
f0c2653ca706
merge: add tests for commit with no content change
Yuya Nishihara <yuya@tcha.org>
parents:
diff
changeset
|
190 |/ |
f0c2653ca706
merge: add tests for commit with no content change
Yuya Nishihara <yuya@tcha.org>
parents:
diff
changeset
|
191 o 0:487a0a245cea p=-1,-1 m=0:8515d4bfda76 f=["a"] |
f0c2653ca706
merge: add tests for commit with no content change
Yuya Nishihara <yuya@tcha.org>
parents:
diff
changeset
|
192 |
f0c2653ca706
merge: add tests for commit with no content change
Yuya Nishihara <yuya@tcha.org>
parents:
diff
changeset
|
193 $ hg files -vr3 |
f0c2653ca706
merge: add tests for commit with no content change
Yuya Nishihara <yuya@tcha.org>
parents:
diff
changeset
|
194 0 a |
f0c2653ca706
merge: add tests for commit with no content change
Yuya Nishihara <yuya@tcha.org>
parents:
diff
changeset
|
195 0 b |
f0c2653ca706
merge: add tests for commit with no content change
Yuya Nishihara <yuya@tcha.org>
parents:
diff
changeset
|
196 |
f0c2653ca706
merge: add tests for commit with no content change
Yuya Nishihara <yuya@tcha.org>
parents:
diff
changeset
|
197 $ cd .. |
f0c2653ca706
merge: add tests for commit with no content change
Yuya Nishihara <yuya@tcha.org>
parents:
diff
changeset
|
198 $ check_convert_identity flag-change-take-p2 |
f0c2653ca706
merge: add tests for commit with no content change
Yuya Nishihara <yuya@tcha.org>
parents:
diff
changeset
|
199 |
f0c2653ca706
merge: add tests for commit with no content change
Yuya Nishihara <yuya@tcha.org>
parents:
diff
changeset
|
200 #endif |
f0c2653ca706
merge: add tests for commit with no content change
Yuya Nishihara <yuya@tcha.org>
parents:
diff
changeset
|
201 |
f0c2653ca706
merge: add tests for commit with no content change
Yuya Nishihara <yuya@tcha.org>
parents:
diff
changeset
|
202 An identical file added at both parents, one more file added at p2: |
f0c2653ca706
merge: add tests for commit with no content change
Yuya Nishihara <yuya@tcha.org>
parents:
diff
changeset
|
203 |
f0c2653ca706
merge: add tests for commit with no content change
Yuya Nishihara <yuya@tcha.org>
parents:
diff
changeset
|
204 $ hg init added-some-p2 |
f0c2653ca706
merge: add tests for commit with no content change
Yuya Nishihara <yuya@tcha.org>
parents:
diff
changeset
|
205 $ cd added-some-p2 |
f0c2653ca706
merge: add tests for commit with no content change
Yuya Nishihara <yuya@tcha.org>
parents:
diff
changeset
|
206 $ touch a b c |
f0c2653ca706
merge: add tests for commit with no content change
Yuya Nishihara <yuya@tcha.org>
parents:
diff
changeset
|
207 $ hg ci -qAm0 a |
f0c2653ca706
merge: add tests for commit with no content change
Yuya Nishihara <yuya@tcha.org>
parents:
diff
changeset
|
208 $ hg ci -qAm1 b |
f0c2653ca706
merge: add tests for commit with no content change
Yuya Nishihara <yuya@tcha.org>
parents:
diff
changeset
|
209 $ hg ci -qAm2 c |
f0c2653ca706
merge: add tests for commit with no content change
Yuya Nishihara <yuya@tcha.org>
parents:
diff
changeset
|
210 $ hg up -q 0 |
f0c2653ca706
merge: add tests for commit with no content change
Yuya Nishihara <yuya@tcha.org>
parents:
diff
changeset
|
211 $ touch b |
f0c2653ca706
merge: add tests for commit with no content change
Yuya Nishihara <yuya@tcha.org>
parents:
diff
changeset
|
212 $ hg ci -qAm3 b |
f0c2653ca706
merge: add tests for commit with no content change
Yuya Nishihara <yuya@tcha.org>
parents:
diff
changeset
|
213 |
f0c2653ca706
merge: add tests for commit with no content change
Yuya Nishihara <yuya@tcha.org>
parents:
diff
changeset
|
214 $ hg merge |
f0c2653ca706
merge: add tests for commit with no content change
Yuya Nishihara <yuya@tcha.org>
parents:
diff
changeset
|
215 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
f0c2653ca706
merge: add tests for commit with no content change
Yuya Nishihara <yuya@tcha.org>
parents:
diff
changeset
|
216 (branch merge, don't forget to commit) |
f0c2653ca706
merge: add tests for commit with no content change
Yuya Nishihara <yuya@tcha.org>
parents:
diff
changeset
|
217 $ hg ci --debug -m merge |
f0c2653ca706
merge: add tests for commit with no content change
Yuya Nishihara <yuya@tcha.org>
parents:
diff
changeset
|
218 committing files: |
f0c2653ca706
merge: add tests for commit with no content change
Yuya Nishihara <yuya@tcha.org>
parents:
diff
changeset
|
219 c |
39111
46da52f4b820
commit: try hard to reuse p1 manifest if nothing changed
Yuya Nishihara <yuya@tcha.org>
parents:
39110
diff
changeset
|
220 not reusing manifest (no file change in changelog, but manifest differs) |
39110
f0c2653ca706
merge: add tests for commit with no content change
Yuya Nishihara <yuya@tcha.org>
parents:
diff
changeset
|
221 committing manifest |
f0c2653ca706
merge: add tests for commit with no content change
Yuya Nishihara <yuya@tcha.org>
parents:
diff
changeset
|
222 committing changelog |
f0c2653ca706
merge: add tests for commit with no content change
Yuya Nishihara <yuya@tcha.org>
parents:
diff
changeset
|
223 updating the branch cache |
f0c2653ca706
merge: add tests for commit with no content change
Yuya Nishihara <yuya@tcha.org>
parents:
diff
changeset
|
224 committed changeset 4:f7fbc4e4d9a8fde03ba475adad675578c8bf472d |
f0c2653ca706
merge: add tests for commit with no content change
Yuya Nishihara <yuya@tcha.org>
parents:
diff
changeset
|
225 $ hg log -GTl |
f0c2653ca706
merge: add tests for commit with no content change
Yuya Nishihara <yuya@tcha.org>
parents:
diff
changeset
|
226 @ 4:f7fbc4e4d9a8 p=3,2 m=3:92acd5bfd716 f=[] |
f0c2653ca706
merge: add tests for commit with no content change
Yuya Nishihara <yuya@tcha.org>
parents:
diff
changeset
|
227 |\ |
f0c2653ca706
merge: add tests for commit with no content change
Yuya Nishihara <yuya@tcha.org>
parents:
diff
changeset
|
228 | o 3:e9d9f3cc981f p=0,-1 m=1:686dbf0aeca4 f=["b"] |
f0c2653ca706
merge: add tests for commit with no content change
Yuya Nishihara <yuya@tcha.org>
parents:
diff
changeset
|
229 | | |
f0c2653ca706
merge: add tests for commit with no content change
Yuya Nishihara <yuya@tcha.org>
parents:
diff
changeset
|
230 o | 2:93c5529a4ec7 p=1,-1 m=2:ae25a31b30b3 f=["c"] |
f0c2653ca706
merge: add tests for commit with no content change
Yuya Nishihara <yuya@tcha.org>
parents:
diff
changeset
|
231 | | |
f0c2653ca706
merge: add tests for commit with no content change
Yuya Nishihara <yuya@tcha.org>
parents:
diff
changeset
|
232 o | 1:64d01526d4c2 p=0,-1 m=1:686dbf0aeca4 f=["b"] |
f0c2653ca706
merge: add tests for commit with no content change
Yuya Nishihara <yuya@tcha.org>
parents:
diff
changeset
|
233 |/ |
f0c2653ca706
merge: add tests for commit with no content change
Yuya Nishihara <yuya@tcha.org>
parents:
diff
changeset
|
234 o 0:487a0a245cea p=-1,-1 m=0:8515d4bfda76 f=["a"] |
f0c2653ca706
merge: add tests for commit with no content change
Yuya Nishihara <yuya@tcha.org>
parents:
diff
changeset
|
235 |
f0c2653ca706
merge: add tests for commit with no content change
Yuya Nishihara <yuya@tcha.org>
parents:
diff
changeset
|
236 |
f0c2653ca706
merge: add tests for commit with no content change
Yuya Nishihara <yuya@tcha.org>
parents:
diff
changeset
|
237 $ cd .. |
f0c2653ca706
merge: add tests for commit with no content change
Yuya Nishihara <yuya@tcha.org>
parents:
diff
changeset
|
238 $ check_convert_identity added-some-p2 |
f0c2653ca706
merge: add tests for commit with no content change
Yuya Nishihara <yuya@tcha.org>
parents:
diff
changeset
|
239 |
f0c2653ca706
merge: add tests for commit with no content change
Yuya Nishihara <yuya@tcha.org>
parents:
diff
changeset
|
240 An identical file added at both parents, one more file added at p1: |
f0c2653ca706
merge: add tests for commit with no content change
Yuya Nishihara <yuya@tcha.org>
parents:
diff
changeset
|
241 (In this case, p1 manifest is reused at the merge commit, which means the |
f0c2653ca706
merge: add tests for commit with no content change
Yuya Nishihara <yuya@tcha.org>
parents:
diff
changeset
|
242 manifest DAG does not have the same shape as the changelog.) |
f0c2653ca706
merge: add tests for commit with no content change
Yuya Nishihara <yuya@tcha.org>
parents:
diff
changeset
|
243 |
f0c2653ca706
merge: add tests for commit with no content change
Yuya Nishihara <yuya@tcha.org>
parents:
diff
changeset
|
244 $ hg init added-some-p1 |
f0c2653ca706
merge: add tests for commit with no content change
Yuya Nishihara <yuya@tcha.org>
parents:
diff
changeset
|
245 $ cd added-some-p1 |
f0c2653ca706
merge: add tests for commit with no content change
Yuya Nishihara <yuya@tcha.org>
parents:
diff
changeset
|
246 $ touch a b |
f0c2653ca706
merge: add tests for commit with no content change
Yuya Nishihara <yuya@tcha.org>
parents:
diff
changeset
|
247 $ hg ci -qAm0 a |
f0c2653ca706
merge: add tests for commit with no content change
Yuya Nishihara <yuya@tcha.org>
parents:
diff
changeset
|
248 $ hg ci -qAm1 b |
f0c2653ca706
merge: add tests for commit with no content change
Yuya Nishihara <yuya@tcha.org>
parents:
diff
changeset
|
249 $ hg up -q 0 |
f0c2653ca706
merge: add tests for commit with no content change
Yuya Nishihara <yuya@tcha.org>
parents:
diff
changeset
|
250 $ touch b c |
f0c2653ca706
merge: add tests for commit with no content change
Yuya Nishihara <yuya@tcha.org>
parents:
diff
changeset
|
251 $ hg ci -qAm2 b |
f0c2653ca706
merge: add tests for commit with no content change
Yuya Nishihara <yuya@tcha.org>
parents:
diff
changeset
|
252 $ hg ci -qAm3 c |
f0c2653ca706
merge: add tests for commit with no content change
Yuya Nishihara <yuya@tcha.org>
parents:
diff
changeset
|
253 |
f0c2653ca706
merge: add tests for commit with no content change
Yuya Nishihara <yuya@tcha.org>
parents:
diff
changeset
|
254 $ hg merge |
f0c2653ca706
merge: add tests for commit with no content change
Yuya Nishihara <yuya@tcha.org>
parents:
diff
changeset
|
255 0 files updated, 0 files merged, 0 files removed, 0 files unresolved |
f0c2653ca706
merge: add tests for commit with no content change
Yuya Nishihara <yuya@tcha.org>
parents:
diff
changeset
|
256 (branch merge, don't forget to commit) |
f0c2653ca706
merge: add tests for commit with no content change
Yuya Nishihara <yuya@tcha.org>
parents:
diff
changeset
|
257 $ hg ci --debug -m merge |
f0c2653ca706
merge: add tests for commit with no content change
Yuya Nishihara <yuya@tcha.org>
parents:
diff
changeset
|
258 reusing manifest from p1 (no file change) |
f0c2653ca706
merge: add tests for commit with no content change
Yuya Nishihara <yuya@tcha.org>
parents:
diff
changeset
|
259 committing changelog |
f0c2653ca706
merge: add tests for commit with no content change
Yuya Nishihara <yuya@tcha.org>
parents:
diff
changeset
|
260 updating the branch cache |
f0c2653ca706
merge: add tests for commit with no content change
Yuya Nishihara <yuya@tcha.org>
parents:
diff
changeset
|
261 committed changeset 4:a9f0f589a913f5a149dc10dfbd5af726977c36c4 |
f0c2653ca706
merge: add tests for commit with no content change
Yuya Nishihara <yuya@tcha.org>
parents:
diff
changeset
|
262 $ hg log -GTl |
f0c2653ca706
merge: add tests for commit with no content change
Yuya Nishihara <yuya@tcha.org>
parents:
diff
changeset
|
263 @ 4:a9f0f589a913 p=3,1 m=2:ae25a31b30b3 f=[] |
f0c2653ca706
merge: add tests for commit with no content change
Yuya Nishihara <yuya@tcha.org>
parents:
diff
changeset
|
264 |\ |
f0c2653ca706
merge: add tests for commit with no content change
Yuya Nishihara <yuya@tcha.org>
parents:
diff
changeset
|
265 | o 3:b8dc385241b5 p=2,-1 m=2:ae25a31b30b3 f=["c"] |
f0c2653ca706
merge: add tests for commit with no content change
Yuya Nishihara <yuya@tcha.org>
parents:
diff
changeset
|
266 | | |
f0c2653ca706
merge: add tests for commit with no content change
Yuya Nishihara <yuya@tcha.org>
parents:
diff
changeset
|
267 | o 2:f00991f11eca p=0,-1 m=1:686dbf0aeca4 f=["b"] |
f0c2653ca706
merge: add tests for commit with no content change
Yuya Nishihara <yuya@tcha.org>
parents:
diff
changeset
|
268 | | |
f0c2653ca706
merge: add tests for commit with no content change
Yuya Nishihara <yuya@tcha.org>
parents:
diff
changeset
|
269 o | 1:64d01526d4c2 p=0,-1 m=1:686dbf0aeca4 f=["b"] |
f0c2653ca706
merge: add tests for commit with no content change
Yuya Nishihara <yuya@tcha.org>
parents:
diff
changeset
|
270 |/ |
f0c2653ca706
merge: add tests for commit with no content change
Yuya Nishihara <yuya@tcha.org>
parents:
diff
changeset
|
271 o 0:487a0a245cea p=-1,-1 m=0:8515d4bfda76 f=["a"] |
f0c2653ca706
merge: add tests for commit with no content change
Yuya Nishihara <yuya@tcha.org>
parents:
diff
changeset
|
272 |
f0c2653ca706
merge: add tests for commit with no content change
Yuya Nishihara <yuya@tcha.org>
parents:
diff
changeset
|
273 |
f0c2653ca706
merge: add tests for commit with no content change
Yuya Nishihara <yuya@tcha.org>
parents:
diff
changeset
|
274 $ cd .. |
f0c2653ca706
merge: add tests for commit with no content change
Yuya Nishihara <yuya@tcha.org>
parents:
diff
changeset
|
275 $ check_convert_identity added-some-p1 |
f0c2653ca706
merge: add tests for commit with no content change
Yuya Nishihara <yuya@tcha.org>
parents:
diff
changeset
|
276 |
f0c2653ca706
merge: add tests for commit with no content change
Yuya Nishihara <yuya@tcha.org>
parents:
diff
changeset
|
277 A file added at p2, a named branch created at p1: |
f0c2653ca706
merge: add tests for commit with no content change
Yuya Nishihara <yuya@tcha.org>
parents:
diff
changeset
|
278 |
f0c2653ca706
merge: add tests for commit with no content change
Yuya Nishihara <yuya@tcha.org>
parents:
diff
changeset
|
279 $ hg init named-branch-p1 |
f0c2653ca706
merge: add tests for commit with no content change
Yuya Nishihara <yuya@tcha.org>
parents:
diff
changeset
|
280 $ cd named-branch-p1 |
f0c2653ca706
merge: add tests for commit with no content change
Yuya Nishihara <yuya@tcha.org>
parents:
diff
changeset
|
281 $ touch a b |
f0c2653ca706
merge: add tests for commit with no content change
Yuya Nishihara <yuya@tcha.org>
parents:
diff
changeset
|
282 $ hg ci -qAm0 a |
f0c2653ca706
merge: add tests for commit with no content change
Yuya Nishihara <yuya@tcha.org>
parents:
diff
changeset
|
283 $ hg ci -qAm1 b |
f0c2653ca706
merge: add tests for commit with no content change
Yuya Nishihara <yuya@tcha.org>
parents:
diff
changeset
|
284 $ hg up -q 0 |
f0c2653ca706
merge: add tests for commit with no content change
Yuya Nishihara <yuya@tcha.org>
parents:
diff
changeset
|
285 $ hg branch -q foo |
f0c2653ca706
merge: add tests for commit with no content change
Yuya Nishihara <yuya@tcha.org>
parents:
diff
changeset
|
286 $ hg ci -m2 |
f0c2653ca706
merge: add tests for commit with no content change
Yuya Nishihara <yuya@tcha.org>
parents:
diff
changeset
|
287 |
f0c2653ca706
merge: add tests for commit with no content change
Yuya Nishihara <yuya@tcha.org>
parents:
diff
changeset
|
288 $ hg merge default |
f0c2653ca706
merge: add tests for commit with no content change
Yuya Nishihara <yuya@tcha.org>
parents:
diff
changeset
|
289 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
f0c2653ca706
merge: add tests for commit with no content change
Yuya Nishihara <yuya@tcha.org>
parents:
diff
changeset
|
290 (branch merge, don't forget to commit) |
f0c2653ca706
merge: add tests for commit with no content change
Yuya Nishihara <yuya@tcha.org>
parents:
diff
changeset
|
291 $ hg ci --debug -m merge |
f0c2653ca706
merge: add tests for commit with no content change
Yuya Nishihara <yuya@tcha.org>
parents:
diff
changeset
|
292 committing files: |
f0c2653ca706
merge: add tests for commit with no content change
Yuya Nishihara <yuya@tcha.org>
parents:
diff
changeset
|
293 b |
39111
46da52f4b820
commit: try hard to reuse p1 manifest if nothing changed
Yuya Nishihara <yuya@tcha.org>
parents:
39110
diff
changeset
|
294 not reusing manifest (no file change in changelog, but manifest differs) |
39110
f0c2653ca706
merge: add tests for commit with no content change
Yuya Nishihara <yuya@tcha.org>
parents:
diff
changeset
|
295 committing manifest |
f0c2653ca706
merge: add tests for commit with no content change
Yuya Nishihara <yuya@tcha.org>
parents:
diff
changeset
|
296 committing changelog |
f0c2653ca706
merge: add tests for commit with no content change
Yuya Nishihara <yuya@tcha.org>
parents:
diff
changeset
|
297 updating the branch cache |
f0c2653ca706
merge: add tests for commit with no content change
Yuya Nishihara <yuya@tcha.org>
parents:
diff
changeset
|
298 committed changeset 3:fb97d83b02fd072295cfc2171f21b7d38509bfd7 |
f0c2653ca706
merge: add tests for commit with no content change
Yuya Nishihara <yuya@tcha.org>
parents:
diff
changeset
|
299 $ hg log -GT'{l} branch={branch}' |
f0c2653ca706
merge: add tests for commit with no content change
Yuya Nishihara <yuya@tcha.org>
parents:
diff
changeset
|
300 @ 3:fb97d83b02fd p=2,1 m=2:9091c64f4ea1 f=[] branch=foo |
f0c2653ca706
merge: add tests for commit with no content change
Yuya Nishihara <yuya@tcha.org>
parents:
diff
changeset
|
301 |\ |
f0c2653ca706
merge: add tests for commit with no content change
Yuya Nishihara <yuya@tcha.org>
parents:
diff
changeset
|
302 | o 2:a3a9fa6587e5 p=0,-1 m=0:8515d4bfda76 f=[] branch=foo |
f0c2653ca706
merge: add tests for commit with no content change
Yuya Nishihara <yuya@tcha.org>
parents:
diff
changeset
|
303 | | |
f0c2653ca706
merge: add tests for commit with no content change
Yuya Nishihara <yuya@tcha.org>
parents:
diff
changeset
|
304 o | 1:64d01526d4c2 p=0,-1 m=1:686dbf0aeca4 f=["b"] branch=default |
f0c2653ca706
merge: add tests for commit with no content change
Yuya Nishihara <yuya@tcha.org>
parents:
diff
changeset
|
305 |/ |
f0c2653ca706
merge: add tests for commit with no content change
Yuya Nishihara <yuya@tcha.org>
parents:
diff
changeset
|
306 o 0:487a0a245cea p=-1,-1 m=0:8515d4bfda76 f=["a"] branch=default |
f0c2653ca706
merge: add tests for commit with no content change
Yuya Nishihara <yuya@tcha.org>
parents:
diff
changeset
|
307 |
f0c2653ca706
merge: add tests for commit with no content change
Yuya Nishihara <yuya@tcha.org>
parents:
diff
changeset
|
308 |
f0c2653ca706
merge: add tests for commit with no content change
Yuya Nishihara <yuya@tcha.org>
parents:
diff
changeset
|
309 $ cd .. |
f0c2653ca706
merge: add tests for commit with no content change
Yuya Nishihara <yuya@tcha.org>
parents:
diff
changeset
|
310 $ check_convert_identity named-branch-p1 |
f0c2653ca706
merge: add tests for commit with no content change
Yuya Nishihara <yuya@tcha.org>
parents:
diff
changeset
|
311 |
f0c2653ca706
merge: add tests for commit with no content change
Yuya Nishihara <yuya@tcha.org>
parents:
diff
changeset
|
312 A file added at p1, a named branch created at p2: |
f0c2653ca706
merge: add tests for commit with no content change
Yuya Nishihara <yuya@tcha.org>
parents:
diff
changeset
|
313 (In this case, p1 manifest is reused at the merge commit, which means the |
f0c2653ca706
merge: add tests for commit with no content change
Yuya Nishihara <yuya@tcha.org>
parents:
diff
changeset
|
314 manifest DAG does not have the same shape as the changelog.) |
f0c2653ca706
merge: add tests for commit with no content change
Yuya Nishihara <yuya@tcha.org>
parents:
diff
changeset
|
315 |
f0c2653ca706
merge: add tests for commit with no content change
Yuya Nishihara <yuya@tcha.org>
parents:
diff
changeset
|
316 $ hg init named-branch-p2 |
f0c2653ca706
merge: add tests for commit with no content change
Yuya Nishihara <yuya@tcha.org>
parents:
diff
changeset
|
317 $ cd named-branch-p2 |
f0c2653ca706
merge: add tests for commit with no content change
Yuya Nishihara <yuya@tcha.org>
parents:
diff
changeset
|
318 $ touch a b |
f0c2653ca706
merge: add tests for commit with no content change
Yuya Nishihara <yuya@tcha.org>
parents:
diff
changeset
|
319 $ hg ci -qAm0 a |
f0c2653ca706
merge: add tests for commit with no content change
Yuya Nishihara <yuya@tcha.org>
parents:
diff
changeset
|
320 $ hg branch -q foo |
f0c2653ca706
merge: add tests for commit with no content change
Yuya Nishihara <yuya@tcha.org>
parents:
diff
changeset
|
321 $ hg ci -m1 |
f0c2653ca706
merge: add tests for commit with no content change
Yuya Nishihara <yuya@tcha.org>
parents:
diff
changeset
|
322 $ hg up -q 0 |
f0c2653ca706
merge: add tests for commit with no content change
Yuya Nishihara <yuya@tcha.org>
parents:
diff
changeset
|
323 $ hg ci -qAm1 b |
f0c2653ca706
merge: add tests for commit with no content change
Yuya Nishihara <yuya@tcha.org>
parents:
diff
changeset
|
324 |
f0c2653ca706
merge: add tests for commit with no content change
Yuya Nishihara <yuya@tcha.org>
parents:
diff
changeset
|
325 $ hg merge foo |
f0c2653ca706
merge: add tests for commit with no content change
Yuya Nishihara <yuya@tcha.org>
parents:
diff
changeset
|
326 0 files updated, 0 files merged, 0 files removed, 0 files unresolved |
f0c2653ca706
merge: add tests for commit with no content change
Yuya Nishihara <yuya@tcha.org>
parents:
diff
changeset
|
327 (branch merge, don't forget to commit) |
f0c2653ca706
merge: add tests for commit with no content change
Yuya Nishihara <yuya@tcha.org>
parents:
diff
changeset
|
328 $ hg ci --debug -m merge |
f0c2653ca706
merge: add tests for commit with no content change
Yuya Nishihara <yuya@tcha.org>
parents:
diff
changeset
|
329 reusing manifest from p1 (no file change) |
f0c2653ca706
merge: add tests for commit with no content change
Yuya Nishihara <yuya@tcha.org>
parents:
diff
changeset
|
330 committing changelog |
f0c2653ca706
merge: add tests for commit with no content change
Yuya Nishihara <yuya@tcha.org>
parents:
diff
changeset
|
331 updating the branch cache |
f0c2653ca706
merge: add tests for commit with no content change
Yuya Nishihara <yuya@tcha.org>
parents:
diff
changeset
|
332 committed changeset 3:036823e24692218324d4af43b07ff89f8a000096 |
f0c2653ca706
merge: add tests for commit with no content change
Yuya Nishihara <yuya@tcha.org>
parents:
diff
changeset
|
333 $ hg log -GT'{l} branch={branch}' |
f0c2653ca706
merge: add tests for commit with no content change
Yuya Nishihara <yuya@tcha.org>
parents:
diff
changeset
|
334 @ 3:036823e24692 p=2,1 m=1:686dbf0aeca4 f=[] branch=default |
f0c2653ca706
merge: add tests for commit with no content change
Yuya Nishihara <yuya@tcha.org>
parents:
diff
changeset
|
335 |\ |
f0c2653ca706
merge: add tests for commit with no content change
Yuya Nishihara <yuya@tcha.org>
parents:
diff
changeset
|
336 | o 2:64d01526d4c2 p=0,-1 m=1:686dbf0aeca4 f=["b"] branch=default |
f0c2653ca706
merge: add tests for commit with no content change
Yuya Nishihara <yuya@tcha.org>
parents:
diff
changeset
|
337 | | |
f0c2653ca706
merge: add tests for commit with no content change
Yuya Nishihara <yuya@tcha.org>
parents:
diff
changeset
|
338 o | 1:da38c8e00727 p=0,-1 m=0:8515d4bfda76 f=[] branch=foo |
f0c2653ca706
merge: add tests for commit with no content change
Yuya Nishihara <yuya@tcha.org>
parents:
diff
changeset
|
339 |/ |
f0c2653ca706
merge: add tests for commit with no content change
Yuya Nishihara <yuya@tcha.org>
parents:
diff
changeset
|
340 o 0:487a0a245cea p=-1,-1 m=0:8515d4bfda76 f=["a"] branch=default |
f0c2653ca706
merge: add tests for commit with no content change
Yuya Nishihara <yuya@tcha.org>
parents:
diff
changeset
|
341 |
f0c2653ca706
merge: add tests for commit with no content change
Yuya Nishihara <yuya@tcha.org>
parents:
diff
changeset
|
342 |
f0c2653ca706
merge: add tests for commit with no content change
Yuya Nishihara <yuya@tcha.org>
parents:
diff
changeset
|
343 $ cd .. |
f0c2653ca706
merge: add tests for commit with no content change
Yuya Nishihara <yuya@tcha.org>
parents:
diff
changeset
|
344 $ check_convert_identity named-branch-p2 |
f0c2653ca706
merge: add tests for commit with no content change
Yuya Nishihara <yuya@tcha.org>
parents:
diff
changeset
|
345 |
f0c2653ca706
merge: add tests for commit with no content change
Yuya Nishihara <yuya@tcha.org>
parents:
diff
changeset
|
346 A file changed once at both parents, but amended to have identical content: |
f0c2653ca706
merge: add tests for commit with no content change
Yuya Nishihara <yuya@tcha.org>
parents:
diff
changeset
|
347 |
f0c2653ca706
merge: add tests for commit with no content change
Yuya Nishihara <yuya@tcha.org>
parents:
diff
changeset
|
348 $ hg init amend-p1 |
f0c2653ca706
merge: add tests for commit with no content change
Yuya Nishihara <yuya@tcha.org>
parents:
diff
changeset
|
349 $ cd amend-p1 |
f0c2653ca706
merge: add tests for commit with no content change
Yuya Nishihara <yuya@tcha.org>
parents:
diff
changeset
|
350 $ touch a |
f0c2653ca706
merge: add tests for commit with no content change
Yuya Nishihara <yuya@tcha.org>
parents:
diff
changeset
|
351 $ hg ci -qAm0 a |
f0c2653ca706
merge: add tests for commit with no content change
Yuya Nishihara <yuya@tcha.org>
parents:
diff
changeset
|
352 $ echo foo > a |
f0c2653ca706
merge: add tests for commit with no content change
Yuya Nishihara <yuya@tcha.org>
parents:
diff
changeset
|
353 $ hg ci -m1 |
f0c2653ca706
merge: add tests for commit with no content change
Yuya Nishihara <yuya@tcha.org>
parents:
diff
changeset
|
354 $ hg up -q 0 |
f0c2653ca706
merge: add tests for commit with no content change
Yuya Nishihara <yuya@tcha.org>
parents:
diff
changeset
|
355 $ echo bar > a |
f0c2653ca706
merge: add tests for commit with no content change
Yuya Nishihara <yuya@tcha.org>
parents:
diff
changeset
|
356 $ hg ci -qm2 |
f0c2653ca706
merge: add tests for commit with no content change
Yuya Nishihara <yuya@tcha.org>
parents:
diff
changeset
|
357 $ echo foo > a |
f0c2653ca706
merge: add tests for commit with no content change
Yuya Nishihara <yuya@tcha.org>
parents:
diff
changeset
|
358 $ hg ci -qm3 --amend |
f0c2653ca706
merge: add tests for commit with no content change
Yuya Nishihara <yuya@tcha.org>
parents:
diff
changeset
|
359 |
f0c2653ca706
merge: add tests for commit with no content change
Yuya Nishihara <yuya@tcha.org>
parents:
diff
changeset
|
360 $ hg merge |
f0c2653ca706
merge: add tests for commit with no content change
Yuya Nishihara <yuya@tcha.org>
parents:
diff
changeset
|
361 0 files updated, 0 files merged, 0 files removed, 0 files unresolved |
f0c2653ca706
merge: add tests for commit with no content change
Yuya Nishihara <yuya@tcha.org>
parents:
diff
changeset
|
362 (branch merge, don't forget to commit) |
f0c2653ca706
merge: add tests for commit with no content change
Yuya Nishihara <yuya@tcha.org>
parents:
diff
changeset
|
363 $ hg ci --debug -m merge |
f0c2653ca706
merge: add tests for commit with no content change
Yuya Nishihara <yuya@tcha.org>
parents:
diff
changeset
|
364 reusing manifest from p1 (no file change) |
f0c2653ca706
merge: add tests for commit with no content change
Yuya Nishihara <yuya@tcha.org>
parents:
diff
changeset
|
365 committing changelog |
f0c2653ca706
merge: add tests for commit with no content change
Yuya Nishihara <yuya@tcha.org>
parents:
diff
changeset
|
366 updating the branch cache |
f0c2653ca706
merge: add tests for commit with no content change
Yuya Nishihara <yuya@tcha.org>
parents:
diff
changeset
|
367 committed changeset 3:314e5bc5adf5c58ea571efabe33eedba20a201aa |
f0c2653ca706
merge: add tests for commit with no content change
Yuya Nishihara <yuya@tcha.org>
parents:
diff
changeset
|
368 $ hg log -GT'{l} branch={branch}' |
f0c2653ca706
merge: add tests for commit with no content change
Yuya Nishihara <yuya@tcha.org>
parents:
diff
changeset
|
369 @ 3:314e5bc5adf5 p=2,1 m=1:d33ea248bd73 f=[] branch=default |
f0c2653ca706
merge: add tests for commit with no content change
Yuya Nishihara <yuya@tcha.org>
parents:
diff
changeset
|
370 |\ |
f0c2653ca706
merge: add tests for commit with no content change
Yuya Nishihara <yuya@tcha.org>
parents:
diff
changeset
|
371 | o 2:de9c64f226a3 p=0,-1 m=1:d33ea248bd73 f=["a"] branch=default |
f0c2653ca706
merge: add tests for commit with no content change
Yuya Nishihara <yuya@tcha.org>
parents:
diff
changeset
|
372 | | |
f0c2653ca706
merge: add tests for commit with no content change
Yuya Nishihara <yuya@tcha.org>
parents:
diff
changeset
|
373 o | 1:6a74aec01b3c p=0,-1 m=1:d33ea248bd73 f=["a"] branch=default |
f0c2653ca706
merge: add tests for commit with no content change
Yuya Nishihara <yuya@tcha.org>
parents:
diff
changeset
|
374 |/ |
f0c2653ca706
merge: add tests for commit with no content change
Yuya Nishihara <yuya@tcha.org>
parents:
diff
changeset
|
375 o 0:487a0a245cea p=-1,-1 m=0:8515d4bfda76 f=["a"] branch=default |
f0c2653ca706
merge: add tests for commit with no content change
Yuya Nishihara <yuya@tcha.org>
parents:
diff
changeset
|
376 |
f0c2653ca706
merge: add tests for commit with no content change
Yuya Nishihara <yuya@tcha.org>
parents:
diff
changeset
|
377 |
f0c2653ca706
merge: add tests for commit with no content change
Yuya Nishihara <yuya@tcha.org>
parents:
diff
changeset
|
378 $ cd .. |
f0c2653ca706
merge: add tests for commit with no content change
Yuya Nishihara <yuya@tcha.org>
parents:
diff
changeset
|
379 $ check_convert_identity amend-p1 |