开发者

Is there a clean way to remove a svn tag in Hudson

Recently, we tagged a build through Hudson, but shortly afterward a bug was found that necessitated a rebuild. We ended up deleting the tag in subversion, but Hudson still showed the tag on that build. I found the following in \jobs\\builds\\build.xml

<hudson.scm.SubversionTagAction>
  <build class="build" reference="../../.."/>
  <tags class="hudson.util.CopyOnWriteMap$Tree">
    <开发者_如何学Gono-comparator/>
    <entry>
      <hudson.scm.SubversionSCM_-SvnInfo>
        <url>...url here...</url>
        <revision>34859</revision>
      </hudson.scm.SubversionSCM_-SvnInfo>
      <list>
        <string>...tag url here...</string>
      </list>
    </entry>
  </tags>
</hudson.scm.SubversionTagAction>

I replaced

<list>
    <string>...tag url here...</string>
</list>

with

<list/>

and this got rid of the tag.

My questions:

  1. Is there a cleaner way to remove the tag annotation from a Hudson build than manually editing the build.xml?
  2. Is there a way to completely remove the tag from Hudson/SVN through the Hudson interface? It would be nice to have an "undo" button to complement the "tag now" button.


We ended up deleting the tag in subversion, but Hudson still showed the tag on that build. I found the following in \jobs\builds\build.xml

The way I understand it, everything inside [hudson]/jobs/[jobname]/builds is strictly historical data about past builds. To my knowledge, it doesn't ever get updated after the build has been done and "archived". You can for example delete everything under the builds directory and that won't affect future builds of the job in any way.

  1. Probably not. But is it absolutely necessary to have it edited?
  2. As you can execute any arbitrary commands from Hudson, you could certainly (and quite easily) create a Hudson job that e.g. deletes an SVN tag. (You could, for example, make the job parameterisable so that it takes the tag name as parameter.)

Hope this helps and hope I didn't misunderstand what you were trying to do...

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜