3 # This file is part of the LibreOffice project.
5 # This Source Code Form is subject to the terms of the Mozilla Public
6 # License, v. 2.0. If a copy of the MPL was not distributed with this
7 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
14 Concat these files and compare them with the output of
15 `git ls-tree HEAD -r --name-only` and report files in the git ls-tree that aren't in the first.
22 def get_files_dict_recursively(directory
):
24 for root
, _
, files
in os
.walk(directory
, topdown
=False):
26 basename
= os
.path
.splitext(f
)[0]
27 data
[basename
] = os
.path
.join(root
, f
)
33 for d
in ('workdir/Dep/CObject', 'workdir/Dep/CxxObject'):
34 tmp
= get_files_dict_recursively(d
)
37 gitfiles
= subprocess
.check_output(['git', 'ls-tree', 'HEAD', '-r', '--name-only']).decode('utf-8').split('\n')
40 ext
= os
.path
.splitext(f
)[1]
41 if ext
[1:] in ('c', 'cxx', 'h', 'hxx'):
42 tmp
= os
.path
.basename(f
)
43 tmp
= os
.path
.splitext(tmp
)[0]
47 if __name__
== '__main__':