def callSubversion(self, workspacePath, *args):
cmdLine = ['svn']
cmdLine.extend(args)
try:
output = subprocess.check_output(cmdLine, cwd=workspacePath,
universal_newlines=True, stderr=subprocess.DEVNULL)
except subprocess.CalledProcessError as e:
raise BuildError("svn error:\n Directory: '{}'\n Command: '{}'\n'{}'".format(
os.path.join(workspacePath, self.__dir), " ".join(cmdLine), e.output.rstrip()))
return output
# Get SvnSCM status. The purpose of this function is to return the status of the given directory
#
# return values:
# - error: the scm is in a error state. Use this if svn call returns a error code.
# - dirty: SCM is dirty. Could be: modified files, switched to another URL or revision
# - clean: same URL and revision as specified in the recipe and no local changes.
# - empty: directory is not existing
#
# This function is called when build with --clean-checkout. 'error' and 'dirty' scm's are moved to attic,
# while empty and clean directories are not.
评论列表
文章目录