##// END OF EJS Templates
merge.mergestate: compute dirstate action...
Siddharth Agarwal -
r27035:de7bf242 default
parent child Browse files
Show More
@@ -410,7 +410,7 b' class mergestate(object):'
410 410 def _resolve(self, preresolve, dfile, wctx, labels=None):
411 411 """rerun merge process for file path `dfile`"""
412 412 if self[dfile] in 'rd':
413 return True, 0
413 return True, 0, None
414 414 stateentry = self._state[dfile]
415 415 state, hash, lfile, afile, anode, ofile, onode, flags = stateentry
416 416 octx = self._repo[self._other]
@@ -445,19 +445,36 b' class mergestate(object):'
445 445 self._dirty = True
446 446 elif not r:
447 447 self.mark(dfile, 'r')
448 return complete, r
448
449 action = None
450 if complete:
451 if deleted:
452 if not fcd.isabsent():
453 # cd: remote picked (or otherwise deleted)
454 action = 'r'
455 # else: dc: local picked (no action necessary)
456 else:
457 if fcd.isabsent(): # dc: remote picked
458 action = 'g'
459 elif fco.isabsent(): # cd: local picked
460 action = 'a'
461 # else: regular merges (no action necessary)
462
463 return complete, r, action
449 464
450 465 def preresolve(self, dfile, wctx, labels=None):
451 466 """run premerge process for dfile
452 467
453 468 Returns whether the merge is complete, and the exit code."""
454 return self._resolve(True, dfile, wctx, labels=labels)
469 complete, r, action = self._resolve(True, dfile, wctx, labels=labels)
470 return complete, r
455 471
456 472 def resolve(self, dfile, wctx, labels=None):
457 473 """run merge process (assuming premerge was run) for dfile
458 474
459 475 Returns the exit code of the merge."""
460 return self._resolve(False, dfile, wctx, labels=labels)[1]
476 complete, r, action = self._resolve(False, dfile, wctx, labels=labels)
477 return r
461 478
462 479 def _checkunknownfile(repo, wctx, mctx, f, f2=None):
463 480 if f2 is None:
General Comments 0
You need to be logged in to leave comments. Login now