mercurial/cmdutil.py
changeset 27344 43c00ca887d1
parent 27216 8117e2cd959e
child 27391 4eeef1b2d689
equal deleted inserted replaced
27343:c59647c6694d 27344:43c00ca887d1
   181 
   181 
   182             [os.unlink(repo.wjoin(c)) for c in newlyaddedandmodifiedfiles]
   182             [os.unlink(repo.wjoin(c)) for c in newlyaddedandmodifiedfiles]
   183             # 3a. apply filtered patch to clean repo  (clean)
   183             # 3a. apply filtered patch to clean repo  (clean)
   184             if backups:
   184             if backups:
   185                 # Equivalent to hg.revert
   185                 # Equivalent to hg.revert
   186                 choices = lambda key: key in backups
   186                 m = scmutil.matchfiles(repo, backups.keys())
   187                 mergemod.update(repo, repo.dirstate.p1(),
   187                 mergemod.update(repo, repo.dirstate.p1(),
   188                         False, True, choices)
   188                         False, True, matcher=m)
   189 
   189 
   190             # 3b. (apply)
   190             # 3b. (apply)
   191             if dopatch:
   191             if dopatch:
   192                 try:
   192                 try:
   193                     ui.debug('applying patch\n')
   193                     ui.debug('applying patch\n')