Skip to content

Commit 02e7a14

Browse files
Add --print-file-map option
This causes the script to not perform the operation, but simply print the self._file_map dictionary of files to rename (this is useful for debugging the file-moving logic, especially with combinations of --path and --except options). Signed-off-by: David Horstmann <david.horstmann@arm.com>
1 parent 6afe50f commit 02e7a14

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

tools/bin/mbedtls-move-to-framework

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -284,6 +284,9 @@ def main() -> int:
284284
help='Name of the new branch create in the framework repo')
285285
parser.add_argument('--dst-base-branch', default=None, required=False,
286286
help='Base branch in the framework repo to make changes from')
287+
parser.add_argument('--print-file-map', action='store_true',
288+
help='Don\'t perform the move, just print out'
289+
'the file map created (used for debugging)')
287290
args = parser.parse_args()
288291

289292
file_map = {}
@@ -310,7 +313,11 @@ def main() -> int:
310313
for e in args.file_exceptions:
311314
file_mover.add_exception(e)
312315

313-
file_mover.move_files()
316+
if args.print_file_map:
317+
for k, v in file_mover._file_map.items():
318+
print(f'{k}: {v}')
319+
else:
320+
file_mover.move_files()
314321

315322
return 0
316323

0 commit comments

Comments
 (0)