equal
deleted
inserted
replaced
2413 fm.data(abspath=f) |
2413 fm.data(abspath=f) |
2414 fm.write('path', fmt, m.rel(f)) |
2414 fm.write('path', fmt, m.rel(f)) |
2415 ret = 0 |
2415 ret = 0 |
2416 |
2416 |
2417 for subpath in sorted(ctx.substate): |
2417 for subpath in sorted(ctx.substate): |
2418 def matchessubrepo(subpath): |
2418 if subrepos or m.matchessubrepo(subpath): |
2419 return (m.exact(subpath) |
|
2420 or any(f.startswith(subpath + '/') for f in m.files())) |
|
2421 |
|
2422 if subrepos or matchessubrepo(subpath): |
|
2423 sub = ctx.sub(subpath) |
2419 sub = ctx.sub(subpath) |
2424 try: |
2420 try: |
2425 submatch = matchmod.subdirmatcher(subpath, m) |
2421 submatch = matchmod.subdirmatcher(subpath, m) |
2426 recurse = m.exact(subpath) or subrepos |
2422 recurse = m.exact(subpath) or subrepos |
2427 if sub.printfiles(ui, submatch, fm, fmt, recurse) == 0: |
2423 if sub.printfiles(ui, submatch, fm, fmt, recurse) == 0: |
2448 |
2444 |
2449 subs = sorted(wctx.substate) |
2445 subs = sorted(wctx.substate) |
2450 total = len(subs) |
2446 total = len(subs) |
2451 count = 0 |
2447 count = 0 |
2452 for subpath in subs: |
2448 for subpath in subs: |
2453 def matchessubrepo(matcher, subpath): |
|
2454 if matcher.exact(subpath): |
|
2455 return True |
|
2456 for f in matcher.files(): |
|
2457 if f.startswith(subpath): |
|
2458 return True |
|
2459 return False |
|
2460 |
|
2461 count += 1 |
2449 count += 1 |
2462 if subrepos or matchessubrepo(m, subpath): |
2450 if subrepos or m.matchessubrepo(subpath): |
2463 ui.progress(_('searching'), count, total=total, unit=_('subrepos')) |
2451 ui.progress(_('searching'), count, total=total, unit=_('subrepos')) |
2464 |
2452 |
2465 sub = wctx.sub(subpath) |
2453 sub = wctx.sub(subpath) |
2466 try: |
2454 try: |
2467 submatch = matchmod.subdirmatcher(subpath, m) |
2455 submatch = matchmod.subdirmatcher(subpath, m) |