Show More
@@ -0,0 +1,46 b'' | |||
|
1 | #!/bin/sh -x | |
|
2 | ||
|
3 | cat <<'EOF' > merge | |
|
4 | #!/bin/sh | |
|
5 | echo merging for `basename $1` | |
|
6 | EOF | |
|
7 | chmod +x merge | |
|
8 | export HGMERGE=./merge | |
|
9 | ||
|
10 | mkdir A1 | |
|
11 | cd A1 | |
|
12 | hg init | |
|
13 | echo This is file foo1 > foo | |
|
14 | echo This is file bar1 > bar | |
|
15 | hg add foo bar | |
|
16 | hg commit -t "commit text" -d "0 0" -u user | |
|
17 | ||
|
18 | cd .. | |
|
19 | hg clone A1 B1 | |
|
20 | ||
|
21 | cd A1 | |
|
22 | rm bar | |
|
23 | hg remove bar | |
|
24 | hg commit -t "commit test" -d "0 0" -u user | |
|
25 | ||
|
26 | cd ../B1 | |
|
27 | echo This is file foo22 > foo | |
|
28 | hg commit -t "commit test" -d "0 0" -u user | |
|
29 | ||
|
30 | cd .. | |
|
31 | hg clone A1 A2 | |
|
32 | hg clone B1 B2 | |
|
33 | ||
|
34 | cd A1 | |
|
35 | hg pull ../B1 | |
|
36 | hg update -m | |
|
37 | hg commit -t "commit test" -d "0 0" -u user | |
|
38 | echo bar should remain deleted. | |
|
39 | hg manifest | |
|
40 | ||
|
41 | cd ../B2 | |
|
42 | hg pull ../A2 | |
|
43 | hg update -m | |
|
44 | hg commit -t "commit test" -d "0 0" -u user | |
|
45 | echo bar should remain deleted. | |
|
46 | hg manifest |
@@ -0,0 +1,53 b'' | |||
|
1 | + cat | |
|
2 | + chmod +x merge | |
|
3 | + export HGMERGE=./merge | |
|
4 | + HGMERGE=./merge | |
|
5 | + mkdir A1 | |
|
6 | + cd A1 | |
|
7 | + hg init | |
|
8 | + echo This is file foo1 | |
|
9 | + echo This is file bar1 | |
|
10 | + hg add foo bar | |
|
11 | + hg commit -t 'commit text' -d '0 0' -u user | |
|
12 | + cd .. | |
|
13 | + hg clone A1 B1 | |
|
14 | + cd A1 | |
|
15 | + rm bar | |
|
16 | + hg remove bar | |
|
17 | + hg commit -t 'commit test' -d '0 0' -u user | |
|
18 | + cd ../B1 | |
|
19 | + echo This is file foo22 | |
|
20 | + hg commit -t 'commit test' -d '0 0' -u user | |
|
21 | + cd .. | |
|
22 | + hg clone A1 A2 | |
|
23 | + hg clone B1 B2 | |
|
24 | + cd A1 | |
|
25 | + hg pull ../B1 | |
|
26 | pulling from ../B1 | |
|
27 | searching for changes | |
|
28 | adding changesets | |
|
29 | adding manifests | |
|
30 | adding file revisions | |
|
31 | modified 1 files, added 1 changesets and 1 new revisions | |
|
32 | (run 'hg update' to get a working copy) | |
|
33 | + hg update -m | |
|
34 | + hg commit -t 'commit test' -d '0 0' -u user | |
|
35 | + echo bar should remain deleted. | |
|
36 | bar should remain deleted. | |
|
37 | + hg manifest | |
|
38 | 6b70e9e451a5a33faad7bbebe627e46b937b7364 644 foo | |
|
39 | + cd ../B2 | |
|
40 | + hg pull ../A2 | |
|
41 | pulling from ../A2 | |
|
42 | searching for changes | |
|
43 | adding changesets | |
|
44 | adding manifests | |
|
45 | adding file revisions | |
|
46 | modified 0 files, added 1 changesets and 0 new revisions | |
|
47 | (run 'hg update' to get a working copy) | |
|
48 | + hg update -m | |
|
49 | + hg commit -t 'commit test' -d '0 0' -u user | |
|
50 | + echo bar should remain deleted. | |
|
51 | bar should remain deleted. | |
|
52 | + hg manifest | |
|
53 | 6b70e9e451a5a33faad7bbebe627e46b937b7364 644 foo |
@@ -1179,9 +1179,9 b' class localrepository:' | |||
|
1179 | 1179 | mark[f] = 1 |
|
1180 | 1180 | del m2[f] |
|
1181 | 1181 | elif f in ma: |
|
1182 |
if |
|
|
1183 | r = "" | |
|
1184 | if linear_path or allow: | |
|
1182 | if n != ma[f]: | |
|
1183 | r = "d" | |
|
1184 | if not force and (linear_path or allow): | |
|
1185 | 1185 | r = self.ui.prompt( |
|
1186 | 1186 | (" local changed %s which remote deleted\n" % f) + |
|
1187 | 1187 | "(k)eep or (d)elete?", "[kd]", "k") |
@@ -1203,16 +1203,18 b' class localrepository:' | |||
|
1203 | 1203 | for f, n in m2.iteritems(): |
|
1204 | 1204 | if choose and not choose(f): continue |
|
1205 | 1205 | if f[0] == "/": continue |
|
1206 |
if |
|
|
1207 | r = "" | |
|
1208 | if linear_path or allow: | |
|
1206 | if f in ma and n != ma[f]: | |
|
1207 | r = "k" | |
|
1208 | if not force and (linear_path or allow): | |
|
1209 | 1209 | r = self.ui.prompt( |
|
1210 | 1210 | ("remote changed %s which local deleted\n" % f) + |
|
1211 | 1211 | "(k)eep or (d)elete?", "[kd]", "k") |
|
1212 |
if r == " |
|
|
1213 |
el |
|
|
1212 | if r == "k": get[f] = n | |
|
1213 | elif f not in ma: | |
|
1214 | 1214 | self.ui.debug("remote created %s\n" % f) |
|
1215 | 1215 | get[f] = n |
|
1216 | else: | |
|
1217 | self.ui.debug("local deleted %s\n" % f) | |
|
1216 | 1218 | |
|
1217 | 1219 | del mw, m1, m2, ma |
|
1218 | 1220 |
General Comments 0
You need to be logged in to leave comments.
Login now