##// END OF EJS Templates
merge: pass mergeresult obj instead of actions in _filternarrowactions()...
Pulkit Goyal -
r45842:e7196f1d default
parent child Browse files
Show More
@@ -513,7 +513,7 b' def checkpathconflicts(repo, wctx, mctx,'
513 raise error.Abort(_(b"destination manifest contains path conflicts"))
513 raise error.Abort(_(b"destination manifest contains path conflicts"))
514
514
515
515
516 def _filternarrowactions(narrowmatch, branchmerge, actions):
516 def _filternarrowactions(narrowmatch, branchmerge, mresult):
517 """
517 """
518 Filters out actions that can ignored because the repo is narrowed.
518 Filters out actions that can ignored because the repo is narrowed.
519
519
@@ -524,13 +524,13 b' def _filternarrowactions(narrowmatch, br'
524 nonconflicttypes = set(b'a am c cm f g gs r e'.split())
524 nonconflicttypes = set(b'a am c cm f g gs r e'.split())
525 # We mutate the items in the dict during iteration, so iterate
525 # We mutate the items in the dict during iteration, so iterate
526 # over a copy.
526 # over a copy.
527 for f, action in list(actions.items()):
527 for f, action in list(mresult.actions.items()):
528 if narrowmatch(f):
528 if narrowmatch(f):
529 pass
529 pass
530 elif not branchmerge:
530 elif not branchmerge:
531 del actions[f] # just updating, ignore changes outside clone
531 mresult.removefile(f) # just updating, ignore changes outside clone
532 elif action[0] in nooptypes:
532 elif action[0] in nooptypes:
533 del actions[f] # merge does not affect file
533 mresult.removefile(f) # merge does not affect file
534 elif action[0] in nonconflicttypes:
534 elif action[0] in nonconflicttypes:
535 raise error.Abort(
535 raise error.Abort(
536 _(
536 _(
@@ -950,7 +950,7 b' def manifestmerge('
950 narrowmatch = repo.narrowmatch()
950 narrowmatch = repo.narrowmatch()
951 if not narrowmatch.always():
951 if not narrowmatch.always():
952 # Updates "actions" in place
952 # Updates "actions" in place
953 _filternarrowactions(narrowmatch, branchmerge, mresult.actions)
953 _filternarrowactions(narrowmatch, branchmerge, mresult)
954
954
955 renamedelete = branch_copies1.renamedelete
955 renamedelete = branch_copies1.renamedelete
956 renamedelete.update(branch_copies2.renamedelete)
956 renamedelete.update(branch_copies2.renamedelete)
General Comments 0
You need to be logged in to leave comments. Login now