Mercurial > hg
comparison mercurial/copies.py @ 41936:a791623458ef
copies: remove dependency on scmutil by directly using match.exact()
I want to add a dependency from scmutil.copies(), so I need to remove
this dependency first.
Differential Revision: https://phab.mercurial-scm.org/D6118
author | Martin von Zweigbergk <martinvonz@google.com> |
---|---|
date | Mon, 11 Mar 2019 09:20:26 -0700 |
parents | 7694b685bb10 |
children | 27475ae67676 |
comparison
equal
deleted
inserted
replaced
41935:bf72e4c39f0b | 41936:a791623458ef |
---|---|
15 | 15 |
16 from . import ( | 16 from . import ( |
17 match as matchmod, | 17 match as matchmod, |
18 node, | 18 node, |
19 pathutil, | 19 pathutil, |
20 scmutil, | |
21 util, | 20 util, |
22 ) | 21 ) |
23 from .utils import ( | 22 from .utils import ( |
24 stringutil, | 23 stringutil, |
25 ) | 24 ) |
191 # during a rebase or histedit). Note, we exclude merge commits from this | 190 # during a rebase or histedit). Note, we exclude merge commits from this |
192 # optimization, since the ctx.files() for a merge commit is not correct for | 191 # optimization, since the ctx.files() for a merge commit is not correct for |
193 # this comparison. | 192 # this comparison. |
194 forwardmissingmatch = match | 193 forwardmissingmatch = match |
195 if b.p1() == a and b.p2().node() == node.nullid: | 194 if b.p1() == a and b.p2().node() == node.nullid: |
196 filesmatcher = scmutil.matchfiles(a._repo, b.files()) | 195 filesmatcher = matchmod.exact(b.files()) |
197 forwardmissingmatch = matchmod.intersectmatchers(match, filesmatcher) | 196 forwardmissingmatch = matchmod.intersectmatchers(match, filesmatcher) |
198 missing = _computeforwardmissing(a, b, match=forwardmissingmatch) | 197 missing = _computeforwardmissing(a, b, match=forwardmissingmatch) |
199 | 198 |
200 ancestrycontext = a._repo.changelog.ancestors([b.rev()], inclusive=True) | 199 ancestrycontext = a._repo.changelog.ancestors([b.rev()], inclusive=True) |
201 | 200 |