frej / fast-export

A mercurial to git converter using git-fast-import
http://repo.or.cz/w/fast-export.git
808 stars 255 forks source link

Add tag filtering in plugins #331

Open LuluDavid opened 4 months ago

LuluDavid commented 4 months ago

Hi,
Thanks for this useful tool, I am writing this issue because I wanted to suggest an improvement.
I already wrote a plugin to escape branch names according to my conventions in commit messages, and I wanted to know if it would be possible to add an additional dedicated function in plugins to process tags in export_tags ?
This would allow me to do the same escape in there for forbidden characters.
Thanks for reading, hope it is clear enough.

frej commented 4 months ago

Feel free to create a PR, I would be positive to adding such a plugin method. It should follow the same pattern as commit_message_filter in that the mapping file is considered first and the mapped name is given to the plugin.

An alternative external solution would be to just write a small tool that just filters the output from hg branches in order to create a mapping file.