Mercurial > public > mercurial-scm > hg
comparison mercurial/cmdutil.py @ 27344:43c00ca887d1
merge: have merge.update use a matcher instead of partial fn
This is relatively rarely used functionality, but migrating this to a
matcher will make future work on narrow clones more feasible.
author | Augie Fackler <augie@google.com> |
---|---|
date | Mon, 14 Dec 2015 18:54:03 -0500 |
parents | 8117e2cd959e |
children | 4eeef1b2d689 |
comparison
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') |