Show More
@@ -422,14 +422,13 def cachelfiles(ui, repo, node, filelist | |||
|
422 | 422 | return ([], []) |
|
423 | 423 | |
|
424 | 424 | def downloadlfiles(ui, repo, rev=None): |
|
425 |
match |
|
|
426 | [repo.wjoin(lfutil.shortname)], {}) | |
|
425 | match = scmutil.match(repo[None], [repo.wjoin(lfutil.shortname)], {}) | |
|
427 | 426 | def prepare(ctx, fns): |
|
428 | 427 | pass |
|
429 | 428 | totalsuccess = 0 |
|
430 | 429 | totalmissing = 0 |
|
431 | 430 | if rev != []: # walkchangerevs on empty list would return all revs |
|
432 |
for ctx in cmdutil.walkchangerevs(repo, match |
|
|
431 | for ctx in cmdutil.walkchangerevs(repo, match, {'rev' : rev}, | |
|
433 | 432 | prepare): |
|
434 | 433 | success, missing = cachelfiles(ui, repo, ctx.node()) |
|
435 | 434 | totalsuccess += len(success) |
@@ -1664,15 +1664,15 class queue(object): | |||
|
1664 | 1664 | changes = repo.changelog.read(top) |
|
1665 | 1665 | man = repo.manifestlog[changes[0]].read() |
|
1666 | 1666 | aaa = aa[:] |
|
1667 |
match |
|
|
1667 | match1 = scmutil.match(repo[None], pats, opts) | |
|
1668 | 1668 | # in short mode, we only diff the files included in the |
|
1669 | 1669 | # patch already plus specified files |
|
1670 | 1670 | if opts.get('short'): |
|
1671 | 1671 | # if amending a patch, we start with existing |
|
1672 | 1672 | # files plus specified files - unfiltered |
|
1673 |
match = scmutil.matchfiles(repo, mm + aa + dd + match |
|
|
1673 | match = scmutil.matchfiles(repo, mm + aa + dd + match1.files()) | |
|
1674 | 1674 | # filter with include/exclude options |
|
1675 |
match |
|
|
1675 | match1 = scmutil.match(repo[None], opts=opts) | |
|
1676 | 1676 | else: |
|
1677 | 1677 | match = scmutil.matchall(repo) |
|
1678 | 1678 | m, a, r, d = repo.status(match=match)[:4] |
@@ -1713,8 +1713,8 class queue(object): | |||
|
1713 | 1713 | a = list(aa) |
|
1714 | 1714 | |
|
1715 | 1715 | # create 'match' that includes the files to be recommitted. |
|
1716 |
# apply match |
|
|
1717 |
cm, ca, cr, cd = repo.status(patchparent, match=match |
|
|
1716 | # apply match1 via repo.status to ensure correct case handling. | |
|
1717 | cm, ca, cr, cd = repo.status(patchparent, match=match1)[:4] | |
|
1718 | 1718 | allmatches = set(cm + ca + cr + cd) |
|
1719 | 1719 | refreshchanges = [x.intersection(allmatches) for x in (mm, aa, dd)] |
|
1720 | 1720 | |
@@ -1764,7 +1764,7 class queue(object): | |||
|
1764 | 1764 | # file with mtime=0 so status can see it. |
|
1765 | 1765 | mm = [] |
|
1766 | 1766 | for i in xrange(len(m) - 1, -1, -1): |
|
1767 |
if not match |
|
|
1767 | if not match1(m[i]): | |
|
1768 | 1768 | mm.append(m[i]) |
|
1769 | 1769 | del m[i] |
|
1770 | 1770 | for f in m: |
@@ -2001,19 +2001,19 def show_changeset(ui, repo, opts, buffe | |||
|
2001 | 2001 | regular display via changeset_printer() is done. |
|
2002 | 2002 | """ |
|
2003 | 2003 | # options |
|
2004 |
match |
|
|
2004 | match = None | |
|
2005 | 2005 | if opts.get('patch') or opts.get('stat'): |
|
2006 |
match |
|
|
2006 | match = scmutil.matchall(repo) | |
|
2007 | 2007 | |
|
2008 | 2008 | if opts.get('template') == 'json': |
|
2009 |
return jsonchangeset(ui, repo, match |
|
|
2009 | return jsonchangeset(ui, repo, match, opts, buffered) | |
|
2010 | 2010 | |
|
2011 | 2011 | spec = _lookuplogtemplate(ui, opts.get('template'), opts.get('style')) |
|
2012 | 2012 | |
|
2013 | 2013 | if not spec.ref and not spec.tmpl and not spec.mapfile: |
|
2014 |
return changeset_printer(ui, repo, match |
|
|
2015 | ||
|
2016 |
return changeset_templater(ui, repo, spec, match |
|
|
2014 | return changeset_printer(ui, repo, match, opts, buffered) | |
|
2015 | ||
|
2016 | return changeset_templater(ui, repo, spec, match, opts, buffered) | |
|
2017 | 2017 | |
|
2018 | 2018 | def showmarker(fm, marker, index=None): |
|
2019 | 2019 | """utility function to display obsolescence marker in a readable way |
@@ -477,9 +477,9 def archive(ui, repo, dest, **opts): | |||
|
477 | 477 | prefix = os.path.basename(repo.root) + '-%h' |
|
478 | 478 | |
|
479 | 479 | prefix = cmdutil.makefilename(repo, prefix, node) |
|
480 |
match |
|
|
480 | match = scmutil.match(ctx, [], opts) | |
|
481 | 481 | archival.archive(repo, dest, node, kind, not opts.get('no_decode'), |
|
482 |
match |
|
|
482 | match, prefix, subrepos=opts.get('subrepos')) | |
|
483 | 483 | |
|
484 | 484 | @command('backout', |
|
485 | 485 | [('', 'merge', None, _('merge with old dirstate parent after backout')), |
@@ -2489,7 +2489,7 def grep(ui, repo, pattern, *pats, **opt | |||
|
2489 | 2489 | |
|
2490 | 2490 | skip = {} |
|
2491 | 2491 | revfiles = {} |
|
2492 |
match |
|
|
2492 | match = scmutil.match(repo[None], pats, opts) | |
|
2493 | 2493 | found = False |
|
2494 | 2494 | follow = opts.get('follow') |
|
2495 | 2495 | |
@@ -2530,7 +2530,7 def grep(ui, repo, pattern, *pats, **opt | |||
|
2530 | 2530 | |
|
2531 | 2531 | ui.pager('grep') |
|
2532 | 2532 | fm = ui.formatter('grep', opts) |
|
2533 |
for ctx in cmdutil.walkchangerevs(repo, match |
|
|
2533 | for ctx in cmdutil.walkchangerevs(repo, match, opts, prep): | |
|
2534 | 2534 | rev = ctx.rev() |
|
2535 | 2535 | parent = ctx.p1().rev() |
|
2536 | 2536 | for fn in sorted(revfiles.get(rev, [])): |
@@ -1111,13 +1111,13 def archive(web, req, tmpl): | |||
|
1111 | 1111 | |
|
1112 | 1112 | ctx = webutil.changectx(web.repo, req) |
|
1113 | 1113 | pats = [] |
|
1114 |
match |
|
|
1114 | match = scmutil.match(ctx, []) | |
|
1115 | 1115 | file = req.form.get('file', None) |
|
1116 | 1116 | if file: |
|
1117 | 1117 | pats = ['path:' + file[0]] |
|
1118 |
match |
|
|
1118 | match = scmutil.match(ctx, pats, default='path') | |
|
1119 | 1119 | if pats: |
|
1120 |
files = [f for f in ctx.manifest().keys() if match |
|
|
1120 | files = [f for f in ctx.manifest().keys() if match(f)] | |
|
1121 | 1121 | if not files: |
|
1122 | 1122 | raise ErrorResponse(HTTP_NOT_FOUND, |
|
1123 | 1123 | 'file(s) not found: %s' % file[0]) |
@@ -1132,7 +1132,7 def archive(web, req, tmpl): | |||
|
1132 | 1132 | req.respond(HTTP_OK, mimetype) |
|
1133 | 1133 | |
|
1134 | 1134 | archival.archive(web.repo, req, cnode, artype, prefix=name, |
|
1135 |
matchfn=match |
|
|
1135 | matchfn=match, | |
|
1136 | 1136 | subrepos=web.configbool("web", "archivesubrepos")) |
|
1137 | 1137 | return [] |
|
1138 | 1138 |
General Comments 0
You need to be logged in to leave comments.
Login now