Show More
@@ -0,0 +1,21 b'' | |||||
|
1 | #!/bin/sh -x | |||
|
2 | ||||
|
3 | mkdir t | |||
|
4 | cd t | |||
|
5 | hg init | |||
|
6 | echo This is file a1 > a | |||
|
7 | echo This is file b1 > b | |||
|
8 | hg add a b | |||
|
9 | hg commit -t "commit #0" -d "0 0" -u user | |||
|
10 | echo This is file b22 > b | |||
|
11 | hg commit -t"comment #1" -d "0 0" -u user | |||
|
12 | hg update 0 | |||
|
13 | rm b | |||
|
14 | hg commit -A -t"comment #2" -d "0 0" -u user | |||
|
15 | # in theory, we shouldn't need the "yes k" below, but it prevents | |||
|
16 | # this test from hanging when "hg update" erroneously prompts the | |||
|
17 | # user for "keep or delete" | |||
|
18 | yes k | hg update 1 | |||
|
19 | # we exit with 0 to avoid the unavoidable SIGPIPE from above causing | |||
|
20 | # us to fail this test | |||
|
21 | exit 0 |
@@ -0,0 +1,18 b'' | |||||
|
1 | + mkdir t | |||
|
2 | + cd t | |||
|
3 | + hg init | |||
|
4 | + echo This is file a1 | |||
|
5 | + echo This is file b1 | |||
|
6 | + hg add a b | |||
|
7 | + hg commit -t 'commit #0' -d '0 0' -u user | |||
|
8 | + echo This is file b22 | |||
|
9 | + hg commit '-tcomment #1' -d '0 0' -u user | |||
|
10 | + hg update 0 | |||
|
11 | + rm b | |||
|
12 | + hg commit -A '-tcomment #2' -d '0 0' -u user | |||
|
13 | + yes k | |||
|
14 | + hg update 1 | |||
|
15 | this update spans a branch affecting the following files: | |||
|
16 | aborting update spanning branches! | |||
|
17 | (use update -m to perform a branch merge) | |||
|
18 | + exit 0 |
@@ -1092,6 +1092,8 b' class localrepository:' | |||||
1092 | del m2[f] |
|
1092 | del m2[f] | |
1093 | elif f in ma: |
|
1093 | elif f in ma: | |
1094 | if not force and n != ma[f]: |
|
1094 | if not force and n != ma[f]: | |
|
1095 | r = "" | |||
|
1096 | if linear_path or allow: | |||
1095 | r = self.ui.prompt( |
|
1097 | r = self.ui.prompt( | |
1096 | (" local changed %s which remote deleted\n" % f) + |
|
1098 | (" local changed %s which remote deleted\n" % f) + | |
1097 | "(k)eep or (d)elete?", "[kd]", "k") |
|
1099 | "(k)eep or (d)elete?", "[kd]", "k") | |
@@ -1113,6 +1115,8 b' class localrepository:' | |||||
1113 | for f, n in m2.iteritems(): |
|
1115 | for f, n in m2.iteritems(): | |
1114 | if f[0] == "/": continue |
|
1116 | if f[0] == "/": continue | |
1115 | if not force and f in ma and n != ma[f]: |
|
1117 | if not force and f in ma and n != ma[f]: | |
|
1118 | r = "" | |||
|
1119 | if linear_path or allow: | |||
1116 | r = self.ui.prompt( |
|
1120 | r = self.ui.prompt( | |
1117 | ("remote changed %s which local deleted\n" % f) + |
|
1121 | ("remote changed %s which local deleted\n" % f) + | |
1118 | "(k)eep or (d)elete?", "[kd]", "k") |
|
1122 | "(k)eep or (d)elete?", "[kd]", "k") |
General Comments 0
You need to be logged in to leave comments.
Login now