Bug 1410969 - Properly resolve wildcards in `mach file-info`; r?ahal
I likely regressed this as part of e9416a307987 (
bug 1397406).
Before this change, '*' in filenames didn't work.
MozReview-Commit-ID: 33m83H6UTZ
--- a/python/mozbuild/mozbuild/frontend/mach_commands.py
+++ b/python/mozbuild/mozbuild/frontend/mach_commands.py
@@ -182,17 +182,21 @@ class MozbuildFileCommands(MachCommandBa
if p not in all_paths_set:
all_paths_set.add(p)
allpaths.append(p)
continue
if rev:
raise InvalidPathException('cannot use wildcard in version control mode')
- for path, f in reader.finder.find(p):
+ # finder is rooted at / for now.
+ # TODO bug 1171069 tracks changing to relative.
+ search = mozpath.join(self.topsrcdir, p)[1:]
+ for path, f in reader.finder.find(search):
+ path = path[len(self.topsrcdir):]
if path not in all_paths_set:
all_paths_set.add(path)
allpaths.append(path)
return reader.files_info(allpaths)
@SubCommand('file-info', 'schedules',