Mercurial > hg > mercurial-crew-with-dirclash
annotate tests/test-merge1.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 | 3109f012c305 |
children |
rev | line source |
---|---|
2175
b2ae81a7df29
Make hg update more verbose by default (issue12)
Thomas Arendsen Hein <thomas@intevation.de>
parents:
1995
diff
changeset
|
1 0 files updated, 0 files merged, 1 files removed, 0 files unresolved |
1236
67a28636ea64
Fix bug with co -C across branches, update tests
mpm@selenic.com
parents:
925
diff
changeset
|
2 %% no merges expected |
3407
d2b55e3c4e25
merge: if filemerge skips merge, report as updated
Matt Mackall <mpm@selenic.com>
parents:
3329
diff
changeset
|
3 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
2175
b2ae81a7df29
Make hg update more verbose by default (issue12)
Thomas Arendsen Hein <thomas@intevation.de>
parents:
1995
diff
changeset
|
4 (branch merge, don't forget to commit) |
3328
49966b5ab16f
fix traceback of extdiff after a merge
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents:
3002
diff
changeset
|
5 diff -r d9e5953b9dec b |
49966b5ab16f
fix traceback of extdiff after a merge
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents:
3002
diff
changeset
|
6 --- /dev/null |
49966b5ab16f
fix traceback of extdiff after a merge
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents:
3002
diff
changeset
|
7 +++ b/b |
49966b5ab16f
fix traceback of extdiff after a merge
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents:
3002
diff
changeset
|
8 @@ -0,0 +1,1 @@ |
49966b5ab16f
fix traceback of extdiff after a merge
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents:
3002
diff
changeset
|
9 +This is file b1 |
49966b5ab16f
fix traceback of extdiff after a merge
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents:
3002
diff
changeset
|
10 M b |
2175
b2ae81a7df29
Make hg update more verbose by default (issue12)
Thomas Arendsen Hein <thomas@intevation.de>
parents:
1995
diff
changeset
|
11 0 files updated, 0 files merged, 1 files removed, 0 files unresolved |
1581
db10b7114de0
abort when merging two heads and repository has local changes
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents:
1236
diff
changeset
|
12 %% merge should fail |
3620
3109f012c305
Clarify untracked file merge message
Matt Mackall <mpm@selenic.com>
parents:
3407
diff
changeset
|
13 abort: untracked local file 'b' differs from remote version |
1236
67a28636ea64
Fix bug with co -C across branches, update tests
mpm@selenic.com
parents:
925
diff
changeset
|
14 %% merge of b expected |
407
0e0d0670b2bc
[PATCH] Merging identical changes from another branch
mpm@selenic.com
parents:
diff
changeset
|
15 merging for b |
0e0d0670b2bc
[PATCH] Merging identical changes from another branch
mpm@selenic.com
parents:
diff
changeset
|
16 merging b |
2175
b2ae81a7df29
Make hg update more verbose by default (issue12)
Thomas Arendsen Hein <thomas@intevation.de>
parents:
1995
diff
changeset
|
17 0 files updated, 1 files merged, 0 files removed, 0 files unresolved |
b2ae81a7df29
Make hg update more verbose by default (issue12)
Thomas Arendsen Hein <thomas@intevation.de>
parents:
1995
diff
changeset
|
18 (branch merge, don't forget to commit) |
3328
49966b5ab16f
fix traceback of extdiff after a merge
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents:
3002
diff
changeset
|
19 diff -r d9e5953b9dec b |
49966b5ab16f
fix traceback of extdiff after a merge
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents:
3002
diff
changeset
|
20 --- /dev/null |
49966b5ab16f
fix traceback of extdiff after a merge
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents:
3002
diff
changeset
|
21 +++ b/b |
49966b5ab16f
fix traceback of extdiff after a merge
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents:
3002
diff
changeset
|
22 @@ -0,0 +1,1 @@ |
49966b5ab16f
fix traceback of extdiff after a merge
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents:
3002
diff
changeset
|
23 +This is file b2 |
49966b5ab16f
fix traceback of extdiff after a merge
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents:
3002
diff
changeset
|
24 M b |
1236
67a28636ea64
Fix bug with co -C across branches, update tests
mpm@selenic.com
parents:
925
diff
changeset
|
25 %% |
2175
b2ae81a7df29
Make hg update more verbose by default (issue12)
Thomas Arendsen Hein <thomas@intevation.de>
parents:
1995
diff
changeset
|
26 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
1236
67a28636ea64
Fix bug with co -C across branches, update tests
mpm@selenic.com
parents:
925
diff
changeset
|
27 Contents of b should be "this is file b1" |
430 | 28 This is file b1 |
1581
db10b7114de0
abort when merging two heads and repository has local changes
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents:
1236
diff
changeset
|
29 %% merge fails |
1995
2da2d46862fb
Spelling fix: "commited" -> "committed"
mcmillen@cs.cmu.edu
parents:
1581
diff
changeset
|
30 abort: outstanding uncommitted changes |
1236
67a28636ea64
Fix bug with co -C across branches, update tests
mpm@selenic.com
parents:
925
diff
changeset
|
31 %% merge expected! |
3407
d2b55e3c4e25
merge: if filemerge skips merge, report as updated
Matt Mackall <mpm@selenic.com>
parents:
3329
diff
changeset
|
32 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
2175
b2ae81a7df29
Make hg update more verbose by default (issue12)
Thomas Arendsen Hein <thomas@intevation.de>
parents:
1995
diff
changeset
|
33 (branch merge, don't forget to commit) |
3328
49966b5ab16f
fix traceback of extdiff after a merge
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents:
3002
diff
changeset
|
34 diff -r c1dd73cbf59f b |
49966b5ab16f
fix traceback of extdiff after a merge
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents:
3002
diff
changeset
|
35 --- a/b |
49966b5ab16f
fix traceback of extdiff after a merge
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents:
3002
diff
changeset
|
36 +++ b/b |
49966b5ab16f
fix traceback of extdiff after a merge
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents:
3002
diff
changeset
|
37 @@ -1,1 +1,1 @@ This is file b1 |
49966b5ab16f
fix traceback of extdiff after a merge
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents:
3002
diff
changeset
|
38 -This is file b1 |
49966b5ab16f
fix traceback of extdiff after a merge
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents:
3002
diff
changeset
|
39 +This is file b22 |
49966b5ab16f
fix traceback of extdiff after a merge
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents:
3002
diff
changeset
|
40 M b |
2175
b2ae81a7df29
Make hg update more verbose by default (issue12)
Thomas Arendsen Hein <thomas@intevation.de>
parents:
1995
diff
changeset
|
41 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
1581
db10b7114de0
abort when merging two heads and repository has local changes
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents:
1236
diff
changeset
|
42 %% merge of b should fail |
1995
2da2d46862fb
Spelling fix: "commited" -> "committed"
mcmillen@cs.cmu.edu
parents:
1581
diff
changeset
|
43 abort: outstanding uncommitted changes |
1236
67a28636ea64
Fix bug with co -C across branches, update tests
mpm@selenic.com
parents:
925
diff
changeset
|
44 %% merge of b expected |
407
0e0d0670b2bc
[PATCH] Merging identical changes from another branch
mpm@selenic.com
parents:
diff
changeset
|
45 merging for b |
0e0d0670b2bc
[PATCH] Merging identical changes from another branch
mpm@selenic.com
parents:
diff
changeset
|
46 merging b |
2175
b2ae81a7df29
Make hg update more verbose by default (issue12)
Thomas Arendsen Hein <thomas@intevation.de>
parents:
1995
diff
changeset
|
47 0 files updated, 1 files merged, 0 files removed, 0 files unresolved |
b2ae81a7df29
Make hg update more verbose by default (issue12)
Thomas Arendsen Hein <thomas@intevation.de>
parents:
1995
diff
changeset
|
48 (branch merge, don't forget to commit) |
3328
49966b5ab16f
fix traceback of extdiff after a merge
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents:
3002
diff
changeset
|
49 diff -r c1dd73cbf59f b |
49966b5ab16f
fix traceback of extdiff after a merge
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents:
3002
diff
changeset
|
50 --- a/b |
49966b5ab16f
fix traceback of extdiff after a merge
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents:
3002
diff
changeset
|
51 +++ b/b |
49966b5ab16f
fix traceback of extdiff after a merge
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents:
3002
diff
changeset
|
52 @@ -1,1 +1,1 @@ This is file b1 |
49966b5ab16f
fix traceback of extdiff after a merge
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents:
3002
diff
changeset
|
53 -This is file b1 |
49966b5ab16f
fix traceback of extdiff after a merge
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents:
3002
diff
changeset
|
54 +This is file b33 |
49966b5ab16f
fix traceback of extdiff after a merge
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents:
3002
diff
changeset
|
55 M b |