Opened 8 years ago

Last modified 4 years ago

#998 new enhancement

better handling for tags in changesources

Reported by: chrb Owned by:
Priority: major Milestone: 1.0.+
Version: 0.8.1 Keywords: git, hg, svn, git
Cc: thomas.moschny@…, saintdev@…

Description (last modified by dustin)

git_buildbot.py currently ignores tags ("Ignoring refname `refs/tags/TEST': Not a branch"). We have a build process that generates package versions from tags, so when tags are pushed the packages should be rebuilt. I hacked git_buildbot.py to do this:

        m = re.match(r"^refs/tags/(.+)$", refname)
        if m:
            logging.info("Tag detected: %s"%refname)
            c = {'revision': m.group(1),
                 'comments': 'tag %s'%m.group(1),
                 'branch': m.group(1),
            }
            c['category'] = 'default'
            c['repository'] = unicode(repository, encoding=encoding)
            c['who'] = 'The Tagger'
            c['files'] = ['none']
            changes.append(c)
        else:

Obviously hardcoding "commit" details like this is a poor solution but it works. It would be nice to have proper support for tags in git_buildbot, so that the correct commit details are passed on.

Dupes:

Change History (11)

comment:1 Changed 8 years ago by moschny

Using a fixed string there is indeed ugly, but e.g. annotated tags have an author. For lightweight tags, one could use the commit's author.

comment:2 Changed 8 years ago by moschny

  • Cc thomas.moschny@… added

comment:3 Changed 8 years ago by dustin

  • Milestone changed from undecided to 0.8.2
  • Type changed from undecided to enhancement

This looks like it wouldn't take much work to make it complete. Do you want to fix it up and put a patch on this bug?

comment:4 Changed 8 years ago by dustin

  • Milestone changed from 0.8.2 to 0.8.3

comment:5 Changed 8 years ago by dustin

  • Keywords git added
  • Milestone changed from 0.8.3 to 0.8.+

comment:6 Changed 7 years ago by redheadphones

  • Keywords redheadphones added

comment:7 Changed 7 years ago by redheadphones

  • Keywords redheadphones removed

comment:8 Changed 7 years ago by dustin

  • Keywords hg svn added
  • Summary changed from git_buildbot.py ignores tags to better handling for tags in changesources

I think that we need a better, more general solution to this.

Unfortunately, different VC's handle tags differently -- for Git, they are not a commit, whereas for svn and hg, they are. And in hg, the URL needs to change.

comment:9 Changed 6 years ago by dustin

  • Milestone changed from 0.8.+ to 1.0.+

I think this will need an expansion of the definition of a "change", probably with some kind of top-level "change type" -- new branch, deleted branch, new tag, deleted tag, etc.

comment:10 Changed 6 years ago by dustin

  • Description modified (diff)
  • Keywords changed from git, hg, svn to git, hg, svn, git

comment:11 Changed 4 years ago by saintdev

  • Cc saintdev@… added
Note: See TracTickets for help on using tickets.