[Buildbot] #3389: BuildLineMixin incorrectly sets 'rev' if branch is set

Buildbot trac trac at buildbot.net
Mon Dec 14 21:57:50 UTC 2015


#3389: BuildLineMixin incorrectly sets 'rev' if branch is set
---------------------+-----------------------
Reporter:  dburkart  |      Owner:
    Type:  defect    |     Status:  new
Priority:  major     |  Milestone:  undecided
 Version:  0.8.12    |   Keywords:
---------------------+-----------------------
 For non trunk/master builders, the revision is incorrectly displayed, and
 will always just reflect the branch name. This is due to this chunk of
 code:

 {{{
             # show the most descriptive thing we can
             if ss.branch:
                 rev['rev'] = ss.branch
             elif ss.codebase in all_got_revision:
                 rev['rev'] = all_got_revision[ss.codebase]
             elif ss.revision:
                 rev['rev'] = ss.revision
             else:
                 rev['rev'] = '??'
 }}}

 This should be rewritten to prioritize setting rev['rev'] to an actual
 revision:

 {{{
             # show the most descriptive thing we can
             if ss.codebase in all_got_revision:
                 rev['rev'] = all_got_revision[ss.codebase]
             elif ss.revision:
                 rev['rev'] = ss.revision
             elif ss.branch:
                 rev['rev'] = ss.branch
             else:
                 rev['rev'] = '??'
 }}}

 I'll attach a patch.

--
Ticket URL: <http://trac.buildbot.net/ticket/3389>
Buildbot <http://buildbot.net/>
Buildbot: build/test automation


More information about the bugs mailing list