annotate tests/test-rename-merge1.t @ 13425:0fe36c347c00

bookmarks: forbid \0 \r \n : in bookmark names (BC) We restrict : to 1. make it easer to convert bookmarks to git branches, 2. use : later for a syntax to push a local bookmark to a remote bookmark of a different name. \0, \n, \r are fobbidden they are used to separate bookmarks in the bookmark file. This change breaks backward compatbility as ':' was an allowed character in previous versions.
author David Soria Parra <dsp@php.net>
date Wed, 16 Feb 2011 18:36:45 +0100
parents 62c8f7691bc3
children d100702326d5
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
12298
f254204d8b8d tests: unify test-rename-merge1
Adrian Buehlmann <adrian@cadifra.com>
parents: 8167
diff changeset
1 $ hg init
f254204d8b8d tests: unify test-rename-merge1
Adrian Buehlmann <adrian@cadifra.com>
parents: 8167
diff changeset
2
f254204d8b8d tests: unify test-rename-merge1
Adrian Buehlmann <adrian@cadifra.com>
parents: 8167
diff changeset
3 $ echo "[merge]" >> .hg/hgrc
f254204d8b8d tests: unify test-rename-merge1
Adrian Buehlmann <adrian@cadifra.com>
parents: 8167
diff changeset
4 $ echo "followcopies = 1" >> .hg/hgrc
f254204d8b8d tests: unify test-rename-merge1
Adrian Buehlmann <adrian@cadifra.com>
parents: 8167
diff changeset
5
f254204d8b8d tests: unify test-rename-merge1
Adrian Buehlmann <adrian@cadifra.com>
parents: 8167
diff changeset
6 $ echo foo > a
f254204d8b8d tests: unify test-rename-merge1
Adrian Buehlmann <adrian@cadifra.com>
parents: 8167
diff changeset
7 $ echo foo > a2
f254204d8b8d tests: unify test-rename-merge1
Adrian Buehlmann <adrian@cadifra.com>
parents: 8167
diff changeset
8 $ hg add a a2
f254204d8b8d tests: unify test-rename-merge1
Adrian Buehlmann <adrian@cadifra.com>
parents: 8167
diff changeset
9 $ hg ci -m "start"
f254204d8b8d tests: unify test-rename-merge1
Adrian Buehlmann <adrian@cadifra.com>
parents: 8167
diff changeset
10
f254204d8b8d tests: unify test-rename-merge1
Adrian Buehlmann <adrian@cadifra.com>
parents: 8167
diff changeset
11 $ hg mv a b
f254204d8b8d tests: unify test-rename-merge1
Adrian Buehlmann <adrian@cadifra.com>
parents: 8167
diff changeset
12 $ hg mv a2 b2
f254204d8b8d tests: unify test-rename-merge1
Adrian Buehlmann <adrian@cadifra.com>
parents: 8167
diff changeset
13 $ hg ci -m "rename"
f254204d8b8d tests: unify test-rename-merge1
Adrian Buehlmann <adrian@cadifra.com>
parents: 8167
diff changeset
14
f254204d8b8d tests: unify test-rename-merge1
Adrian Buehlmann <adrian@cadifra.com>
parents: 8167
diff changeset
15 $ hg co 0
f254204d8b8d tests: unify test-rename-merge1
Adrian Buehlmann <adrian@cadifra.com>
parents: 8167
diff changeset
16 2 files updated, 0 files merged, 2 files removed, 0 files unresolved
f254204d8b8d tests: unify test-rename-merge1
Adrian Buehlmann <adrian@cadifra.com>
parents: 8167
diff changeset
17
f254204d8b8d tests: unify test-rename-merge1
Adrian Buehlmann <adrian@cadifra.com>
parents: 8167
diff changeset
18 $ echo blahblah > a
f254204d8b8d tests: unify test-rename-merge1
Adrian Buehlmann <adrian@cadifra.com>
parents: 8167
diff changeset
19 $ echo blahblah > a2
f254204d8b8d tests: unify test-rename-merge1
Adrian Buehlmann <adrian@cadifra.com>
parents: 8167
diff changeset
20 $ hg mv a2 c2
f254204d8b8d tests: unify test-rename-merge1
Adrian Buehlmann <adrian@cadifra.com>
parents: 8167
diff changeset
21 $ hg ci -m "modify"
f254204d8b8d tests: unify test-rename-merge1
Adrian Buehlmann <adrian@cadifra.com>
parents: 8167
diff changeset
22 created new head
3153
c82ea81d6850 Add core copy detection algorithm
Matt Mackall <mpm@selenic.com>
parents:
diff changeset
23
12298
f254204d8b8d tests: unify test-rename-merge1
Adrian Buehlmann <adrian@cadifra.com>
parents: 8167
diff changeset
24 $ hg merge -y --debug
f254204d8b8d tests: unify test-rename-merge1
Adrian Buehlmann <adrian@cadifra.com>
parents: 8167
diff changeset
25 searching for copies back to rev 1
f254204d8b8d tests: unify test-rename-merge1
Adrian Buehlmann <adrian@cadifra.com>
parents: 8167
diff changeset
26 unmatched files in local:
f254204d8b8d tests: unify test-rename-merge1
Adrian Buehlmann <adrian@cadifra.com>
parents: 8167
diff changeset
27 c2
f254204d8b8d tests: unify test-rename-merge1
Adrian Buehlmann <adrian@cadifra.com>
parents: 8167
diff changeset
28 unmatched files in other:
f254204d8b8d tests: unify test-rename-merge1
Adrian Buehlmann <adrian@cadifra.com>
parents: 8167
diff changeset
29 b
f254204d8b8d tests: unify test-rename-merge1
Adrian Buehlmann <adrian@cadifra.com>
parents: 8167
diff changeset
30 b2
f254204d8b8d tests: unify test-rename-merge1
Adrian Buehlmann <adrian@cadifra.com>
parents: 8167
diff changeset
31 all copies found (* = to merge, ! = divergent):
f254204d8b8d tests: unify test-rename-merge1
Adrian Buehlmann <adrian@cadifra.com>
parents: 8167
diff changeset
32 c2 -> a2 !
f254204d8b8d tests: unify test-rename-merge1
Adrian Buehlmann <adrian@cadifra.com>
parents: 8167
diff changeset
33 b -> a *
f254204d8b8d tests: unify test-rename-merge1
Adrian Buehlmann <adrian@cadifra.com>
parents: 8167
diff changeset
34 b2 -> a2 !
f254204d8b8d tests: unify test-rename-merge1
Adrian Buehlmann <adrian@cadifra.com>
parents: 8167
diff changeset
35 checking for directory renames
f254204d8b8d tests: unify test-rename-merge1
Adrian Buehlmann <adrian@cadifra.com>
parents: 8167
diff changeset
36 a2: divergent renames -> dr
f254204d8b8d tests: unify test-rename-merge1
Adrian Buehlmann <adrian@cadifra.com>
parents: 8167
diff changeset
37 resolving manifests
f254204d8b8d tests: unify test-rename-merge1
Adrian Buehlmann <adrian@cadifra.com>
parents: 8167
diff changeset
38 overwrite None partial False
f254204d8b8d tests: unify test-rename-merge1
Adrian Buehlmann <adrian@cadifra.com>
parents: 8167
diff changeset
39 ancestor af1939970a1c local 044f8520aeeb+ remote 85c198ef2f6c
f254204d8b8d tests: unify test-rename-merge1
Adrian Buehlmann <adrian@cadifra.com>
parents: 8167
diff changeset
40 a: remote moved to b -> m
f254204d8b8d tests: unify test-rename-merge1
Adrian Buehlmann <adrian@cadifra.com>
parents: 8167
diff changeset
41 b2: remote created -> g
f254204d8b8d tests: unify test-rename-merge1
Adrian Buehlmann <adrian@cadifra.com>
parents: 8167
diff changeset
42 preserving a for resolve of b
f254204d8b8d tests: unify test-rename-merge1
Adrian Buehlmann <adrian@cadifra.com>
parents: 8167
diff changeset
43 removing a
f254204d8b8d tests: unify test-rename-merge1
Adrian Buehlmann <adrian@cadifra.com>
parents: 8167
diff changeset
44 updating: a 1/3 files (33.33%)
f254204d8b8d tests: unify test-rename-merge1
Adrian Buehlmann <adrian@cadifra.com>
parents: 8167
diff changeset
45 picked tool 'internal:merge' for b (binary False symlink False)
f254204d8b8d tests: unify test-rename-merge1
Adrian Buehlmann <adrian@cadifra.com>
parents: 8167
diff changeset
46 merging a and b to b
f254204d8b8d tests: unify test-rename-merge1
Adrian Buehlmann <adrian@cadifra.com>
parents: 8167
diff changeset
47 my b@044f8520aeeb+ other b@85c198ef2f6c ancestor a@af1939970a1c
f254204d8b8d tests: unify test-rename-merge1
Adrian Buehlmann <adrian@cadifra.com>
parents: 8167
diff changeset
48 premerge successful
f254204d8b8d tests: unify test-rename-merge1
Adrian Buehlmann <adrian@cadifra.com>
parents: 8167
diff changeset
49 updating: a2 2/3 files (66.67%)
12757
62c8f7691bc3 merge: make 'diverging renames' diagnostic a more helpful note.
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 12683
diff changeset
50 note: possible conflict - a2 was renamed multiple times to:
12298
f254204d8b8d tests: unify test-rename-merge1
Adrian Buehlmann <adrian@cadifra.com>
parents: 8167
diff changeset
51 c2
f254204d8b8d tests: unify test-rename-merge1
Adrian Buehlmann <adrian@cadifra.com>
parents: 8167
diff changeset
52 b2
f254204d8b8d tests: unify test-rename-merge1
Adrian Buehlmann <adrian@cadifra.com>
parents: 8167
diff changeset
53 updating: b2 3/3 files (100.00%)
f254204d8b8d tests: unify test-rename-merge1
Adrian Buehlmann <adrian@cadifra.com>
parents: 8167
diff changeset
54 getting b2
f254204d8b8d tests: unify test-rename-merge1
Adrian Buehlmann <adrian@cadifra.com>
parents: 8167
diff changeset
55 1 files updated, 1 files merged, 0 files removed, 0 files unresolved
f254204d8b8d tests: unify test-rename-merge1
Adrian Buehlmann <adrian@cadifra.com>
parents: 8167
diff changeset
56 (branch merge, don't forget to commit)
f254204d8b8d tests: unify test-rename-merge1
Adrian Buehlmann <adrian@cadifra.com>
parents: 8167
diff changeset
57
f254204d8b8d tests: unify test-rename-merge1
Adrian Buehlmann <adrian@cadifra.com>
parents: 8167
diff changeset
58 $ hg status -AC
f254204d8b8d tests: unify test-rename-merge1
Adrian Buehlmann <adrian@cadifra.com>
parents: 8167
diff changeset
59 M b
f254204d8b8d tests: unify test-rename-merge1
Adrian Buehlmann <adrian@cadifra.com>
parents: 8167
diff changeset
60 a
f254204d8b8d tests: unify test-rename-merge1
Adrian Buehlmann <adrian@cadifra.com>
parents: 8167
diff changeset
61 M b2
f254204d8b8d tests: unify test-rename-merge1
Adrian Buehlmann <adrian@cadifra.com>
parents: 8167
diff changeset
62 R a
f254204d8b8d tests: unify test-rename-merge1
Adrian Buehlmann <adrian@cadifra.com>
parents: 8167
diff changeset
63 C c2
f254204d8b8d tests: unify test-rename-merge1
Adrian Buehlmann <adrian@cadifra.com>
parents: 8167
diff changeset
64
f254204d8b8d tests: unify test-rename-merge1
Adrian Buehlmann <adrian@cadifra.com>
parents: 8167
diff changeset
65 $ cat b
f254204d8b8d tests: unify test-rename-merge1
Adrian Buehlmann <adrian@cadifra.com>
parents: 8167
diff changeset
66 blahblah
f254204d8b8d tests: unify test-rename-merge1
Adrian Buehlmann <adrian@cadifra.com>
parents: 8167
diff changeset
67
f254204d8b8d tests: unify test-rename-merge1
Adrian Buehlmann <adrian@cadifra.com>
parents: 8167
diff changeset
68 $ hg ci -m "merge"
f254204d8b8d tests: unify test-rename-merge1
Adrian Buehlmann <adrian@cadifra.com>
parents: 8167
diff changeset
69
f254204d8b8d tests: unify test-rename-merge1
Adrian Buehlmann <adrian@cadifra.com>
parents: 8167
diff changeset
70 $ hg debugindex .hg/store/data/b.i
f254204d8b8d tests: unify test-rename-merge1
Adrian Buehlmann <adrian@cadifra.com>
parents: 8167
diff changeset
71 rev offset length base linkrev nodeid p1 p2
f254204d8b8d tests: unify test-rename-merge1
Adrian Buehlmann <adrian@cadifra.com>
parents: 8167
diff changeset
72 0 0 67 0 1 57eacc201a7f 000000000000 000000000000
f254204d8b8d tests: unify test-rename-merge1
Adrian Buehlmann <adrian@cadifra.com>
parents: 8167
diff changeset
73 1 67 72 1 3 4727ba907962 000000000000 57eacc201a7f
f254204d8b8d tests: unify test-rename-merge1
Adrian Buehlmann <adrian@cadifra.com>
parents: 8167
diff changeset
74
f254204d8b8d tests: unify test-rename-merge1
Adrian Buehlmann <adrian@cadifra.com>
parents: 8167
diff changeset
75 $ hg debugrename b
f254204d8b8d tests: unify test-rename-merge1
Adrian Buehlmann <adrian@cadifra.com>
parents: 8167
diff changeset
76 b renamed from a:dd03b83622e78778b403775d0d074b9ac7387a66
f254204d8b8d tests: unify test-rename-merge1
Adrian Buehlmann <adrian@cadifra.com>
parents: 8167
diff changeset
77
12683
ada47c38f4e5 copies: don't detect copies as "divergent renames"
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 12298
diff changeset
78 This used to trigger a "divergent renames" warning, despite no renames
ada47c38f4e5 copies: don't detect copies as "divergent renames"
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 12298
diff changeset
79
ada47c38f4e5 copies: don't detect copies as "divergent renames"
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 12298
diff changeset
80 $ hg cp b b3
ada47c38f4e5 copies: don't detect copies as "divergent renames"
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 12298
diff changeset
81 $ hg cp b b4
ada47c38f4e5 copies: don't detect copies as "divergent renames"
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 12298
diff changeset
82 $ hg ci -A -m 'copy b twice'
ada47c38f4e5 copies: don't detect copies as "divergent renames"
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 12298
diff changeset
83 $ hg up eb92d88a9712
ada47c38f4e5 copies: don't detect copies as "divergent renames"
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 12298
diff changeset
84 0 files updated, 0 files merged, 2 files removed, 0 files unresolved
ada47c38f4e5 copies: don't detect copies as "divergent renames"
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 12298
diff changeset
85 $ hg up
ada47c38f4e5 copies: don't detect copies as "divergent renames"
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 12298
diff changeset
86 2 files updated, 0 files merged, 0 files removed, 0 files unresolved
ada47c38f4e5 copies: don't detect copies as "divergent renames"
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 12298
diff changeset
87 $ hg rm b3 b4
ada47c38f4e5 copies: don't detect copies as "divergent renames"
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 12298
diff changeset
88 $ hg ci -m 'clean up a bit of our mess'
ada47c38f4e5 copies: don't detect copies as "divergent renames"
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 12298
diff changeset
89
ada47c38f4e5 copies: don't detect copies as "divergent renames"
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 12298
diff changeset
90 We'd rather not warn on divergent renames done in the same changeset (issue2113)
ada47c38f4e5 copies: don't detect copies as "divergent renames"
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 12298
diff changeset
91
ada47c38f4e5 copies: don't detect copies as "divergent renames"
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 12298
diff changeset
92 $ hg cp b b3
ada47c38f4e5 copies: don't detect copies as "divergent renames"
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 12298
diff changeset
93 $ hg mv b b4
ada47c38f4e5 copies: don't detect copies as "divergent renames"
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 12298
diff changeset
94 $ hg ci -A -m 'divergent renames in same changeset'
ada47c38f4e5 copies: don't detect copies as "divergent renames"
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 12298
diff changeset
95 $ hg up c761c6948de0
ada47c38f4e5 copies: don't detect copies as "divergent renames"
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 12298
diff changeset
96 1 files updated, 0 files merged, 2 files removed, 0 files unresolved
ada47c38f4e5 copies: don't detect copies as "divergent renames"
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 12298
diff changeset
97 $ hg up
12757
62c8f7691bc3 merge: make 'diverging renames' diagnostic a more helpful note.
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 12683
diff changeset
98 note: possible conflict - b was renamed multiple times to:
12683
ada47c38f4e5 copies: don't detect copies as "divergent renames"
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 12298
diff changeset
99 b3
ada47c38f4e5 copies: don't detect copies as "divergent renames"
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 12298
diff changeset
100 b4
ada47c38f4e5 copies: don't detect copies as "divergent renames"
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 12298
diff changeset
101 2 files updated, 0 files merged, 1 files removed, 0 files unresolved