mirror of
				https://github.com/frej/fast-export.git
				synced 2025-11-04 02:05:48 +01:00 
			
		
		
		
	Add plugin support for the 'extra' field
Permits plugins to import other information such as svn conversion revisions
This commit is contained in:
		@@ -167,7 +167,7 @@ defined filter methods in the [dos2unix](./plugins/dos2unix) and
 | 
				
			|||||||
[branch_name_in_commit](./plugins/branch_name_in_commit) plugins.
 | 
					[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):
 | 
					def commit_message_filter(self,commit_data):
 | 
				
			||||||
```
 | 
					```
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -294,7 +294,7 @@ def export_commit(ui,repo,revision,old_marks,max,count,authors,
 | 
				
			|||||||
    brmap[name]=n
 | 
					    brmap[name]=n
 | 
				
			||||||
    return 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():
 | 
					  if repo[revnode].hidden():
 | 
				
			||||||
    return count
 | 
					    return count
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@@ -308,7 +308,7 @@ def export_commit(ui,repo,revision,old_marks,max,count,authors,
 | 
				
			|||||||
    commit_data = {'branch': branch, 'parents': parents,
 | 
					    commit_data = {'branch': branch, 'parents': parents,
 | 
				
			||||||
                   'author': author, 'desc': desc,
 | 
					                   'author': author, 'desc': desc,
 | 
				
			||||||
                   'revision': revision, 'hg_hash': hg_hash,
 | 
					                   'revision': revision, 'hg_hash': hg_hash,
 | 
				
			||||||
                   'committer': user}
 | 
					                   'committer': user, 'extra': extra}
 | 
				
			||||||
    for filter in plugins['commit_message_filters']:
 | 
					    for filter in plugins['commit_message_filters']:
 | 
				
			||||||
      filter(commit_data)
 | 
					      filter(commit_data)
 | 
				
			||||||
    branch = commit_data['branch']
 | 
					    branch = commit_data['branch']
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user