scmsubversion.cpp revision 3b91cdad96393c90c3098e2805621136b20ef1e6
4604ab7d38c2bd2dfc255aa1facffdf81c1c9153vboxsync * IPRT Testcase / Tool - Source Code Massager, Subversion Access.
772269936494ffaddd0750ba9e28e805ba81398cvboxsync * Copyright (C) 2010-2012 Oracle Corporation
1c94c0a63ba68be1a7b2c640e70d7a06464e4fcavboxsync * This file is part of VirtualBox Open Source Edition (OSE), as
1c94c0a63ba68be1a7b2c640e70d7a06464e4fcavboxsync * available from http://www.virtualbox.org. This file is free software;
1c94c0a63ba68be1a7b2c640e70d7a06464e4fcavboxsync * you can redistribute it and/or modify it under the terms of the GNU
1c94c0a63ba68be1a7b2c640e70d7a06464e4fcavboxsync * General Public License (GPL) as published by the Free Software
1c94c0a63ba68be1a7b2c640e70d7a06464e4fcavboxsync * Foundation, in version 2 as it comes in the "COPYING" file of the
1c94c0a63ba68be1a7b2c640e70d7a06464e4fcavboxsync * VirtualBox OSE distribution. VirtualBox OSE is distributed in the
1c94c0a63ba68be1a7b2c640e70d7a06464e4fcavboxsync * hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
4604ab7d38c2bd2dfc255aa1facffdf81c1c9153vboxsync/*******************************************************************************
4604ab7d38c2bd2dfc255aa1facffdf81c1c9153vboxsync* Header Files *
4604ab7d38c2bd2dfc255aa1facffdf81c1c9153vboxsync*******************************************************************************/
#include "scm.h"
#ifdef SCM_WITHOUT_LIBSVN
static DECLCALLBACK(int) scmSvnFindSvnBinaryCallback(char const *pchPath, size_t cchPath, void *pvUser1, void *pvUser2)
return VINF_SUCCESS;
return VERR_TRY_AGAIN;
static int rtProcProcessOutput(int rc, PRTPIPE phPipeR, size_t *pcbAllocated, size_t *poffCur, char **ppszBuffer,
return rc;
int RTProcExecToString(const char *pszExec, const char * const *papszArgs, RTENV hEnv, uint32_t fFlags,
int rc2;
if (ppszStdOut)
if (ppszStdErr)
&hProc);
return rc;
int rc;
aph[0],
&hProc);
return rc;
static int scmSvnRunAndGetOutput(PSCMRWSTATE pState, const char **papszArgs, bool fNormalFailureOk, char **ppszStdOut)
return rc;
if (pState)
return rc;
return rc;
return rc;
#ifdef RT_OS_WINDOWS
if (pszEnvVar)
int rc = RTPathTraverseList(pszEnvVar, ';', scmSvnFindSvnBinaryCallback, g_szSvnPath, (void *)sizeof(g_szSvnPath));
int rc = RTPathTraverseList(pszEnvVar, ':', scmSvnFindSvnBinaryCallback, g_szSvnPath, (void *)sizeof(g_szSvnPath));
char *pszVersion;
static int scmSvnConstructName(PSCMRWSTATE pState, const char *pszDir, const char *pszSuff, char *pszDst)
return VINF_SUCCESS;
return rc;
size_t u = 0;
while (cch-- > 0)
*pu = u;
#ifdef SCM_WITHOUT_LIBSVN
const char *apszArgs[] = { g_szSvnPath, "propget", "svn:no-such-property", pState->pszFilename, NULL };
char *pszValue;
#ifdef SCM_WITHOUT_LIBSVN
char *pszValue;
if (!pszValue)
return VERR_NOT_FOUND;
if (ppszValue)
return VINF_SUCCESS;
#ifdef SCM_WITHOUT_LIBSVN
int rc;
const char *pchLine;
|| cchKey == 0
RTMsgError("%s:%u: Unexpected data '%.*s'\n", szPath, ScmStreamTellLine(&Stream), cchLine, pchLine);
if (fMatch)
if (!pchLine)
if (!pchLine)
RTMsgError("%s:%u: Unexpected data '%.*s'\n", szPath, ScmStreamTellLine(&Stream), cchLine, pchLine);
if (fMatch)
if (!ppszValue)
char *pszValue;
const char *apszArgs[] = { g_szSvnPath, "propget", "--strict", pszName, pState->pszFilename, NULL };
char *pszValue;
if (ppszValue)
return rc;
return VERR_NOT_FOUND;
if (!pszValue)
char *pszCopy;
return rc;
return VINF_SUCCESS;
if (!pvNew)
return VERR_NO_MEMORY;
return VERR_NO_MEMORY;
return VINF_SUCCESS;
if (pszValue)
return VINF_SUCCESS;
#ifdef SCM_WITHOUT_LIBSVN
return rc;
return VINF_SUCCESS;
return VERR_NOT_IMPLEMENTED;