##// END OF EJS Templates
merge: allow merging going backwards...
Matt Mackall -
r8742:a964ab62 default
parent child Browse files
Show More
@@ -131,11 +131,14 b' def manifestmerge(repo, p1, p2, pa, over'
131
131
132 m1 = p1.manifest()
132 m1 = p1.manifest()
133 m2 = p2.manifest()
133 m2 = p2.manifest()
134 ma = pa.manifest()
135 backwards = (pa == p2)
134 backwards = (pa == p2)
136
135
137 if backwards or overwrite:
136 if overwrite:
138 ma = m1
137 ma = m1
138 elif backwards:
139 ma = p1.p1().manifest()
140 else:
141 ma = pa.manifest()
139
142
140 action = []
143 action = []
141 copy, copied, diverge = {}, {}, {}
144 copy, copied, diverge = {}, {}, {}
@@ -43,7 +43,7 b' hg cat stuff.txt'
43
43
44 echo '% Fresh checkout:'
44 echo '% Fresh checkout:'
45 rm stuff.txt
45 rm stuff.txt
46 hg up
46 hg up -C
47 cat stuff.txt
47 cat stuff.txt
48 echo >> stuff.txt <<EOF
48 echo >> stuff.txt <<EOF
49 Very very carefully.
49 Very very carefully.
@@ -28,7 +28,7 b' echo %% uncompress our working dir copy'
28 gunzip < a.gz
28 gunzip < a.gz
29
29
30 rm a.gz
30 rm a.gz
31 hg co
31 hg co -C
32
32
33 echo %% uncompress our new working dir copy
33 echo %% uncompress our new working dir copy
34 gunzip < a.gz
34 gunzip < a.gz
@@ -3,6 +3,6 b' 79abf14474dc tip'
3 % make sure we notice the change of mode if the cached size == -1
3 % make sure we notice the change of mode if the cached size == -1
4 n 0 -1 unset a
4 n 0 -1 unset a
5 M a
5 M a
6 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
6 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
7 d69afc33ff8a
7 d69afc33ff8a
8 not executable -- whew
8 not executable -- whew
@@ -117,7 +117,7 b' hg status'
117
117
118 rm sym a b
118 rm sym a b
119 echo % update
119 echo % update
120 hg update
120 hg update -C
121 echo % cat
121 echo % cat
122 cat a b
122 cat a b
123
123
@@ -22,7 +22,9 b' merging zzz2_merge_bad'
22 merging zzz2_merge_bad failed!
22 merging zzz2_merge_bad failed!
23 3 files updated, 1 files merged, 2 files removed, 1 files unresolved
23 3 files updated, 1 files merged, 2 files removed, 1 files unresolved
24 use 'hg resolve' to retry unresolved file merges
24 use 'hg resolve' to retry unresolved file merges
25 2 files updated, 0 files merged, 3 files removed, 0 files unresolved
25 merging zzz1_merge_ok
26 merging zzz2_merge_bad
27 2 files updated, 2 files merged, 3 files removed, 0 files unresolved
26 --- a/zzz1_merge_ok
28 --- a/zzz1_merge_ok
27 +++ b/zzz1_merge_ok
29 +++ b/zzz1_merge_ok
28 +new first line
30 +new first line
@@ -32,7 +34,6 b' 2 files updated, 0 files merged, 3 files'
32 +another last line
34 +another last line
33 M zzz1_merge_ok
35 M zzz1_merge_ok
34 M zzz2_merge_bad
36 M zzz2_merge_bad
35 ? zzz2_merge_bad.orig
36 # local merge with conflicts
37 # local merge with conflicts
37 merging zzz1_merge_ok
38 merging zzz1_merge_ok
38 merging zzz2_merge_bad
39 merging zzz2_merge_bad
@@ -40,7 +41,9 b' warning: conflicts during merge.'
40 merging zzz2_merge_bad failed!
41 merging zzz2_merge_bad failed!
41 3 files updated, 1 files merged, 2 files removed, 1 files unresolved
42 3 files updated, 1 files merged, 2 files removed, 1 files unresolved
42 use 'hg resolve' to retry unresolved file merges
43 use 'hg resolve' to retry unresolved file merges
43 2 files updated, 0 files merged, 3 files removed, 0 files unresolved
44 merging zzz1_merge_ok
45 merging zzz2_merge_bad
46 2 files updated, 2 files merged, 3 files removed, 0 files unresolved
44 --- a/zzz1_merge_ok
47 --- a/zzz1_merge_ok
45 +++ b/zzz1_merge_ok
48 +++ b/zzz1_merge_ok
46 +new first line
49 +new first line
@@ -52,7 +55,6 b' 2 files updated, 0 files merged, 3 files'
52 +new last line
55 +new last line
53 M zzz1_merge_ok
56 M zzz1_merge_ok
54 M zzz2_merge_bad
57 M zzz2_merge_bad
55 ? zzz2_merge_bad.orig
56 # local merge without conflicts
58 # local merge without conflicts
57 merging zzz1_merge_ok
59 merging zzz1_merge_ok
58 4 files updated, 1 files merged, 2 files removed, 0 files unresolved
60 4 files updated, 1 files merged, 2 files removed, 0 files unresolved
@@ -38,9 +38,15 b' summary: 2'
38 resolving manifests
38 resolving manifests
39 overwrite False partial False
39 overwrite False partial False
40 ancestor 33aaa84a386b local 802f095af299+ remote 33aaa84a386b
40 ancestor 33aaa84a386b local 802f095af299+ remote 33aaa84a386b
41 a: versions differ -> m
41 b: other deleted -> r
42 b: other deleted -> r
43 preserving a for resolve of a
42 removing b
44 removing b
43 0 files updated, 0 files merged, 1 files removed, 0 files unresolved
45 picked tool 'true' for a (binary False symlink False)
46 merging a
47 my a@802f095af299+ other a@33aaa84a386b ancestor a@33aaa84a386b
48 premerge successful
49 0 files updated, 1 files merged, 1 files removed, 0 files unresolved
44 changeset: 0:33aaa84a386b
50 changeset: 0:33aaa84a386b
45 user: test
51 user: test
46 date: Mon Jan 12 13:46:40 1970 +0000
52 date: Mon Jan 12 13:46:40 1970 +0000
@@ -117,7 +117,7 b' cat .hg/hgrc'
117 echo
117 echo
118
118
119 rm f3 f4.bat bin
119 rm f3 f4.bat bin
120 hg co 2>&1 | python -c 'import sys, os; sys.stdout.write(sys.stdin.read().replace(os.getcwd(), "...."))'
120 hg co -C 2>&1 | python -c 'import sys, os; sys.stdout.write(sys.stdin.read().replace(os.getcwd(), "...."))'
121 python print.py < bin
121 python print.py < bin
122 python print.py < f3
122 python print.py < f3
123 python print.py < f4.bat
123 python print.py < f4.bat
@@ -152,7 +152,7 b' cat .hg/hgrc'
152 echo
152 echo
153
153
154 rm f3 f4.bat bin
154 rm f3 f4.bat bin
155 hg co 2>&1 | python -c 'import sys, os; sys.stdout.write(sys.stdin.read().replace(os.getcwd(), "...."))'
155 hg co -C 2>&1 | python -c 'import sys, os; sys.stdout.write(sys.stdin.read().replace(os.getcwd(), "...."))'
156 python print.py < bin
156 python print.py < bin
157 python print.py < f3
157 python print.py < f3
158 python print.py < f4.bat
158 python print.py < f4.bat
@@ -314,7 +314,7 b' win32text ='
314 [encode]
314 [encode]
315 ** = !
315 ** = !
316
316
317 3 files updated, 0 files merged, 0 files removed, 0 files unresolved
317 4 files updated, 0 files merged, 0 files removed, 0 files unresolved
318 hello<NUL><CR><LF>
318 hello<NUL><CR><LF>
319 some<LF>text<LF>
319 some<LF>text<LF>
320 rem empty<LF>
320 rem empty<LF>
General Comments 0
You need to be logged in to leave comments. Login now