2

When you do an hg log the output includes tag: tagname for any changeset that has been tagged, and this includes stuff like tip as well as anything you tag manually.

Why isn't this information included in the post by a web hook? While this information could be parsed out of the commit message, I doubt that the message format would be the same for all Hg clients (i.e. Mac, Linux) as the Kiln Client "Added tag XXX for changeset XXX".

What I imagine is that with the tagging information available, I could detect a tag declaring a new version on a Prod repository, and create a database row for it, allowing a starting point for public change history and version management.

flag
I've opened a case for this. – Tyler Hicks-Wright Mar 15 2011 at 17:11

1 Answer

2

Hi David,

Thanks as always for your feedback. It sounds like you're asking for two different but closely related features:

  1. When a changeset in a web hook has a tag (like tip), include the tags in the web hook's changeset record.

  2. When a changeset adds a tag to a changeset, include information about the tagged changeset in the tagging changeset's web hook record.

(1) is easy and reasonable; I've opened a feature request for it and it should be done soon. (2) is somewhat harder to do efficiently and correctly (a single changeset can add multiple tags to multiple changesets). I'll investigate it, but I can't make any promises.

Is one of these features more important or useful to you?

link|flag
#1 is what I was originally thinking because it's the most obvious to think about, and I'm sure that since it's included in the "hg log" output that it will be fairly straightforward to implement. Your comment on #2 gives me pause, however. It would be a useful event to capture, because it says "This tag was created here" but I had not considered that you could commit A,B,C, then push, then tag B, and push - "I tagged B" is the "event" that you want to capture, however revision B is not even in that push! (And therefore wouldn't be in the hook data's changeset list... – David Mar 17 2011 at 0:34
... so I understand and accept that #2 has a lot of challenges. Thinking about it more, I can probably implement similar functionality in my continuous integration process by directly examining the .hgtags file as a build step. – David Mar 17 2011 at 0:39
@David Exactly. As I said, I'll look into implementing option #2, but you'll probably want to have you build server work directly with a clone of your repository. hg log can output a whole slew of different styles, including information about which tags are contained in a set of changesets. See hg help templates and hg help revsets, and feel free to ask any questions you have about it here. – Kevin Gessner Mar 17 2011 at 13:43

Your Answer

Not the answer you're looking for? Browse other questions tagged or ask your own question.