##// END OF EJS Templates
merge: refuse update/merge if there are unresolved conflicts (BC)...
Martin von Zweigbergk -
r27316:777f668e default
parent child Browse files
Show More
@@ -1341,8 +1341,12 b' def update(repo, node, branchmerge, forc'
1341 fp1, fp2, xp1, xp2 = p1.node(), p2.node(), str(p1), str(p2)
1341 fp1, fp2, xp1, xp2 = p1.node(), p2.node(), str(p1), str(p2)
1342
1342
1343 ### check phase
1343 ### check phase
1344 if not overwrite and len(pl) > 1:
1344 if not overwrite:
1345 raise error.Abort(_("outstanding uncommitted merge"))
1345 if len(pl) > 1:
1346 raise error.Abort(_("outstanding uncommitted merge"))
1347 ms = mergestate.read(repo)
1348 if list(ms.unresolved()):
1349 raise error.Abort(_("outstanding merge conflicts"))
1346 if branchmerge:
1350 if branchmerge:
1347 if pas == [p2]:
1351 if pas == [p2]:
1348 raise error.Abort(_("merging with a working directory ancestor"
1352 raise error.Abort(_("merging with a working directory ancestor"
@@ -59,6 +59,9 b' Local merge with bad merge tool:'
59 use 'hg resolve' to retry unresolved file merges
59 use 'hg resolve' to retry unresolved file merges
60 [1]
60 [1]
61
61
62 $ hg resolve -m
63 (no more unresolved files)
64
62 $ hg co 0
65 $ hg co 0
63 merging zzz1_merge_ok
66 merging zzz1_merge_ok
64 merging zzz2_merge_bad
67 merging zzz2_merge_bad
@@ -83,6 +86,9 b' Local merge with bad merge tool:'
83
86
84 Local merge with conflicts:
87 Local merge with conflicts:
85
88
89 $ hg resolve -m
90 (no more unresolved files)
91
86 $ hg co
92 $ hg co
87 merging zzz1_merge_ok
93 merging zzz1_merge_ok
88 merging zzz2_merge_bad
94 merging zzz2_merge_bad
@@ -91,6 +97,9 b' Local merge with conflicts:'
91 use 'hg resolve' to retry unresolved file merges
97 use 'hg resolve' to retry unresolved file merges
92 [1]
98 [1]
93
99
100 $ hg resolve -m
101 (no more unresolved files)
102
94 $ hg co 0 --config 'ui.origbackuppath=.hg/origbackups'
103 $ hg co 0 --config 'ui.origbackuppath=.hg/origbackups'
95 merging zzz1_merge_ok
104 merging zzz1_merge_ok
96 merging zzz2_merge_bad
105 merging zzz2_merge_bad
@@ -124,6 +133,9 b' Local merge without conflicts:'
124
133
125 $ hg revert zzz2_merge_bad
134 $ hg revert zzz2_merge_bad
126
135
136 $ hg resolve -m
137 (no more unresolved files)
138
127 $ hg co
139 $ hg co
128 merging zzz1_merge_ok
140 merging zzz1_merge_ok
129 4 files updated, 1 files merged, 2 files removed, 0 files unresolved
141 4 files updated, 1 files merged, 2 files removed, 0 files unresolved
@@ -154,6 +154,26 b' resolve -m should abort when no merge in'
154 abort: resolve command not applicable when not merging
154 abort: resolve command not applicable when not merging
155 [255]
155 [255]
156
156
157 can not update or merge when there are unresolved conflicts
158
159 $ hg up -qC 0
160 $ echo quux >> file1
161 $ hg up 1
162 merging file1
163 warning: conflicts while merging file1! (edit, then use 'hg resolve --mark')
164 1 files updated, 0 files merged, 0 files removed, 1 files unresolved
165 use 'hg resolve' to retry unresolved file merges
166 [1]
167 $ hg up 0
168 abort: outstanding merge conflicts
169 [255]
170 $ hg merge 2
171 abort: outstanding merge conflicts
172 [255]
173 $ hg merge --force 2
174 abort: outstanding merge conflicts
175 [255]
176
157 set up conflict-free merge
177 set up conflict-free merge
158
178
159 $ hg up -qC 3
179 $ hg up -qC 3
General Comments 0
You need to be logged in to leave comments. Login now