hgext/narrow/narrowmerge.py
changeset 36165 53fe5a1a92bd
parent 36079 a2a6e724d61a
child 36472 d0d5eef57fb0
equal deleted inserted replaced
36164:c38e9248f531 36165:53fe5a1a92bd
    26             return actions, diverge, renamedelete
    26             return actions, diverge, renamedelete
    27 
    27 
    28         nooptypes = set(['k']) # TODO: handle with nonconflicttypes
    28         nooptypes = set(['k']) # TODO: handle with nonconflicttypes
    29         nonconflicttypes = set('a am c cm f g r e'.split())
    29         nonconflicttypes = set('a am c cm f g r e'.split())
    30         narrowmatch = repo.narrowmatch()
    30         narrowmatch = repo.narrowmatch()
    31         for f, action in actions.items():
    31         # We mutate the items in the dict during iteration, so iterate
       
    32         # over a copy.
       
    33         for f, action in list(actions.items()):
    32             if narrowmatch(f):
    34             if narrowmatch(f):
    33                 pass
    35                 pass
    34             elif not branchmerge:
    36             elif not branchmerge:
    35                 del actions[f] # just updating, ignore changes outside clone
    37                 del actions[f] # just updating, ignore changes outside clone
    36             elif action[0] in nooptypes:
    38             elif action[0] in nooptypes: