#2069: Information on improving P4 object
------------------------+---------------------------------
Reporter: johnwbyrd | Owner:
Type: enhancement | Status: new
Priority: trivial | Milestone: undecided
Version: 0.8.4p2 | Keywords: perforce changes p4
------------------------+---------------------------------
I don't think that this is a "bug" per se -- it's more of information on
how I worked around a behavior.
When using Perforce, it is often useful to be able to specify the current
branch to the build environment on the target. There are commands like
"p4 changes" that report changes on an existing branch.
At least on my Buildbot, I haven't been able to figure out a way to do
that with the existing P4 architecture. The following object works around
this behavior, and provides a new object that records the current working
branch as a property p4branch.
class P4RememberBranch(P4):
""" P4RememberBranch is a class for accessing perforce revision
control and recording the working branch. """
name = "P4RememberBranch"
def __init__(self, **kwargs):
P4.__init__(self, **kwargs)
self.p4branch = self.p4base + self.branch + r'/'
def startVC(self, branch, revision, patch):
self.build.setProperty('p4branch', self.p4branch,
"Source")
P4.startVC( self, branch, revision, patch )
--
Ticket URL: <http://trac.buildbot.net/ticket/2069>
Buildbot <http://buildbot.net/>
Buildbot: build/test automation
------------------------------------------------------------------------------
BlackBerry® DevCon Americas, Oct. 18-20, San Francisco, CA
The must-attend event for mobile developers. Connect with experts.
Get tools for creating Super Apps. See the latest technologies.
Sessions, hands-on labs, demos & much more. Register early & save!
http://p.sf.net/sfu/rim-blackberry-1
_______________________________________________
Buildbot-commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/buildbot-commits