Show More
@@ -298,10 +298,10 b' def _iother(repo, mynode, orig, fcd, fco' | |||
|
298 | 298 | """Uses the other `p2()` version of files as the merged version.""" |
|
299 | 299 | if fco.isabsent(): |
|
300 | 300 | # local changed, remote deleted -- 'deleted' picked |
|
301 | repo.wvfs.unlinkpath(fcd.path()) | |
|
301 | _underlyingfctxifabsent(fcd).remove() | |
|
302 | 302 | deleted = True |
|
303 | 303 | else: |
|
304 |
|
|
|
304 | _underlyingfctxifabsent(fcd).write(fco.data(), fco.flags()) | |
|
305 | 305 | deleted = False |
|
306 | 306 | return 0, deleted |
|
307 | 307 | |
@@ -313,9 +313,19 b' def _ifail(repo, mynode, orig, fcd, fco,' | |||
|
313 | 313 | used to resolve these conflicts.""" |
|
314 | 314 | # for change/delete conflicts write out the changed version, then fail |
|
315 | 315 | if fcd.isabsent(): |
|
316 |
|
|
|
316 | _underlyingfctxifabsent(fcd).write(fco.data(), fco.flags()) | |
|
317 | 317 | return 1, False |
|
318 | 318 | |
|
319 | def _underlyingfctxifabsent(filectx): | |
|
320 | """Sometimes when resolving, our fcd is actually an absentfilectx, but | |
|
321 | we want to write to it (to do the resolve). This helper returns the | |
|
322 | underyling workingfilectx in that case. | |
|
323 | """ | |
|
324 | if filectx.isabsent(): | |
|
325 | return filectx.changectx()[filectx.path()] | |
|
326 | else: | |
|
327 | return filectx | |
|
328 | ||
|
319 | 329 | def _premerge(repo, fcd, fco, fca, toolconf, files, labels=None): |
|
320 | 330 | tool, toolpath, binary, symlink = toolconf |
|
321 | 331 | if symlink or fcd.isabsent() or fco.isabsent(): |
General Comments 0
You need to be logged in to leave comments.
Login now