Mercurial > hg > mercurial-crew-with-dirclash
annotate tests/test-merge7.out @ 5210:90d9ec0dc69d
merge: forcefully mark files that we get from the second parent as dirty
After a hg merge, we want to include in the commit all the files that we
got from the second parent, so that we have the correct file-level
history. To make them visible to hg commit, we try to mark them as dirty.
Unfortunately, right now we can't really mark them as dirty[1] - the
best we can do is to mark them as needing a full comparison of their
contents, but they will still be considered clean if they happen to be
identical to the version in the first parent.
This changeset extends the dirstate format in a compatible way, so that
we can mark a file as dirty:
Right now we use a negative file size to indicate we don't have valid
stat data for this entry. In practice, this size is always -1.
This patch uses -2 to indicate that the entry is dirty. Older versions
of hg won't choke on this dirstate, but they may happily mark the file
as clean after a full comparison, destroying all of our hard work.
The patch adds a dirstate.normallookup method with the semantics of the
current normaldirty, and changes normaldirty to forcefully mark the
entry as dirty.
This should fix issue522.
[1] - well, we could put them in state 'm', but that state has a
different meaning.
author | Alexis S. L. Carvalho <alexis@cecm.usp.br> |
---|---|
date | Thu, 23 Aug 2007 01:48:29 -0300 |
parents | 93a4e72b4f83 |
children | 17ed9b9a0d03 |
rev | line source |
---|---|
2175
b2ae81a7df29
Make hg update more verbose by default (issue12)
Thomas Arendsen Hein <thomas@intevation.de>
parents:
2019
diff
changeset
|
1 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
1352
bf6c91cb816f
Make test-merge7 repeatable
Matt Mackall <mpm@selenic.com>
parents:
1351
diff
changeset
|
2 pulling from ../test-a |
1351
0e2be889ccd7
Repair ancestor logic, fix up test cases
Matt Mackall <mpm@selenic.com>
parents:
diff
changeset
|
3 searching for changes |
0e2be889ccd7
Repair ancestor logic, fix up test cases
Matt Mackall <mpm@selenic.com>
parents:
diff
changeset
|
4 adding changesets |
0e2be889ccd7
Repair ancestor logic, fix up test cases
Matt Mackall <mpm@selenic.com>
parents:
diff
changeset
|
5 adding manifests |
0e2be889ccd7
Repair ancestor logic, fix up test cases
Matt Mackall <mpm@selenic.com>
parents:
diff
changeset
|
6 adding file changes |
0e2be889ccd7
Repair ancestor logic, fix up test cases
Matt Mackall <mpm@selenic.com>
parents:
diff
changeset
|
7 added 1 changesets with 1 changes to 1 files (+1 heads) |
2019
ced2d3620f95
add merge command. means same thing as "update -m".
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
1933
diff
changeset
|
8 (run 'hg heads' to see heads, 'hg merge' to merge) |
4361
46280c004f22
change tests to use simplemerge by default
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
3320
diff
changeset
|
9 warning: conflicts during merge. |
1351
0e2be889ccd7
Repair ancestor logic, fix up test cases
Matt Mackall <mpm@selenic.com>
parents:
diff
changeset
|
10 merging test.txt |
0e2be889ccd7
Repair ancestor logic, fix up test cases
Matt Mackall <mpm@selenic.com>
parents:
diff
changeset
|
11 merging test.txt failed! |
2175
b2ae81a7df29
Make hg update more verbose by default (issue12)
Thomas Arendsen Hein <thomas@intevation.de>
parents:
2019
diff
changeset
|
12 0 files updated, 0 files merged, 0 files removed, 1 files unresolved |
b2ae81a7df29
Make hg update more verbose by default (issue12)
Thomas Arendsen Hein <thomas@intevation.de>
parents:
2019
diff
changeset
|
13 There are unresolved merges, you can redo the full merge using: |
b2ae81a7df29
Make hg update more verbose by default (issue12)
Thomas Arendsen Hein <thomas@intevation.de>
parents:
2019
diff
changeset
|
14 hg update -C 1 |
b2ae81a7df29
Make hg update more verbose by default (issue12)
Thomas Arendsen Hein <thomas@intevation.de>
parents:
2019
diff
changeset
|
15 hg merge 2 |
1352
bf6c91cb816f
Make test-merge7 repeatable
Matt Mackall <mpm@selenic.com>
parents:
1351
diff
changeset
|
16 pulling from ../test-a |
1351
0e2be889ccd7
Repair ancestor logic, fix up test cases
Matt Mackall <mpm@selenic.com>
parents:
diff
changeset
|
17 searching for changes |
0e2be889ccd7
Repair ancestor logic, fix up test cases
Matt Mackall <mpm@selenic.com>
parents:
diff
changeset
|
18 adding changesets |
0e2be889ccd7
Repair ancestor logic, fix up test cases
Matt Mackall <mpm@selenic.com>
parents:
diff
changeset
|
19 adding manifests |
0e2be889ccd7
Repair ancestor logic, fix up test cases
Matt Mackall <mpm@selenic.com>
parents:
diff
changeset
|
20 adding file changes |
0e2be889ccd7
Repair ancestor logic, fix up test cases
Matt Mackall <mpm@selenic.com>
parents:
diff
changeset
|
21 added 1 changesets with 1 changes to 1 files (+1 heads) |
2019
ced2d3620f95
add merge command. means same thing as "update -m".
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
1933
diff
changeset
|
22 (run 'hg heads' to see heads, 'hg merge' to merge) |
4361
46280c004f22
change tests to use simplemerge by default
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
3320
diff
changeset
|
23 warning: conflicts during merge. |
1351
0e2be889ccd7
Repair ancestor logic, fix up test cases
Matt Mackall <mpm@selenic.com>
parents:
diff
changeset
|
24 resolving manifests |
3320 | 25 overwrite None partial False |
26 ancestor faaea63e63a9 local 451c744aabcc+ remote a070d41e8360 | |
3122
2ef0b3aae186
merge: simplify actions with helper function
Matt Mackall <mpm@selenic.com>
parents:
3111
diff
changeset
|
27 test.txt: versions differ -> m |
1351
0e2be889ccd7
Repair ancestor logic, fix up test cases
Matt Mackall <mpm@selenic.com>
parents:
diff
changeset
|
28 merging test.txt |
3320 | 29 my test.txt@451c744aabcc+ other test.txt@a070d41e8360 ancestor test.txt@faaea63e63a9 |
1351
0e2be889ccd7
Repair ancestor logic, fix up test cases
Matt Mackall <mpm@selenic.com>
parents:
diff
changeset
|
30 merging test.txt failed! |
1922
6d50d6189269
ui: output the number of file updated/merged/removed/... on update
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents:
1352
diff
changeset
|
31 0 files updated, 0 files merged, 0 files removed, 1 files unresolved |
2175
b2ae81a7df29
Make hg update more verbose by default (issue12)
Thomas Arendsen Hein <thomas@intevation.de>
parents:
2019
diff
changeset
|
32 There are unresolved merges, you can redo the full merge using: |
b2ae81a7df29
Make hg update more verbose by default (issue12)
Thomas Arendsen Hein <thomas@intevation.de>
parents:
2019
diff
changeset
|
33 hg update -C 3 |
b2ae81a7df29
Make hg update more verbose by default (issue12)
Thomas Arendsen Hein <thomas@intevation.de>
parents:
2019
diff
changeset
|
34 hg merge 4 |
1351
0e2be889ccd7
Repair ancestor logic, fix up test cases
Matt Mackall <mpm@selenic.com>
parents:
diff
changeset
|
35 one |
4385
93a4e72b4f83
run-tests.py: pass -L/--label to simplemerge
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
4361
diff
changeset
|
36 <<<<<<< my |
1351
0e2be889ccd7
Repair ancestor logic, fix up test cases
Matt Mackall <mpm@selenic.com>
parents:
diff
changeset
|
37 two-point-five |
0e2be889ccd7
Repair ancestor logic, fix up test cases
Matt Mackall <mpm@selenic.com>
parents:
diff
changeset
|
38 ======= |
0e2be889ccd7
Repair ancestor logic, fix up test cases
Matt Mackall <mpm@selenic.com>
parents:
diff
changeset
|
39 two-point-one |
4385
93a4e72b4f83
run-tests.py: pass -L/--label to simplemerge
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
4361
diff
changeset
|
40 >>>>>>> other |
1351
0e2be889ccd7
Repair ancestor logic, fix up test cases
Matt Mackall <mpm@selenic.com>
parents:
diff
changeset
|
41 three |
0e2be889ccd7
Repair ancestor logic, fix up test cases
Matt Mackall <mpm@selenic.com>
parents:
diff
changeset
|
42 rev offset length base linkrev nodeid p1 p2 |
0e2be889ccd7
Repair ancestor logic, fix up test cases
Matt Mackall <mpm@selenic.com>
parents:
diff
changeset
|
43 0 0 7 0 0 01365c4cca56 000000000000 000000000000 |
0e2be889ccd7
Repair ancestor logic, fix up test cases
Matt Mackall <mpm@selenic.com>
parents:
diff
changeset
|
44 1 7 9 1 1 7b013192566a 01365c4cca56 000000000000 |
0e2be889ccd7
Repair ancestor logic, fix up test cases
Matt Mackall <mpm@selenic.com>
parents:
diff
changeset
|
45 2 16 15 2 2 8fe46a3eb557 01365c4cca56 000000000000 |
0e2be889ccd7
Repair ancestor logic, fix up test cases
Matt Mackall <mpm@selenic.com>
parents:
diff
changeset
|
46 3 31 27 2 3 fc3148072371 7b013192566a 8fe46a3eb557 |
0e2be889ccd7
Repair ancestor logic, fix up test cases
Matt Mackall <mpm@selenic.com>
parents:
diff
changeset
|
47 4 58 25 4 4 d40249267ae3 8fe46a3eb557 000000000000 |
1933
7544700fd931
Use 'hg ci -d "1000000 0"' in tests to circumvent problem with leading zero.
Thomas Arendsen Hein <thomas@intevation.de>
parents:
1922
diff
changeset
|
48 changeset: 4:a070d41e8360 |
1351
0e2be889ccd7
Repair ancestor logic, fix up test cases
Matt Mackall <mpm@selenic.com>
parents:
diff
changeset
|
49 tag: tip |
1933
7544700fd931
Use 'hg ci -d "1000000 0"' in tests to circumvent problem with leading zero.
Thomas Arendsen Hein <thomas@intevation.de>
parents:
1922
diff
changeset
|
50 parent: 2:faaea63e63a9 |
1351
0e2be889ccd7
Repair ancestor logic, fix up test cases
Matt Mackall <mpm@selenic.com>
parents:
diff
changeset
|
51 user: test |
1933
7544700fd931
Use 'hg ci -d "1000000 0"' in tests to circumvent problem with leading zero.
Thomas Arendsen Hein <thomas@intevation.de>
parents:
1922
diff
changeset
|
52 date: Mon Jan 12 13:46:40 1970 +0000 |
1351
0e2be889ccd7
Repair ancestor logic, fix up test cases
Matt Mackall <mpm@selenic.com>
parents:
diff
changeset
|
53 summary: two -> two-point-one |
0e2be889ccd7
Repair ancestor logic, fix up test cases
Matt Mackall <mpm@selenic.com>
parents:
diff
changeset
|
54 |
1933
7544700fd931
Use 'hg ci -d "1000000 0"' in tests to circumvent problem with leading zero.
Thomas Arendsen Hein <thomas@intevation.de>
parents:
1922
diff
changeset
|
55 changeset: 3:451c744aabcc |
7544700fd931
Use 'hg ci -d "1000000 0"' in tests to circumvent problem with leading zero.
Thomas Arendsen Hein <thomas@intevation.de>
parents:
1922
diff
changeset
|
56 parent: 1:e409be6afcc0 |
7544700fd931
Use 'hg ci -d "1000000 0"' in tests to circumvent problem with leading zero.
Thomas Arendsen Hein <thomas@intevation.de>
parents:
1922
diff
changeset
|
57 parent: 2:faaea63e63a9 |
1351
0e2be889ccd7
Repair ancestor logic, fix up test cases
Matt Mackall <mpm@selenic.com>
parents:
diff
changeset
|
58 user: test |
1933
7544700fd931
Use 'hg ci -d "1000000 0"' in tests to circumvent problem with leading zero.
Thomas Arendsen Hein <thomas@intevation.de>
parents:
1922
diff
changeset
|
59 date: Mon Jan 12 13:46:40 1970 +0000 |
1351
0e2be889ccd7
Repair ancestor logic, fix up test cases
Matt Mackall <mpm@selenic.com>
parents:
diff
changeset
|
60 summary: Merge 1 |
0e2be889ccd7
Repair ancestor logic, fix up test cases
Matt Mackall <mpm@selenic.com>
parents:
diff
changeset
|
61 |
1933
7544700fd931
Use 'hg ci -d "1000000 0"' in tests to circumvent problem with leading zero.
Thomas Arendsen Hein <thomas@intevation.de>
parents:
1922
diff
changeset
|
62 changeset: 2:faaea63e63a9 |
7544700fd931
Use 'hg ci -d "1000000 0"' in tests to circumvent problem with leading zero.
Thomas Arendsen Hein <thomas@intevation.de>
parents:
1922
diff
changeset
|
63 parent: 0:095c92b91f1a |
1351
0e2be889ccd7
Repair ancestor logic, fix up test cases
Matt Mackall <mpm@selenic.com>
parents:
diff
changeset
|
64 user: test |
1933
7544700fd931
Use 'hg ci -d "1000000 0"' in tests to circumvent problem with leading zero.
Thomas Arendsen Hein <thomas@intevation.de>
parents:
1922
diff
changeset
|
65 date: Mon Jan 12 13:46:40 1970 +0000 |
1351
0e2be889ccd7
Repair ancestor logic, fix up test cases
Matt Mackall <mpm@selenic.com>
parents:
diff
changeset
|
66 summary: Numbers as words |
0e2be889ccd7
Repair ancestor logic, fix up test cases
Matt Mackall <mpm@selenic.com>
parents:
diff
changeset
|
67 |
1933
7544700fd931
Use 'hg ci -d "1000000 0"' in tests to circumvent problem with leading zero.
Thomas Arendsen Hein <thomas@intevation.de>
parents:
1922
diff
changeset
|
68 changeset: 1:e409be6afcc0 |
1351
0e2be889ccd7
Repair ancestor logic, fix up test cases
Matt Mackall <mpm@selenic.com>
parents:
diff
changeset
|
69 user: test |
1933
7544700fd931
Use 'hg ci -d "1000000 0"' in tests to circumvent problem with leading zero.
Thomas Arendsen Hein <thomas@intevation.de>
parents:
1922
diff
changeset
|
70 date: Mon Jan 12 13:46:40 1970 +0000 |
1351
0e2be889ccd7
Repair ancestor logic, fix up test cases
Matt Mackall <mpm@selenic.com>
parents:
diff
changeset
|
71 summary: 2 -> 2.5 |
0e2be889ccd7
Repair ancestor logic, fix up test cases
Matt Mackall <mpm@selenic.com>
parents:
diff
changeset
|
72 |
1933
7544700fd931
Use 'hg ci -d "1000000 0"' in tests to circumvent problem with leading zero.
Thomas Arendsen Hein <thomas@intevation.de>
parents:
1922
diff
changeset
|
73 changeset: 0:095c92b91f1a |
1351
0e2be889ccd7
Repair ancestor logic, fix up test cases
Matt Mackall <mpm@selenic.com>
parents:
diff
changeset
|
74 user: test |
1933
7544700fd931
Use 'hg ci -d "1000000 0"' in tests to circumvent problem with leading zero.
Thomas Arendsen Hein <thomas@intevation.de>
parents:
1922
diff
changeset
|
75 date: Mon Jan 12 13:46:40 1970 +0000 |
1351
0e2be889ccd7
Repair ancestor logic, fix up test cases
Matt Mackall <mpm@selenic.com>
parents:
diff
changeset
|
76 summary: Initial |
0e2be889ccd7
Repair ancestor logic, fix up test cases
Matt Mackall <mpm@selenic.com>
parents:
diff
changeset
|
77 |