[Buildbot-commits] [Buildbot] #2485: The New Git Source Step Does Not Handle Changes From GerritChangeSource Correctly

Buildbot trac trac at buildbot.net
Fri Apr 12 01:07:01 UTC 2013


#2485: The New Git Source Step Does Not Handle Changes From GerritChangeSource
Correctly
------------------------------------------------+--------------------
Reporter:  jroo                                 |       Owner:
    Type:  defect                               |      Status:  new
Priority:  major                                |   Milestone:  0.8.+
 Version:  0.8.7p1                              |  Resolution:
Keywords:  gerrit git master-side-source-steps  |
------------------------------------------------+--------------------
Changes (by dustin):

 * keywords:  gerrit git => gerrit git master-side-source-steps
 * milestone:  undecided => 0.8.+


Comment:

 There's some code to handle gerrit-specific properties in oldsource.py

 {{{
     def startVC(self, branch, revision, patch):
         self.args['branch'] = branch
         self.args['repourl'] = self.repourl
         self.args['revision'] = revision
         self.args['patch'] = patch

         # check if there is any patchset we should fetch from Gerrit
         if self.build.hasProperty("event.patchSet.ref"):
             # GerritChangeSource
             self.args['gerrit_branch'] =
 self.build.getProperty("event.patchSet.ref")
             self.updateSourceProperty("gerrit_branch",
                     self.args['gerrit_branch'])
         else:
             try:
                 # forced build
                 change = self.build.getProperty("gerrit_change",
 '').split('/')
                 if len(change) == 2:
                     self.args['gerrit_branch'] =
 "refs/changes/%2.2d/%d/%d" \
                                                  % (int(change[0]) % 100,
 int(change[0]), int(change[1]))
                     self.updateSourceProperty("gerrit_branch",
                             self.args['gerrit_branch'])
             except:
                 pass
 }}}

 I'm not sure what the advantage is of supporting this in the Git step
 rather than the Gerrit step.

-- 
Ticket URL: <http://trac.buildbot.net/ticket/2485#comment:1>
Buildbot <http://buildbot.net/>
Buildbot: build/test automation


More information about the Commits mailing list