From 42d1c89e73ef03281e4c107e830ef92513a7cbc9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?K=C3=A9vin=20L=C3=A9vesque?= Date: Mon, 22 Dec 2025 13:52:49 -0500 Subject: [PATCH] Split plugin data example into multiple lines The data example was previously a single line, making it difficult to read. Replaced the one-liner with a multi-line format to improve clarity. --- README.md | 22 ++++++++++++++++++---- 1 file changed, 18 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 6202ac4..8fbf64e 100644 --- a/README.md +++ b/README.md @@ -213,9 +213,18 @@ defined filter methods in the [dos2unix](./plugins/dos2unix) and [branch_name_in_commit](./plugins/branch_name_in_commit) plugins. ``` -commit_data = {'branch': branch, 'parents': parents, 'author': author, 'desc': desc, 'revision': revision, 'hg_hash': hg_hash, 'committer': 'committer', 'extra': extra} +commit_data = { + 'author': author, + 'branch': branch, + 'committer': 'committer', + 'desc': desc, + 'extra': extra, + 'hg_hash': hg_hash, + 'parents': parents, + 'revision': revision, +} -def commit_message_filter(self,commit_data): +def commit_message_filter(self, commit_data): ``` The `commit_message_filter` method is called for each commit, after parsing from hg, but before outputting to git. The dictionary `commit_data` contains the @@ -224,9 +233,14 @@ values in the dictionary after filters have been run are used to create the git commit. ``` -file_data = {'filename':filename,'file_ctx':file_ctx,'data':file_contents, 'is_largefile':largefile_status} +file_data = { + 'data': file_contents, + 'file_ctx': file_ctx, + 'filename': filename, + 'is_largefile': largefile_status, +} -def file_data_filter(self,file_data): +def file_data_filter(self, file_data): ``` The `file_data_filter` method is called for each file within each commit. The dictionary `file_data` contains the above attributes about the file, and