hg plugin - option to ignore revs with only changes to .hgtags?

hg tag is peculiar in that it creates a new rev - but that rev is by definition not an "interesting" rev for build purposes, as no code actually changed. It would be great if it was possible to configure a mercurial vcs root to:

  • ignore revs that affect .hgtags only (don't make them trigger a build)
  • if the tip of the branch is a .hgtags rev, don't update to it, instead update to the latest non .hgtags rev.

This would avoid unnecessary rebuilds and also questions about why the changeset detected by the build does not match the changeset in the tag.

2 comments

Christian,

I am not an expert in Mercurial, but
>    * ignore revs that affect .hgtags only (don't make them trigger a build)

You can try to use VCS trigger rules to limit the build triggering.
Also, there is an issue on this.

>    * if the tip of the branch is a .hgtags rev, don't update to it, instead update to the latest non .hgtags rev.

Not sure this is a good solution since as far as I understand it can affect working with tags, which may be important for a particular build script.

0

Thanks for the VCS rule thing. I can have the build script re-update as needed if tip is just a tags change, but needed the VCS trigger rule to avoid unnecessary rebuilds.

Granted, other shops may have good reasons to view a tags change as legit, but my reason for ignoring a tags change is simply because we include the change set id into the build info of the constructed binaries. If we allowed a tag to trigger a change, then there would be confusion between a build that supposedly should be building the tagged rev, but includes the change set id not of the rev the tag refers to, but of the rev of the .hgtags file.

0

Please sign in to leave a comment.