当前位置: 首页>>代码示例>>C++>>正文


C++ SVN::GetSVNClientContext方法代码示例

本文整理汇总了C++中SVN::GetSVNClientContext方法的典型用法代码示例。如果您正苦于以下问题:C++ SVN::GetSVNClientContext方法的具体用法?C++ SVN::GetSVNClientContext怎么用?C++ SVN::GetSVNClientContext使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在SVN的用法示例。


在下文中一共展示了SVN::GetSVNClientContext方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: WorkerThread

UINT CSettingsLogCaches::WorkerThread(LPVOID pVoid)
{
    CCrashReportThread crashthread;
    CSettingsLogCaches* dialog = (CSettingsLogCaches*)pVoid;
    InterlockedExchange(&dialog->m_bThreadRunning, TRUE);

    CoInitialize (NULL);

    dialog->DialogEnableWindow(IDC_CACHEUPDATE, false);

    dialog->progress = new CProgressDlg();
    dialog->progress->SetTitle(IDS_SETTINGS_LOGCACHE_UPDATETITLE);
    dialog->progress->SetCancelMsg(IDS_REVGRAPH_PROGCANCEL);
    dialog->progress->SetTime();
    dialog->progress->ShowModeless(dialog->m_hWnd);

    // we have to get the log from the repository root

    SVN svn;
    svn.SetPromptParentWindow(dialog->GetSafeHwnd());
    CLogCachePool* caches = svn.GetLogCachePool();
    CRepositoryInfo& info = caches->GetRepositoryInfo();

    TRepo repo = dialog->GetSelectedRepo();
    CTSVNPath urlpath;
    urlpath.SetFromSVN (repo.first);

    dialog->headRevision = info.GetHeadRevision (repo.second, urlpath);
    dialog->progress->SetProgress (0, dialog->headRevision);

    apr_pool_t *pool = svn_pool_create(NULL);

    try
    {
        CSVNLogQuery svnQuery (svn.GetSVNClientContext(), pool);
        CCacheLogQuery query (caches, &svnQuery);

        query.Log ( CTSVNPathList (urlpath)
                  , dialog->headRevision
                  , dialog->headRevision
                  , SVNRev(0)
                  , 0
                  , false       // strictNodeHistory
                  , dialog
                  , true        // includeChanges
                  , false       // includeMerges
                  , true        // includeStandardRevProps
                  , true        // includeUserRevProps
                  , TRevPropNames());
    }
    catch (SVNError&)
    {
    }

    caches->Flush();
    svn_pool_destroy (pool);

    if (dialog->progress)
    {
        dialog->progress->Stop();
        delete dialog->progress;
        dialog->progress = NULL;
    }

    CoUninitialize();

    dialog->PostMessage (WM_REFRESH_REPOSITORYLIST);

    dialog->DialogEnableWindow(IDC_CACHEUPDATE, true);

    InterlockedExchange(&dialog->m_bThreadRunning, FALSE);
    return 0;
}
开发者ID:TortoiseGit,项目名称:tortoisesvn,代码行数:73,代码来源:SettingsLogCaches.cpp


注:本文中的SVN::GetSVNClientContext方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。