Mercurial > hg
annotate tests/test-rename-after-merge.t @ 38679:b3d0c97a0820
rebase: in --confirm option just abort if hit a conflict
Before this patch, it was prompting the user in both cases 1) when
there is no conflict 2) when there is at least one conflict. But
for simplicity we can just abort if we hit a conflict and no need to
prompt in that case.
Differential Revision: https://phab.mercurial-scm.org/D3944
author | Sushil khanchi <sushilkhanchi97@gmail.com> |
---|---|
date | Sat, 14 Jul 2018 08:59:42 +0530 |
parents | d0abd7949ea3 |
children | 7c4b98a4e536 |
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 | |
16913
f2719b387380
tests: add missing trailing 'cd ..'
Mads Kiilerich <mads@kiilerich.com>
parents:
13455
diff
changeset
|
123 $ cd .. |