Show More
@@ -19,7 +19,7 b' from mercurial import (' | |||||
19 | cmdutil, |
|
19 | cmdutil, | |
20 | error, |
|
20 | error, | |
21 | hg, |
|
21 | hg, | |
22 |
match as match |
|
22 | match as matchmod, | |
23 | pathutil, |
|
23 | pathutil, | |
24 | registrar, |
|
24 | registrar, | |
25 | revset, |
|
25 | revset, | |
@@ -113,13 +113,13 b' def addlargefiles(ui, repo, isaddremove,' | |||||
113 | if lfutil.islfilesrepo(repo): |
|
113 | if lfutil.islfilesrepo(repo): | |
114 | lfpats = ui.configlist(lfutil.longname, 'patterns', default=[]) |
|
114 | lfpats = ui.configlist(lfutil.longname, 'patterns', default=[]) | |
115 | if lfpats: |
|
115 | if lfpats: | |
116 |
lfmatcher = match |
|
116 | lfmatcher = matchmod.match(repo.root, '', list(lfpats)) | |
117 |
|
117 | |||
118 | lfnames = [] |
|
118 | lfnames = [] | |
119 | m = matcher |
|
119 | m = matcher | |
120 |
|
120 | |||
121 | wctx = repo[None] |
|
121 | wctx = repo[None] | |
122 |
for f in repo.walk(match |
|
122 | for f in repo.walk(matchmod.badmatch(m, lambda x, y: None)): | |
123 | exact = m.exact(f) |
|
123 | exact = m.exact(f) | |
124 | lfile = lfutil.standin(f) in wctx |
|
124 | lfile = lfutil.standin(f) in wctx | |
125 | nfile = f in wctx |
|
125 | nfile = f in wctx | |
@@ -321,7 +321,7 b' def overridelog(orig, ui, repo, *pats, *' | |||||
321 | if pat.startswith('set:'): |
|
321 | if pat.startswith('set:'): | |
322 | return pat |
|
322 | return pat | |
323 |
|
323 | |||
324 |
kindpat = match |
|
324 | kindpat = matchmod._patsplit(pat, None) | |
325 |
|
325 | |||
326 | if kindpat[0] is not None: |
|
326 | if kindpat[0] is not None: | |
327 | return kindpat[0] + ':' + tostandin(kindpat[1]) |
|
327 | return kindpat[0] + ':' + tostandin(kindpat[1]) | |
@@ -640,7 +640,7 b' def overridecopy(orig, ui, repo, pats, o' | |||||
640 | # The patterns were previously mangled to add the standin |
|
640 | # The patterns were previously mangled to add the standin | |
641 | # directory; we need to remove that now |
|
641 | # directory; we need to remove that now | |
642 | for pat in pats: |
|
642 | for pat in pats: | |
643 |
if match |
|
643 | if matchmod.patkind(pat) is None and lfutil.shortname in pat: | |
644 | newpats.append(pat.replace(lfutil.shortname, '')) |
|
644 | newpats.append(pat.replace(lfutil.shortname, '')) | |
645 | else: |
|
645 | else: | |
646 | newpats.append(pat) |
|
646 | newpats.append(pat) | |
@@ -658,7 +658,7 b' def overridecopy(orig, ui, repo, pats, o' | |||||
658 | oldmatch = installmatchfn(overridematch) |
|
658 | oldmatch = installmatchfn(overridematch) | |
659 | listpats = [] |
|
659 | listpats = [] | |
660 | for pat in pats: |
|
660 | for pat in pats: | |
661 |
if match |
|
661 | if matchmod.patkind(pat) is not None: | |
662 | listpats.append(pat) |
|
662 | listpats.append(pat) | |
663 | else: |
|
663 | else: | |
664 | listpats.append(makestandin(pat)) |
|
664 | listpats.append(makestandin(pat)) | |
@@ -991,7 +991,7 b' def overridearchive(orig, repo, dest, no' | |||||
991 | if subrepos: |
|
991 | if subrepos: | |
992 | for subpath in sorted(ctx.substate): |
|
992 | for subpath in sorted(ctx.substate): | |
993 | sub = ctx.workingsub(subpath) |
|
993 | sub = ctx.workingsub(subpath) | |
994 |
submatch = match |
|
994 | submatch = matchmod.subdirmatcher(subpath, matchfn) | |
995 | sub._repo.lfstatus = True |
|
995 | sub._repo.lfstatus = True | |
996 | sub.archive(archiver, prefix, submatch) |
|
996 | sub.archive(archiver, prefix, submatch) | |
997 |
|
997 | |||
@@ -1039,7 +1039,7 b' def hgsubrepoarchive(orig, repo, archive' | |||||
1039 |
|
1039 | |||
1040 | for subpath in sorted(ctx.substate): |
|
1040 | for subpath in sorted(ctx.substate): | |
1041 | sub = ctx.workingsub(subpath) |
|
1041 | sub = ctx.workingsub(subpath) | |
1042 |
submatch = match |
|
1042 | submatch = matchmod.subdirmatcher(subpath, match) | |
1043 | sub._repo.lfstatus = True |
|
1043 | sub._repo.lfstatus = True | |
1044 | sub.archive(archiver, prefix + repo._path + '/', submatch) |
|
1044 | sub.archive(archiver, prefix + repo._path + '/', submatch) | |
1045 |
|
1045 | |||
@@ -1204,7 +1204,7 b' def scmutiladdremove(orig, repo, matcher' | |||||
1204 | return orig(repo, matcher, prefix, opts, dry_run, similarity) |
|
1204 | return orig(repo, matcher, prefix, opts, dry_run, similarity) | |
1205 | # Get the list of missing largefiles so we can remove them |
|
1205 | # Get the list of missing largefiles so we can remove them | |
1206 | lfdirstate = lfutil.openlfdirstate(repo.ui, repo) |
|
1206 | lfdirstate = lfutil.openlfdirstate(repo.ui, repo) | |
1207 |
unsure, s = lfdirstate.status(match |
|
1207 | unsure, s = lfdirstate.status(matchmod.always(repo.root, repo.getcwd()), [], | |
1208 | False, False, False) |
|
1208 | False, False, False) | |
1209 |
|
1209 | |||
1210 | # Call into the normal remove code, but the removing of the standin, we want |
|
1210 | # Call into the normal remove code, but the removing of the standin, we want | |
@@ -1389,7 +1389,7 b' def mergeupdate(orig, repo, node, branch' | |||||
1389 | # (*1) deprecated, but used internally (e.g: "rebase --collapse") |
|
1389 | # (*1) deprecated, but used internally (e.g: "rebase --collapse") | |
1390 |
|
1390 | |||
1391 | lfdirstate = lfutil.openlfdirstate(repo.ui, repo) |
|
1391 | lfdirstate = lfutil.openlfdirstate(repo.ui, repo) | |
1392 |
unsure, s = lfdirstate.status(match |
|
1392 | unsure, s = lfdirstate.status(matchmod.always(repo.root, | |
1393 | repo.getcwd()), |
|
1393 | repo.getcwd()), | |
1394 | [], False, False, False) |
|
1394 | [], False, False, False) | |
1395 | pctx = repo['.'] |
|
1395 | pctx = repo['.'] |
General Comments 0
You need to be logged in to leave comments.
Login now