From 20c22a31104bf15f752f0c8d18a6f9879b048b3f Mon Sep 17 00:00:00 2001 From: SirIntellegence Date: Fri, 19 Feb 2021 13:23:49 -0700 Subject: [PATCH] Add plugin support for the 'extra' field Permits plugins to import other information such as svn conversion revisions --- README.md | 2 +- hg-fast-export.py | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 61822e7..35bacbe 100644 --- a/README.md +++ b/README.md @@ -167,7 +167,7 @@ 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'} +commit_data = {'branch': branch, 'parents': parents, 'author': author, 'desc': desc, 'revision': revision, 'hg_hash': hg_hash, 'committer': 'committer', 'extra': extra} def commit_message_filter(self,commit_data): ``` diff --git a/hg-fast-export.py b/hg-fast-export.py index 7c22d81..a4ced10 100755 --- a/hg-fast-export.py +++ b/hg-fast-export.py @@ -294,7 +294,7 @@ def export_commit(ui,repo,revision,old_marks,max,count,authors, brmap[name]=n return n - (revnode,_,user,(time,timezone),files,desc,branch,_)=get_changeset(ui,repo,revision,authors,encoding) + (revnode,_,user,(time,timezone),files,desc,branch,extra)=get_changeset(ui,repo,revision,authors,encoding) if repo[revnode].hidden(): return count @@ -308,7 +308,7 @@ def export_commit(ui,repo,revision,old_marks,max,count,authors, commit_data = {'branch': branch, 'parents': parents, 'author': author, 'desc': desc, 'revision': revision, 'hg_hash': hg_hash, - 'committer': user} + 'committer': user, 'extra': extra} for filter in plugins['commit_message_filters']: filter(commit_data) branch = commit_data['branch']