[Buildbot-commits] [Buildbot] #2676: [nine] be consistent - addXxx or newXxx?

Buildbot trac trac at buildbot.net
Tue Jan 21 23:41:04 UTC 2014


#2676: [nine] be consistent - addXxx or newXxx?
------------------------+-------------------
Reporter:  dustin       |      Owner:
    Type:  enhancement  |     Status:  new
Priority:  minor        |  Milestone:  0.9.0
 Version:               |   Keywords:
------------------------+-------------------
 I've been pretty inconsistent in the new interfaces in Buildbot nine as to
 whether a method to create a new thing is called newXxx or addXxx.  This
 applies both in the DB API and the Data API.  In fact, in some case the
 two are different for the same method:

 {{{
 #!python
     @base.updateMethod
     @defer.inlineCallbacks
     def newLog(self, stepid, name, type):
         slug = name
         while True:
             try:
                 logid = yield self.master.db.logs.addLog(
                     stepid=stepid, name=name, slug=slug, type=type)
             except KeyError:
                 slug = identifiers.incrementIdentifier(50, slug)
                 continue
             self.generateEvent(logid, "new")
             defer.returnValue(logid)
 }}}

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


More information about the Commits mailing list