|
# This file is part of Buildbot. Buildbot is free software: you can # redistribute it and/or modify it under the terms of the GNU General Public # License as published by the Free Software Foundation, version 2. # # This program is distributed in the hope that it will be useful, but WITHOUT # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS # FOR A PARTICULAR PURPOSE. See the GNU General Public License for more # details. # # You should have received a copy of the GNU General Public License along with # this program; if not, write to the Free Software Foundation, Inc., 51 # Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. # # Copyright Buildbot Team Members
"""Darcs-specific VC operation. In addition to the arguments handled by SourceBaseCommand, this command reads the following keys:
['repourl'] (required): the Darcs repository string """
# checking out a specific revision requires a full 'darcs get' not self.sourcedirIsPatched() and os.path.isdir(os.path.join(self.builder.basedir, self.srcdir, "_darcs")))
darcs = self.getCommand('darcs') assert not self.revision # update: possible for mode in ('copy', 'update') d = os.path.join(self.builder.basedir, self.srcdir) command = [darcs, 'pull', '--all', '--verbose'] c = runprocess.RunProcess(self.builder, command, d, sendRC=False, timeout=self.timeout, maxTime=self.maxTime, logEnviron=self.logEnviron, usePTY=False) self.command = c return c.start()
# checkout or export '--repo-name', self.srcdir] # write the context to a file n = os.path.join(self.builder.basedir, ".darcs-context") f = open(n, "wb") f.write(self.revision) f.close() # tell Darcs to use that context command.append('--context') command.append(n)
sendRC=False, timeout=self.timeout, maxTime=self.maxTime, logEnviron=self.logEnviron, usePTY=False) d.addCallback(self.removeContextFile, n)
os.unlink(n) return res
# we use 'darcs context' to find out what we wound up with os.path.join(self.builder.basedir, self.srcdir), environ=self.env, timeout=self.timeout, sendStdout=False, sendStderr=False, sendRC=False, keepStdout=True, logEnviron=self.logEnviron, usePTY=False) |