##// END OF EJS Templates
filemerge: split internal merge into api entry point and internal helper...
Erik Huelsmann -
r26070:e1596621 default
parent child Browse files
Show More
@@ -227,15 +227,12 b' def _premerge(repo, toolconf, files, lab'
227 util.copyfile(back, a) # restore from backup and try again
227 util.copyfile(back, a) # restore from backup and try again
228 return 1 # continue merging
228 return 1 # continue merging
229
229
230 @internaltool('merge', True,
230 def _merge(repo, mynode, orig, fcd, fco, fca, toolconf, files, labels, mode):
231 _("merging %s incomplete! "
232 "(edit conflicts, then use 'hg resolve --mark')\n"))
233 def _imerge(repo, mynode, orig, fcd, fco, fca, toolconf, files, labels=None):
234 """
231 """
235 Uses the internal non-interactive simple merge algorithm for merging
232 Uses the internal non-interactive simple merge algorithm for merging
236 files. It will fail if there are any conflicts and leave markers in
233 files. It will fail if there are any conflicts and leave markers in
237 the partially merged file. Markers will have two sections, one for each side
234 the partially merged file. Markers will have two sections, one for each side
238 of merge."""
235 of merge, unless mode equals 'union' which suppresses the markers."""
239 tool, toolpath, binary, symlink = toolconf
236 tool, toolpath, binary, symlink = toolconf
240 if symlink:
237 if symlink:
241 repo.ui.warn(_('warning: internal :merge cannot merge symlinks '
238 repo.ui.warn(_('warning: internal :merge cannot merge symlinks '
@@ -247,10 +244,22 b' def _imerge(repo, mynode, orig, fcd, fco'
247
244
248 ui = repo.ui
245 ui = repo.ui
249
246
250 r = simplemerge.simplemerge(ui, a, b, c, label=labels)
247 r = simplemerge.simplemerge(ui, a, b, c, label=labels, mode=mode)
251 return True, r
248 return True, r
252 return False, 0
249 return False, 0
253
250
251 @internaltool('merge', True,
252 _("merging %s incomplete! "
253 "(edit conflicts, then use 'hg resolve --mark')\n"))
254 def _imerge(repo, mynode, orig, fcd, fco, fca, toolconf, files, labels=None):
255 """
256 Uses the internal non-interactive simple merge algorithm for merging
257 files. It will fail if there are any conflicts and leave markers in
258 the partially merged file. Markers will have two sections, one for each side
259 of merge."""
260 return _merge(repo, mynode, orig, fcd, fco, fca, toolconf,
261 files, labels, 'merge')
262
254 @internaltool('merge3', True,
263 @internaltool('merge3', True,
255 _("merging %s incomplete! "
264 _("merging %s incomplete! "
256 "(edit conflicts, then use 'hg resolve --mark')\n"))
265 "(edit conflicts, then use 'hg resolve --mark')\n"))
General Comments 0
You need to be logged in to leave comments. Login now