Mercurial > hg
annotate tests/test-rename-after-merge.t @ 50825:973fbb27ab45
backout: migrate `opts` to native kwargs
It will take a bit to unwind `cmdutil.commit`, so there's a conversion to
byteskwargs there, without changing the type of `opts` in this function. That's
also useful to flag it as needing to be changed.
author | Matt Harbison <matt_harbison@yahoo.com> |
---|---|
date | Sun, 20 Aug 2023 00:27:27 -0400 |
parents | 8d72e29ad1e0 |
children |
rev | line source |
---|---|
12399
4fee1fd3de9a
tests: added a short description to issue numbers
Martin Geisler <mg@aragost.com>
parents:
12328
diff
changeset
|
1 Issue746: renaming files brought by the second parent of a merge was |
4fee1fd3de9a
tests: added a short description to issue numbers
Martin Geisler <mg@aragost.com>
parents:
12328
diff
changeset
|
2 broken. |
5318
c6682cdada2f
Test renaming files brought by merge second parent (issue 746)
Patrick Mezard <pmezard@gmail.com>
parents:
diff
changeset
|
3 |
12279 | 4 Create source repository: |
5 | |
6 $ hg init t | |
7 $ cd t | |
8 $ echo a > a | |
9 $ hg ci -Am a | |
10 adding a | |
11 $ cd .. | |
12 | |
13 Fork source repository: | |
5318
c6682cdada2f
Test renaming files brought by merge second parent (issue 746)
Patrick Mezard <pmezard@gmail.com>
parents:
diff
changeset
|
14 |
12279 | 15 $ hg clone t t2 |
16 updating to branch default | |
17 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
18 $ cd t2 | |
19 $ echo b > b | |
20 $ hg ci -Am b | |
21 adding b | |
22 | |
23 Update source repository: | |
24 | |
25 $ cd ../t | |
26 $ echo a >> a | |
27 $ hg ci -m a2 | |
28 | |
29 Merge repositories: | |
5318
c6682cdada2f
Test renaming files brought by merge second parent (issue 746)
Patrick Mezard <pmezard@gmail.com>
parents:
diff
changeset
|
30 |
12279 | 31 $ hg pull ../t2 |
32 pulling from ../t2 | |
33 searching for changes | |
34 adding changesets | |
35 adding manifests | |
36 adding file changes | |
37 added 1 changesets with 1 changes to 1 files (+1 heads) | |
34661
eb586ed5d8ce
transaction-summary: show the range of new revisions upon pull/unbundle (BC)
Denis Laxalde <denis.laxalde@logilab.fr>
parents:
16913
diff
changeset
|
38 new changesets d2ae7f538514 |
38250
d0abd7949ea3
phases: use "published" in the phase movement message
Boris Feld <boris.feld@octobus.net>
parents:
38249
diff
changeset
|
39 1 local changesets published |
12279 | 40 (run 'hg heads' to see heads, 'hg merge' to merge) |
41 | |
42 $ hg merge | |
43 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
44 (branch merge, don't forget to commit) | |
5318
c6682cdada2f
Test renaming files brought by merge second parent (issue 746)
Patrick Mezard <pmezard@gmail.com>
parents:
diff
changeset
|
45 |
12279 | 46 $ hg st |
47 M b | |
48 | |
49 Rename b as c: | |
5318
c6682cdada2f
Test renaming files brought by merge second parent (issue 746)
Patrick Mezard <pmezard@gmail.com>
parents:
diff
changeset
|
50 |
12279 | 51 $ hg mv b c |
52 $ hg st | |
53 A c | |
54 R b | |
55 | |
56 Rename back c as b: | |
57 | |
58 $ hg mv c b | |
59 $ hg st | |
60 M b | |
61 | |
62 $ cd .. | |
7689
d821ea464465
Fix a corner case when committing a rename after a merge (issue1476)
Patrick Mezard <pmezard@gmail.com>
parents:
5608
diff
changeset
|
63 |
12399
4fee1fd3de9a
tests: added a short description to issue numbers
Martin Geisler <mg@aragost.com>
parents:
12328
diff
changeset
|
64 Issue 1476: renaming a first parent file into another first parent |
4fee1fd3de9a
tests: added a short description to issue numbers
Martin Geisler <mg@aragost.com>
parents:
12328
diff
changeset
|
65 file while none of them belong to the second parent was broken |
12279 | 66 |
67 $ hg init repo1476 | |
68 $ cd repo1476 | |
69 $ echo a > a | |
70 $ hg ci -Am adda | |
71 adding a | |
72 $ echo b1 > b1 | |
73 $ echo b2 > b2 | |
74 $ hg ci -Am changea | |
75 adding b1 | |
76 adding b2 | |
77 $ hg up -C 0 | |
78 0 files updated, 0 files merged, 2 files removed, 0 files unresolved | |
79 $ echo c1 > c1 | |
80 $ echo c2 > c2 | |
81 $ hg ci -Am addcandd | |
82 adding c1 | |
83 adding c2 | |
84 created new head | |
85 | |
86 Merge heads: | |
87 | |
88 $ hg merge | |
89 2 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
90 (branch merge, don't forget to commit) | |
91 | |
92 $ hg mv -Af c1 c2 | |
7689
d821ea464465
Fix a corner case when committing a rename after a merge (issue1476)
Patrick Mezard <pmezard@gmail.com>
parents:
5608
diff
changeset
|
93 |
12279 | 94 Commit issue 1476: |
7689
d821ea464465
Fix a corner case when committing a rename after a merge (issue1476)
Patrick Mezard <pmezard@gmail.com>
parents:
5608
diff
changeset
|
95 |
12279 | 96 $ hg ci -m merge |
7689
d821ea464465
Fix a corner case when committing a rename after a merge (issue1476)
Patrick Mezard <pmezard@gmail.com>
parents:
5608
diff
changeset
|
97 |
12279 | 98 $ hg log -r tip -C -v | grep copies |
99 copies: c2 (c1) | |
100 | |
101 $ hg rollback | |
13446
1e497df514e2
rollback: clarifies the message about the reverted state (issue2628)
Gilles Moris <gilles.moris@free.fr>
parents:
12399
diff
changeset
|
102 repository tip rolled back to revision 2 (undo commit) |
13455
053c042118bc
rollback, i18n: avoid parameterized message
Wagner Bruna <wbruna@softwareexpress.com.br>
parents:
13446
diff
changeset
|
103 working directory now based on revisions 2 and 1 |
12279 | 104 |
105 $ hg up -C . | |
106 2 files updated, 0 files merged, 2 files removed, 0 files unresolved | |
107 | |
108 Merge heads again: | |
109 | |
110 $ hg merge | |
111 2 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
112 (branch merge, don't forget to commit) | |
113 | |
114 $ hg mv -Af b1 b2 | |
115 | |
116 Commit issue 1476 with a rename on the other side: | |
117 | |
118 $ hg ci -m merge | |
119 | |
120 $ hg log -r tip -C -v | grep copies | |
121 copies: b2 (b1) | |
122 | |
44367
9dab3fa64325
copy: add experimental support for marking committed copies
Martin von Zweigbergk <martinvonz@google.com>
parents:
44365
diff
changeset
|
123 Test marking/unmarking copies in merge commit |
44365
7c4b98a4e536
copy: add experimetal support for unmarking committed copies
Martin von Zweigbergk <martinvonz@google.com>
parents:
38250
diff
changeset
|
124 |
7c4b98a4e536
copy: add experimetal support for unmarking committed copies
Martin von Zweigbergk <martinvonz@google.com>
parents:
38250
diff
changeset
|
125 $ hg copy --forget --at-rev . b2 |
44367
9dab3fa64325
copy: add experimental support for marking committed copies
Martin von Zweigbergk <martinvonz@google.com>
parents:
44365
diff
changeset
|
126 abort: cannot mark/unmark copy in merge commit |
45827
8d72e29ad1e0
errors: introduce InputError and use it from commands and cmdutil
Martin von Zweigbergk <martinvonz@google.com>
parents:
44367
diff
changeset
|
127 [10] |
44367
9dab3fa64325
copy: add experimental support for marking committed copies
Martin von Zweigbergk <martinvonz@google.com>
parents:
44365
diff
changeset
|
128 |
9dab3fa64325
copy: add experimental support for marking committed copies
Martin von Zweigbergk <martinvonz@google.com>
parents:
44365
diff
changeset
|
129 $ hg copy --after --at-rev . b1 b2 |
9dab3fa64325
copy: add experimental support for marking committed copies
Martin von Zweigbergk <martinvonz@google.com>
parents:
44365
diff
changeset
|
130 abort: cannot mark/unmark copy in merge commit |
45827
8d72e29ad1e0
errors: introduce InputError and use it from commands and cmdutil
Martin von Zweigbergk <martinvonz@google.com>
parents:
44367
diff
changeset
|
131 [10] |
44365
7c4b98a4e536
copy: add experimetal support for unmarking committed copies
Martin von Zweigbergk <martinvonz@google.com>
parents:
38250
diff
changeset
|
132 |
16913
f2719b387380
tests: add missing trailing 'cd ..'
Mads Kiilerich <mads@kiilerich.com>
parents:
13455
diff
changeset
|
133 $ cd .. |