mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-28 07:13:20 +00:00
Bug 1410938 - Split the clang-format calls into batches of 200 files r=gps
MozReview-Commit-ID: 3cH295RBcv3 --HG-- extra : rebase_source : 68765af2185f73820963da052d3aec036358a2e5
This commit is contained in:
parent
38b3c273db
commit
c879ade558
@ -343,18 +343,25 @@ class FormatProvider(MachCommandBase):
|
||||
if path_list == []:
|
||||
return
|
||||
|
||||
args += path_list
|
||||
print("Processing %d file(s)..." % len(path_list))
|
||||
|
||||
batchsize = 200
|
||||
|
||||
for i in range(0, len(path_list), batchsize):
|
||||
l = path_list[i: (i + batchsize)]
|
||||
# Run clang-format on the list
|
||||
cf_process = Popen(args + l)
|
||||
# Wait until the process is over
|
||||
cf_process.communicate()[0]
|
||||
|
||||
# Run clang-format
|
||||
cf_process = Popen(args)
|
||||
if show:
|
||||
# show the diff
|
||||
if self.repository.name == 'hg':
|
||||
cf_process = Popen(["hg", "diff"] + path_list)
|
||||
cf_process = Popen(["hg", "diff"] + paths)
|
||||
else:
|
||||
assert self.repository.name == 'git'
|
||||
cf_process = Popen(["git", "diff"] + path_list)
|
||||
return cf_process.communicate()[0]
|
||||
cf_process = Popen(["git", "diff"] + paths)
|
||||
cf_process.communicate()[0]
|
||||
|
||||
|
||||
def mozregression_import():
|
||||
|
Loading…
Reference in New Issue
Block a user