##// END OF EJS Templates
commit: reorder if-else conditional to give mergestate info priority...
Pulkit Goyal -
r47403:39be29fa default draft
parent child Browse files
Show More
@@ -359,19 +359,18 b' def _filecommit('
359 elif fparent1 == nullid:
359 elif fparent1 == nullid:
360 fparent1, fparent2 = fparent2, nullid
360 fparent1, fparent2 = fparent2, nullid
361 elif fparent2 != nullid:
361 elif fparent2 != nullid:
362 # is one parent an ancestor of the other?
362 if (
363 fparentancestors = flog.commonancestorsheads(fparent1, fparent2)
363 ms.active()
364 if fparent1 in fparentancestors:
364 and ms.extras(fname).get(b'filenode-source') == b'other'
365 ):
365 fparent1, fparent2 = fparent2, nullid
366 fparent1, fparent2 = fparent2, nullid
366 elif fparent2 in fparentancestors:
367 # is one parent an ancestor of the other?
367 fparent2 = nullid
368 else:
368 elif not fparentancestors:
369 fparentancestors = flog.commonancestorsheads(fparent1, fparent2)
369 # TODO: this whole if-else might be simplified much more
370 if fparent1 in fparentancestors:
370 if (
371 ms.active()
372 and ms.extras(fname).get(b'filenode-source') == b'other'
373 ):
374 fparent1, fparent2 = fparent2, nullid
371 fparent1, fparent2 = fparent2, nullid
372 elif fparent2 in fparentancestors:
373 fparent2 = nullid
375
374
376 force_new_node = False
375 force_new_node = False
377 # The file might have been deleted by merge code and user explicitly choose
376 # The file might have been deleted by merge code and user explicitly choose
General Comments 0
You need to be logged in to leave comments. Login now