mercurial/cmdutil.py
changeset 28218 41dcd7545266
parent 28195 213c8cf02c49
parent 28192 cb6a952efbf4
child 28286 c7f89ad87bae
equal deleted inserted replaced
28217:d2ac8b57a75d 28218:41dcd7545266
  2848     node = ctx.node()
  2848     node = ctx.node()
  2849 
  2849 
  2850     mf = ctx.manifest()
  2850     mf = ctx.manifest()
  2851     if node == p2:
  2851     if node == p2:
  2852         parent = p2
  2852         parent = p2
  2853     if node == parent:
       
  2854         pmf = mf
       
  2855     else:
       
  2856         pmf = None
       
  2857 
  2853 
  2858     # need all matching names in dirstate and manifest of target rev,
  2854     # need all matching names in dirstate and manifest of target rev,
  2859     # so have to walk both. do not print errors if files exist in one
  2855     # so have to walk both. do not print errors if files exist in one
  2860     # but not other. in both cases, filesets should be evaluated against
  2856     # but not other. in both cases, filesets should be evaluated against
  2861     # workingctx to get consistent result (issue4497). this means 'set:**'
  2857     # workingctx to get consistent result (issue4497). this means 'set:**'
  2966             dsadded = added
  2962             dsadded = added
  2967 
  2963 
  2968         # in case of merge, files that are actually added can be reported as
  2964         # in case of merge, files that are actually added can be reported as
  2969         # modified, we need to post process the result
  2965         # modified, we need to post process the result
  2970         if p2 != nullid:
  2966         if p2 != nullid:
  2971             if pmf is None:
  2967             mergeadd = dsmodified - smf
  2972                 # only need parent manifest in the merge case,
       
  2973                 # so do not read by default
       
  2974                 pmf = repo[parent].manifest()
       
  2975             mergeadd = dsmodified - set(pmf)
       
  2976             dsadded |= mergeadd
  2968             dsadded |= mergeadd
  2977             dsmodified -= mergeadd
  2969             dsmodified -= mergeadd
  2978 
  2970 
  2979         # if f is a rename, update `names` to also revert the source
  2971         # if f is a rename, update `names` to also revert the source
  2980         cwd = repo.getcwd()
  2972         cwd = repo.getcwd()