python更新svn

def UpdateSvn(strUser, strPwd, strUpPath):
        strExec = "svn up '%s' --username %s --password %s --no-auth-cache" %(strUpPath, strUser, strPwd);
        print("cmd:%s" %strExec);

        nRet = os.system(strExec);
        print("nRet = %d" %nRet);

        return (0 == nRet);

if "__main__" == __name__:
        bUp = UpdateSvn('user', 'pwd', '/home/root/work_path');

        if bUp:
                print("svn up succ!");
        else:
                print("svn up failed!");
 

你可能感兴趣的:(SVN,python,cache,OS,UP)