mercurial/cmdutil.py
changeset 31134 c22253c4c1b8
parent 31078 a113284f54a0
child 31157 accdd5e62066
equal deleted inserted replaced
31133:23080c03a604 31134:c22253c4c1b8
  2974         unknown  = set(changes.unknown)
  2974         unknown  = set(changes.unknown)
  2975         unknown.update(changes.ignored)
  2975         unknown.update(changes.ignored)
  2976         clean    = set(changes.clean)
  2976         clean    = set(changes.clean)
  2977         modadded = set()
  2977         modadded = set()
  2978 
  2978 
  2979         # split between files known in target manifest and the others
       
  2980         smf = set(mf)
       
  2981 
       
  2982         # determine the exact nature of the deleted changesets
  2979         # determine the exact nature of the deleted changesets
  2983         deladded = _deleted - smf
  2980         deladded = set(_deleted)
       
  2981         for path in _deleted:
       
  2982             if path in mf:
       
  2983                 deladded.remove(path)
  2984         deleted = _deleted - deladded
  2984         deleted = _deleted - deladded
  2985 
  2985 
  2986         # We need to account for the state of the file in the dirstate,
  2986         # We need to account for the state of the file in the dirstate,
  2987         # even when we revert against something else than parent. This will
  2987         # even when we revert against something else than parent. This will
  2988         # slightly alter the behavior of revert (doing back up or not, delete
  2988         # slightly alter the behavior of revert (doing back up or not, delete
  3022             dsadded = added
  3022             dsadded = added
  3023 
  3023 
  3024         # in case of merge, files that are actually added can be reported as
  3024         # in case of merge, files that are actually added can be reported as
  3025         # modified, we need to post process the result
  3025         # modified, we need to post process the result
  3026         if p2 != nullid:
  3026         if p2 != nullid:
  3027             mergeadd = dsmodified - smf
  3027             mergeadd = set(dsmodified)
       
  3028             for path in dsmodified:
       
  3029                 if path in mf:
       
  3030                     mergeadd.remove(path)
  3028             dsadded |= mergeadd
  3031             dsadded |= mergeadd
  3029             dsmodified -= mergeadd
  3032             dsmodified -= mergeadd
  3030 
  3033 
  3031         # if f is a rename, update `names` to also revert the source
  3034         # if f is a rename, update `names` to also revert the source
  3032         cwd = repo.getcwd()
  3035         cwd = repo.getcwd()