Debian Codegraph @

tests/test-double-merge.t

raw
1 $ hg init repo
2 $ cd repo
3
4 $ echo line 1 > foo
5 $ hg ci -qAm 'add foo'
6
7 copy foo to bar and change both files
8 $ hg cp foo bar
9 $ echo line 2-1 >> foo
10 $ echo line 2-2 >> bar
11 $ hg ci -m 'cp foo bar; change both'
12
13 in another branch, change foo in a way that doesn't conflict with
14 the other changes
15 $ hg up -qC 0
16 $ echo line 0 > foo
17 $ hg cat foo >> foo
18 $ hg ci -m 'change foo'
19 created new head
20
21 we get conflicts that shouldn't be there
22 $ hg merge -P
23 changeset: 1:484bf6903104
24 user: test
25 date: Thu Jan 01 00:00:00 1970 +0000
26 summary: cp foo bar; change both
27
28 $ hg merge --debug
29 unmatched files in other:
30 bar
31 all copies found (* = to merge, ! = divergent, % = renamed and deleted):
32 on remote side:
33 src: 'foo' -> dst: 'bar' *
34 checking for directory renames
35 resolving manifests
36 branchmerge: True, force: False, partial: False
37 ancestor: e6dc8efe11cc, local: 6a0df1dad128+, remote: 484bf6903104
38 starting 4 threads for background file closing (?)
39 preserving foo for resolve of bar
40 preserving foo for resolve of foo
41 bar: remote copied from foo -> m
42 picked tool ':merge' for bar (binary False symlink False changedelete False)
43 merging foo and bar to bar
44 my bar@6a0df1dad128+ other bar@484bf6903104 ancestor foo@e6dc8efe11cc
45 premerge successful
46 foo: versions differ -> m
47 picked tool ':merge' for foo (binary False symlink False changedelete False)
48 merging foo
49 my foo@6a0df1dad128+ other foo@484bf6903104 ancestor foo@e6dc8efe11cc
50 premerge successful
51 0 files updated, 2 files merged, 0 files removed, 0 files unresolved
52 (branch merge, don't forget to commit)
53
54 contents of foo
55 $ cat foo
56 line 0
57 line 1
58 line 2-1
59
60 contents of bar
61 $ cat bar
62 line 0
63 line 1
64 line 2-2
65
66 $ cd ..