Show More
@@ -2340,14 +2340,15 b' def files(ui, ctx, m, fm, fmt, subrepos)' | |||
|
2340 | 2340 | |
|
2341 | 2341 | for subpath in sorted(ctx.substate): |
|
2342 | 2342 | def matchessubrepo(subpath): |
|
2343 |
return (m. |
|
|
2343 | return (m.exact(subpath) | |
|
2344 | 2344 | or any(f.startswith(subpath + '/') for f in m.files())) |
|
2345 | 2345 | |
|
2346 | 2346 | if subrepos or matchessubrepo(subpath): |
|
2347 | 2347 | sub = ctx.sub(subpath) |
|
2348 | 2348 | try: |
|
2349 | 2349 | submatch = matchmod.narrowmatcher(subpath, m) |
|
2350 | if sub.printfiles(ui, submatch, fm, fmt, subrepos) == 0: | |
|
2350 | recurse = m.exact(subpath) or subrepos | |
|
2351 | if sub.printfiles(ui, submatch, fm, fmt, recurse) == 0: | |
|
2351 | 2352 | ret = 0 |
|
2352 | 2353 | except error.LookupError: |
|
2353 | 2354 | ui.status(_("skipping missing subrepository: %s\n") |
@@ -297,6 +297,12 b' Files sees uncommitted adds and removes ' | |||
|
297 | 297 | sub1/sub2/folder/bar (glob) |
|
298 | 298 | sub1/sub2/x.txt (glob) |
|
299 | 299 | |
|
300 | $ hg files | |
|
301 | .hgsub | |
|
302 | .hgsubstate | |
|
303 | foo/bar/abc (glob) | |
|
304 | main | |
|
305 | ||
|
300 | 306 | $ hg files -S -r '.^' sub1/sub2/folder |
|
301 | 307 | sub1/sub2/folder/test.txt (glob) |
|
302 | 308 |
General Comments 0
You need to be logged in to leave comments.
Login now