Just a small note: Finding the revision introducing a tag is not that simpleā€¦ because:

1) they might be multiple of them
2) merge "introduce" tags without being their first appearance.

So you best bet is probably to walk history of the .hgtags revlogs (which might be what your are suggesting) and compare which tags are being newly introduced (actually, (name, node) pair).

That is probably the "best" you can hope for that.

If you are a repository using some filtering (eg: evolution) it can become trickier since the `linkrev` pointer can point to filtered content, making it useless. In that case you need to walk the normal changelog revision (I would recommende walking up) and apply the same logic when the .hgtags files changed.

I hope this help.

On 1/23/21 2:56 AM, Roy Marples via Mercurial-devel wrote:
Hi List

I'm working on added tag support to the fastexport extension.
I have little idea about the internals of mercurial so asking here for guidance.

My idea is to walk the revisions of .hgtags backwards until I find a changeset which added the tag name.
Once found I can export the user, date and message into the fastexport.

What is the best way of achieving this please?
I am currently looking at the annotate code as that gets what I want, but it's slow going working it all out and would appreciate somem guidance if possible.

Please include me directly in replies as I'm not subbed to this list.
Thanks

Roy
_______________________________________________
Mercurial-devel mailing list
Mercurial-devel@mercurial-scm.org
https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel

--
Pierre-Yves David
_______________________________________________
Mercurial-devel mailing list
Mercurial-devel@mercurial-scm.org
https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel

Reply via email to