##// END OF EJS Templates
merge: rework iteration over mergeresult object in checkpathconflicts()...
Pulkit Goyal -
r45902:150900a1 default
parent child Browse files
Show More
@@ -414,12 +414,13 def checkpathconflicts(repo, wctx, mctx,
414 # The set of files deleted by all the actions.
414 # The set of files deleted by all the actions.
415 deletedfiles = set()
415 deletedfiles = set()
416
416
417 for f, (m, args, msg) in mresult.actions.items():
417 for (f, args, msg) in mresult.getactions(
418 if m in (
418 (
419 mergestatemod.ACTION_CREATED,
419 mergestatemod.ACTION_CREATED,
420 mergestatemod.ACTION_DELETED_CHANGED,
420 mergestatemod.ACTION_DELETED_CHANGED,
421 mergestatemod.ACTION_MERGE,
421 mergestatemod.ACTION_MERGE,
422 mergestatemod.ACTION_CREATED_MERGE,
422 mergestatemod.ACTION_CREATED_MERGE,
423 )
423 ):
424 ):
424 # This action may create a new local file.
425 # This action may create a new local file.
425 createdfiledirs.update(pathutil.finddirs(f))
426 createdfiledirs.update(pathutil.finddirs(f))
@@ -429,13 +430,15 def checkpathconflicts(repo, wctx, mctx,
429 # will be checked once we know what all the deleted files are.
430 # will be checked once we know what all the deleted files are.
430 remoteconflicts.add(f)
431 remoteconflicts.add(f)
431 # Track the names of all deleted files.
432 # Track the names of all deleted files.
432 if m == mergestatemod.ACTION_REMOVE:
433 for (f, args, msg) in mresult.getactions((mergestatemod.ACTION_REMOVE,)):
433 deletedfiles.add(f)
434 deletedfiles.add(f)
434 if m == mergestatemod.ACTION_MERGE:
435 for (f, args, msg) in mresult.getactions((mergestatemod.ACTION_MERGE,)):
435 f1, f2, fa, move, anc = args
436 f1, f2, fa, move, anc = args
436 if move:
437 if move:
437 deletedfiles.add(f1)
438 deletedfiles.add(f1)
438 if m == mergestatemod.ACTION_DIR_RENAME_MOVE_LOCAL:
439 for (f, args, msg) in mresult.getactions(
440 (mergestatemod.ACTION_DIR_RENAME_MOVE_LOCAL,)
441 ):
439 f2, flags = args
442 f2, flags = args
440 deletedfiles.add(f2)
443 deletedfiles.add(f2)
441
444
General Comments 0
You need to be logged in to leave comments. Login now