• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

C++ CTSVNPath函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了C++中CTSVNPath函数的典型用法代码示例。如果您正苦于以下问题:C++ CTSVNPath函数的具体用法?C++ CTSVNPath怎么用?C++ CTSVNPath使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。



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

示例1: CTSVNPath

void CRepositoryBrowserSelection::Add (const CItem* item)
{
    if (item == NULL)
        return;

    // extract the info from the list item

    SPath path;
    CString absPath = item->absolutepath;

    absPath.Replace (L"\\", L"%5C");
    path.url = CTSVNPath (absPath);

    // we don't fully escape the urls, because the GetSVNApiPath() method
    // of the CTSVNPath already does escaping.
    // We only escape special chars here:
    // the '%' because we know that this char isn't escaped yet, and
    // the '"' char, because we pass these urls to the command line as well
    absPath.Replace (L"%", L"%25");
    absPath.Replace (L"\"", L"%22");
    path.urlEscaped = CTSVNPath (absPath);

    path.isExternal = item->is_external;
    path.isFolder = item->kind == svn_node_dir;
    path.isLocked = !item->locktoken.IsEmpty();

    // store & accumulate in the corresponding repository bucket

    InternalAdd (item->repository, path);
}
开发者ID:Kasper8660,项目名称:tortoisesvn,代码行数:30,代码来源:RepositoryBrowserSelection.cpp


示例2: AdminDirTest

    void AdminDirTest()
    {
        CTSVNPath testPath;
        testPath.SetFromUnknown(L"c:\\.svndir");
        ATLASSERT(!testPath.IsAdminDir());
        testPath.SetFromUnknown(L"c:\\test.svn");
        ATLASSERT(!testPath.IsAdminDir());
        testPath.SetFromUnknown(L"c:\\.svn");
        ATLASSERT(testPath.IsAdminDir());
        testPath.SetFromUnknown(L"c:\\.svndir\\test");
        ATLASSERT(!testPath.IsAdminDir());
        testPath.SetFromUnknown(L"c:\\.svn\\test");
        ATLASSERT(testPath.IsAdminDir());

        CTSVNPathList pathList;
        pathList.AddPath(CTSVNPath(L"c:\\.svndir"));
        pathList.AddPath(CTSVNPath(L"c:\\.svn"));
        pathList.AddPath(CTSVNPath(L"c:\\.svn\\test"));
        pathList.AddPath(CTSVNPath(L"c:\\test"));
        pathList.RemoveAdminPaths();
        ATLASSERT(pathList.GetCount()==2);
        pathList.Clear();
        pathList.AddPath(CTSVNPath(L"c:\\test"));
        pathList.RemoveAdminPaths();
        ATLASSERT(pathList.GetCount()==1);
    }
开发者ID:yuexiaoyun,项目名称:tortoisesvn,代码行数:26,代码来源:TSVNPath.cpp


示例3: lock

CTSVNPath CDirectoryWatcher::CloseInfoMap(HANDLE hDir)
{
    AutoLocker lock(m_critSec);
    auto d = watchInfoMap.find(hDir);
    if (d != watchInfoMap.end())
    {
        CTSVNPath root = CTSVNPath(CTSVNPath(d->second->m_DirPath).GetRootPathString());
        RemovePathAndChildren(root);
        BlockPath(root);
    }
    CloseWatchHandles();

    CTSVNPath path;
    if (watchInfoMap.empty())
        return path;

    for (TInfoMap::iterator I = watchInfoMap.begin(); I != watchInfoMap.end(); ++I)
    {
        CDirectoryWatcher::CDirWatchInfo * info = I->second;

        ScheduleForDeletion (info);
    }
    watchInfoMap.clear();

    return path;
}
开发者ID:fatterbetter,项目名称:ZTools,代码行数:26,代码来源:DirectoryWatcher.cpp


示例4: UpdateData

void CEditPropExternalsValue::OnBnClickedShowLog()
{
    UpdateData(TRUE);
    if (::IsWindow(m_pLogDlg->GetSafeHwnd())&&(m_pLogDlg->IsWindowVisible()))
        return;
    CString urlString = m_URLCombo.GetString();
    CTSVNPath logUrl = m_URL;
    if (urlString.GetLength()>1)
    {
        logUrl = CTSVNPath(SVNExternals::GetFullExternalUrl(urlString, m_RepoRoot.GetSVNPathString(), m_URL.GetSVNPathString()));
    }
    else
    {
        logUrl = m_RepoRoot;
        logUrl.AppendPathString(urlString);
    }

    if (!logUrl.IsEmpty())
    {
        delete m_pLogDlg;
        m_pLogDlg = new CLogDlg();
        m_pLogDlg->SetSelect(true);
        m_pLogDlg->m_pNotifyWindow = this;
        m_pLogDlg->m_wParam = 0;
        m_pLogDlg->SetParams(CTSVNPath(logUrl), SVNRev::REV_HEAD, SVNRev::REV_HEAD, 1, TRUE);
        m_pLogDlg->ContinuousSelection(true);
        m_pLogDlg->Create(IDD_LOGMESSAGE, this);
        m_pLogDlg->ShowWindow(SW_SHOW);
    }
    AfxGetApp()->DoWaitCursor(-1);
}
开发者ID:TortoiseGit,项目名称:tortoisesvn,代码行数:31,代码来源:EditPropExternalsValue.cpp


示例5: AncestorTest

 void AncestorTest()
 {
     CTSVNPath testPath;
     testPath.SetFromWin(L"c:\\windows");
     ATLASSERT(testPath.IsAncestorOf(CTSVNPath(L"c:\\"))==false);
     ATLASSERT(testPath.IsAncestorOf(CTSVNPath(L"c:\\windows")));
     ATLASSERT(testPath.IsAncestorOf(CTSVNPath(L"c:\\windowsdummy"))==false);
     ATLASSERT(testPath.IsAncestorOf(CTSVNPath(L"c:\\windows\\test.txt")));
     ATLASSERT(testPath.IsAncestorOf(CTSVNPath(L"c:\\windows\\system32\\test.txt")));
 }
开发者ID:yuexiaoyun,项目名称:tortoisesvn,代码行数:10,代码来源:TSVNPath.cpp


示例6: UpdateData

void CSetBugTraqAdv::OnOK()
{
    UpdateData();

    m_provider_clsid = GUID_NULL;

    int index = m_cProviderCombo.GetCurSel();
    if (index != CB_ERR)
    {
        CBugTraqProvider *provider = (CBugTraqProvider *)m_cProviderCombo.GetItemDataPtr(index);
        m_provider_clsid = provider->clsid;
    }

    CComPtr<IBugTraqProvider> pProvider;
    HRESULT hr = pProvider.CoCreateInstance(m_provider_clsid);

    if (FAILED(hr))
    {
        m_tooltips.ShowBalloon(IDC_BUGTRAQPROVIDERCOMBO, IDS_ERR_MISSING_PROVIDER, IDS_ERR_ERROR, TTI_ERROR);
        return;
    }

    VARIANT_BOOL valid;
    ATL::CComBSTR parameters;
    parameters.Attach(m_sParameters.AllocSysString());
    hr = pProvider->ValidateParameters(GetSafeHwnd(), parameters, &valid);
    if (FAILED(hr))
    {
        ShowEditBalloon(IDC_BUGTRAQPARAMETERS, IDS_ERR_PROVIDER_VALIDATE_FAILED, IDS_ERR_ERROR, TTI_ERROR);
        return;
    }

    if (valid == VARIANT_FALSE)
        return; // It's assumed that the provider will have done this.

    if (m_pAssociations)
    {
        CBugTraqAssociation bugtraq_association;
        if (m_pAssociations->FindProvider(CTSVNPathList(CTSVNPath(m_sPath)), &bugtraq_association))
        {
            if (bugtraq_association.GetPath().IsEquivalentToWithoutCase(CTSVNPath(m_sPath)))
            {
                ShowEditBalloon(IDC_BUGTRAQPATH, IDS_ERR_PROVIDER_PATH_ALREADY_CONFIGURED, IDS_ERR_ERROR, TTI_ERROR);
                return;
            }
        }
    }

    CResizableStandAloneDialog::OnOK();
}
开发者ID:svn2github,项目名称:tortoisesvn,代码行数:50,代码来源:SetBugTraqAdv.cpp


示例7: CheckData

void CMergeWizardTree::OnBnClickedFindbranchend()
{
	CheckData(false);

	if ((!EndRev.IsValid())||(EndRev == 0))
		EndRev = SVNRev::REV_HEAD;
	if (::IsWindow(m_pLogDlg2->GetSafeHwnd())&&(m_pLogDlg2->IsWindowVisible()))
		return;
	CString url;

	m_URLCombo2.GetWindowText(url);
	//now show the log dialog for the main trunk
	if (!url.IsEmpty())
	{
		CTSVNPath wcPath = ((CMergeWizard*)GetParent())->wcPath;
		if (m_pLogDlg2)
		{
			m_pLogDlg2->DestroyWindow();
			delete m_pLogDlg2;
		}
		m_pLogDlg2 = new CLogDlg();
		CRegDWORD reg = CRegDWORD(_T("Software\\TortoiseSVN\\NumberOfLogs"), 100);
		int limit = (int)(LONG)reg;
		m_pLogDlg2->m_wParam = MERGE_REVSELECTEND;
		m_pLogDlg2->SetDialogTitle(CString(MAKEINTRESOURCE(IDS_MERGE_SELECTENDREVISION)));
		m_pLogDlg2->SetSelect(true);
		m_pLogDlg2->m_pNotifyWindow = this;
		m_pLogDlg2->SetProjectPropertiesPath(wcPath);
		m_pLogDlg2->SetParams(CTSVNPath(url), EndRev, EndRev, 1, limit, TRUE, FALSE);
		m_pLogDlg2->ContinuousSelection(true);
		m_pLogDlg2->SetMergePath(wcPath);
		m_pLogDlg2->Create(IDD_LOGMESSAGE, this);
		m_pLogDlg2->ShowWindow(SW_SHOW);
	}
}
开发者ID:fatterbetter,项目名称:ZTools,代码行数:35,代码来源:MergeWizardTree.cpp


示例8: CLogDlg

void CMergeWizardReintegrate::OnBnClickedShowmergelog()
{
	if (::IsWindow(m_pLogDlg->GetSafeHwnd())&&(m_pLogDlg->IsWindowVisible()))
		return;
	CString url;
	m_URLCombo.GetWindowText(url);

	if (!url.IsEmpty())
	{
		CTSVNPath wcPath = ((CMergeWizard*)GetParent())->wcPath;
		if (m_pLogDlg)
			m_pLogDlg->DestroyWindow();
		delete m_pLogDlg;
		m_pLogDlg = new CLogDlg();
		CRegDWORD reg = CRegDWORD(_T("Software\\TortoiseSVN\\NumberOfLogs"), 100);
		int limit = (int)(LONG)reg;
		m_pLogDlg->SetDialogTitle(CString(MAKEINTRESOURCE(IDS_MERGE_SELECTRANGE)));

		m_pLogDlg->SetSelect(true);
		m_pLogDlg->m_pNotifyWindow = this;
		m_pLogDlg->SetParams(CTSVNPath(url), SVNRev::REV_HEAD, SVNRev::REV_HEAD, 1, limit, TRUE, FALSE);
		m_pLogDlg->SetProjectPropertiesPath(wcPath);
		m_pLogDlg->SetMergePath(wcPath);
		m_pLogDlg->Create(IDD_LOGMESSAGE, this);
		m_pLogDlg->ShowWindow(SW_SHOW);
	}
}
开发者ID:fatterbetter,项目名称:ZTools,代码行数:27,代码来源:MergeWizardReintegrate.cpp


示例9: props

void CConflictResolveDlg::OnBnClickedUselocal()
{
    bool bUseFull = !!m_pConflictDescription->is_binary;
    bool diffallowed = ((m_pConflictDescription->merged_file && m_pConflictDescription->base_abspath)
                        || (!m_pConflictDescription->base_abspath && m_pConflictDescription->my_abspath && m_pConflictDescription->their_abspath));
    bUseFull = bUseFull || !diffallowed;
    if (!bUseFull && m_pConflictDescription->local_abspath)
    {
        // try to get the mime-type property
        // note:
        // the is_binary member of the conflict description struct is currently
        // always 'false' for merge conflicts. The svn library does not
        // try to find out whether the text conflict is actually from a binary
        // or a text file but passes 'false' unconditionally. So we try to
        // find out for real whether the file is binary or not by reading
        // the svn:mime-type property.
        // If the svn lib ever changes that, we can remove this part of the code.
        SVNProperties props(CTSVNPath(CUnicodeUtils::GetUnicode(m_pConflictDescription->local_abspath)), SVNRev::REV_WC, false, false);
        for (int i = 0; i < props.GetCount(); ++i)
        {
            if (props.GetItemName(i).compare("svn:mime-type") == 0)
            {
                if (props.GetItemValue(i).find("text") == std::string::npos)
                    bUseFull = true;
            }
        }
    }
    m_choice =  bUseFull ? svn_wc_conflict_choose_mine_full : svn_wc_conflict_choose_mine_conflict;
    EndDialog(IDOK);
}
开发者ID:Kasper8660,项目名称:tortoisesvn,代码行数:30,代码来源:ConflictResolveDlg.cpp


示例10: CString

void CEditPropExternals::OnBnClickedFindhead()
{
    CProgressDlg progDlg;
    progDlg.ShowModal(m_hWnd, TRUE);
    progDlg.SetTitle(IDS_EDITPROPS_PROG_FINDHEADTITLE);
    progDlg.SetLine(1, CString(MAKEINTRESOURCE(IDS_EDITPROPS_PROG_FINDHEADROOTS)));
    DWORD count = 0;
    DWORD total = (DWORD)m_externals.size()*4;
    SVN svn;
    svn.SetPromptParentWindow(m_hWnd);
    SVNInfo svnInfo;
    svnInfo.SetPromptParentWindow(m_hWnd);
    for (auto it = m_externals.begin(); it != m_externals.end(); ++it)
    {
        progDlg.SetProgress(count++, total);
        if (progDlg.HasUserCancelled())
            break;
        if (it->root.IsEmpty())
        {
            CTSVNPath p = it->path;
            p.AppendPathString(it->targetDir);
            it->root = svn.GetRepositoryRoot(p);
        }
    }

    progDlg.SetLine(1, CString(MAKEINTRESOURCE(IDS_EDITPROPS_PROG_FINDHEADREVS)));
    SVNLogHelper logHelper;
    for (auto it = m_externals.begin(); it != m_externals.end(); ++it)
    {
        progDlg.SetProgress(count, total);
        progDlg.SetLine(2, it->url, true);
        if (progDlg.HasUserCancelled())
            break;
        count += 4;
        if (!it->root.IsEmpty())
        {
            auto youngestRev = logHelper.GetYoungestRev(CTSVNPath(it->fullurl));
            if (!youngestRev.IsValid())
                it->headrev = svn.GetHEADRevision(CTSVNPath(it->fullurl), true);
            else
                it->headrev = youngestRev;
        }
    }
    progDlg.Stop();
    m_ExtList.Invalidate();
}
开发者ID:TortoiseGit,项目名称:tortoisesvn,代码行数:46,代码来源:EditPropExternals.cpp


示例11: DWORD

CSVNStatusCache::CSVNStatusCache(void)
{
#define forever DWORD(-1)
	AutoLocker lock(m_NoWatchPathCritSec);
	TCHAR path[MAX_PATH];
	SHGetFolderPath(NULL, CSIDL_COOKIES, NULL, 0, path);
	m_NoWatchPaths[CTSVNPath(CString(path))] = forever;
	SHGetFolderPath(NULL, CSIDL_HISTORY, NULL, 0, path);
	m_NoWatchPaths[CTSVNPath(CString(path))] = forever;
	SHGetFolderPath(NULL, CSIDL_INTERNET_CACHE, NULL, 0, path);
	m_NoWatchPaths[CTSVNPath(CString(path))] = forever;
	SHGetFolderPath(NULL, CSIDL_SYSTEM, NULL, 0, path);
	m_NoWatchPaths[CTSVNPath(CString(path))] = forever;
	SHGetFolderPath(NULL, CSIDL_WINDOWS, NULL, 0, path);
	m_NoWatchPaths[CTSVNPath(CString(path))] = forever;
	m_bClearMemory = false;
	m_mostRecentExpiresAt = 0;
}
开发者ID:fatterbetter,项目名称:ZTools,代码行数:18,代码来源:SVNStatusCache.cpp


示例12: CTSVNPath

void CConflictResolveDlg::OnBnClickedEditconflict()
{
    CString filename, n1, n2, n3, n4;
    if (m_pConflictDescription->property_name)
    {
        filename = CUnicodeUtils::GetUnicode(m_pConflictDescription->property_name);
        n1.Format(IDS_DIFF_PROP_WCNAME, (LPCTSTR)filename);
        n2.Format(IDS_DIFF_PROP_BASENAME, (LPCTSTR)filename);
        n3.Format(IDS_DIFF_PROP_REMOTENAME, (LPCTSTR)filename);
        n4.Format(IDS_DIFF_PROP_MERGENAME, (LPCTSTR)filename);
    }
    else
    {
        filename = CUnicodeUtils::GetUnicode(m_pConflictDescription->local_abspath);
        filename = CPathUtils::GetFileNameFromPath(filename);
        n1.Format(IDS_DIFF_WCNAME, (LPCTSTR)filename);
        n2.Format(IDS_DIFF_BASENAME, (LPCTSTR)filename);
        n3.Format(IDS_DIFF_REMOTENAME, (LPCTSTR)filename);
        n4.Format(IDS_DIFF_MERGEDNAME, (LPCTSTR)filename);
    }

    m_mergedfile = CTempFiles::Instance().GetTempFilePath(false, CTSVNPath(CUnicodeUtils::GetUnicode(m_pConflictDescription->local_abspath))).GetWinPath();
    CAppUtils::MergeFlags flags;
    flags.bAlternativeTool = (GetKeyState(VK_SHIFT)&0x8000) != 0;
    flags.bReadOnly = true;
    CTSVNPath basefile;
    CTSVNPath theirfile;
    CTSVNPath myfile;
    if (m_pConflictDescription->base_abspath)
        basefile = CTSVNPath(CUnicodeUtils::GetUnicode(m_pConflictDescription->base_abspath));
    else
        basefile = CTempFiles::Instance().GetTempFilePath(true);
    if (m_pConflictDescription->their_abspath && (m_pConflictDescription->kind != svn_wc_conflict_kind_property))
        theirfile = CTSVNPath(CUnicodeUtils::GetUnicode(m_pConflictDescription->their_abspath));
    else
    {
        if (m_pConflictDescription->merged_file)
            theirfile = CTSVNPath(CUnicodeUtils::GetUnicode(m_pConflictDescription->merged_file));
        else
            theirfile = CTempFiles::Instance().GetTempFilePath(true);
    }
    if (m_pConflictDescription->my_abspath)
        myfile = CTSVNPath(CUnicodeUtils::GetUnicode(m_pConflictDescription->my_abspath));
    else
    {
        if (m_pConflictDescription->merged_file)
            myfile = CTSVNPath(CUnicodeUtils::GetUnicode(m_pConflictDescription->merged_file));
        else
            myfile = CTempFiles::Instance().GetTempFilePath(true);
    }
    CAppUtils::StartExtMerge(flags,
                             basefile,
                             theirfile,
                             myfile,
                             CTSVNPath(m_mergedfile), true,
                             n2, n3, n1, n4, filename);

    GetDlgItem(IDC_RESOLVED)->EnableWindow(TRUE);
}
开发者ID:Kasper8660,项目名称:tortoisesvn,代码行数:59,代码来源:ConflictResolveDlg.cpp


示例13: RemoveDuplicatesTest

    void RemoveDuplicatesTest()
    {
        CTSVNPathList list;
        list.AddPath(CTSVNPath(L"Z"));
        list.AddPath(CTSVNPath(L"A"));
        list.AddPath(CTSVNPath(L"E"));
        list.AddPath(CTSVNPath(L"E"));

        ATLASSERT(list[2].IsEquivalentTo(list[3]));
        ATLASSERT(list[2]==list[3]);

        ATLASSERT(list.GetCount() == 4);

        list.RemoveDuplicates();

        ATLASSERT(list.GetCount() == 3);

        ATLASSERT(list[0].GetWinPathString() == L"A");
        ATLASSERT(list[1].GetWinPathString().Compare(L"E") == 0);
        ATLASSERT(list[2].GetWinPathString() == L"Z");
    }
开发者ID:yuexiaoyun,项目名称:tortoisesvn,代码行数:21,代码来源:TSVNPath.cpp


示例14: DWORD

CSVNStatusCache::CSVNStatusCache(void)
{
#define forever DWORD(-1)
    AutoLocker lock(m_NoWatchPathCritSec);
    m_NoWatchPaths[CTSVNPath(GetSpecialFolder(FOLDERID_Cookies))] = forever;
    m_NoWatchPaths[CTSVNPath(GetSpecialFolder(FOLDERID_History))] = forever;
    m_NoWatchPaths[CTSVNPath(GetSpecialFolder(FOLDERID_InternetCache))] = forever;
    m_NoWatchPaths[CTSVNPath(GetSpecialFolder(FOLDERID_Windows))] = forever;
    m_NoWatchPaths[CTSVNPath(GetSpecialFolder(FOLDERID_CDBurning))] = forever;
    m_NoWatchPaths[CTSVNPath(GetSpecialFolder(FOLDERID_Fonts))] = forever;
    m_NoWatchPaths[CTSVNPath(GetSpecialFolder(FOLDERID_RecycleBinFolder))] = forever;
    m_NoWatchPaths[CTSVNPath(GetSpecialFolder(FOLDERID_SearchHistory))] = forever;
    m_bClearMemory = false;
    m_mostRecentExpiresAt = 0;
}
开发者ID:code-mx,项目名称:tortoisesvn,代码行数:15,代码来源:SVNStatusCache.cpp


示例15: CTSVNPath

CTSVNPath CTSVNPathList::GetCommonRoot() const
{
    if (GetCount() == 0)
        return CTSVNPath();
    if (GetCount() == 1)
        return m_paths[0];

    // first entry is common root for itself
    // (add trailing '\\' to detect partial matches of the last path element)

    CString root = m_paths[0].GetWinPathString() + '\\';
    int rootLength = root.GetLength();

    // determine common path string prefix

    for ( PathVector::const_iterator it = m_paths.begin()+1
        ; it != m_paths.end()
        ; ++it)
    {
        CString path = it->GetWinPathString() + '\\';

        int newLength = CStringUtils::GetMatchingLength (root, path);
        if (newLength != rootLength)
        {
            root.Delete (newLength, rootLength);
            rootLength = newLength;
        }
    }

    // remove the last (partial) path element

    if (rootLength > 0)
        root.Delete (root.ReverseFind ('\\'), rootLength);

    // done

    return CTSVNPath (root);
}
开发者ID:yuexiaoyun,项目名称:tortoisesvn,代码行数:38,代码来源:TSVNPath.cpp


示例16: UpdateData

void CSwitchDlg::OnBnClickedLog()
{
	UpdateData(TRUE);
	if (::IsWindow(m_pLogDlg->GetSafeHwnd())&&(m_pLogDlg->IsWindowVisible()))
		return;
	m_URL = CPathUtils::CombineUrls(m_repoRoot, m_URLCombo.GetString());
	if (!m_URL.IsEmpty())
	{
		delete m_pLogDlg;
		m_pLogDlg = new CLogDlg();
		CRegDWORD reg = CRegDWORD(_T("Software\\TortoiseSVN\\NumberOfLogs"), 100);
		int limit = (int)(LONG)reg;
		m_pLogDlg->SetSelect(true);
		m_pLogDlg->m_pNotifyWindow = this;
		m_pLogDlg->m_wParam = 0;
		m_pLogDlg->SetParams(CTSVNPath(m_URL), SVNRev::REV_HEAD, SVNRev::REV_HEAD, 1, limit, TRUE);
		m_pLogDlg->ContinuousSelection(true);
		m_pLogDlg->SetProjectPropertiesPath(CTSVNPath(m_path));
		m_pLogDlg->Create(IDD_LOGMESSAGE, this);
		m_pLogDlg->ShowWindow(SW_SHOW);
	}
	AfxGetApp()->DoWaitCursor(-1);
}
开发者ID:fatterbetter,项目名称:ZTools,代码行数:23,代码来源:SwitchDlg.cpp


示例17: CTSVNPath

void CTreeConflictEditorDlg::OnBnClickedBranchlog()
{
    CString sTemp;
    sTemp.Format(L"%s/%s", (LPCTSTR)src_left_version_url, (LPCTSTR)src_left_version_path);

    CString sFile;
    CTSVNPath logPath = CTSVNPath(sTemp);
    if (src_left_version_kind != svn_node_dir)
    {
        sFile = logPath.GetFilename();
        logPath = logPath.GetContainingDirectory();
    }

    CAppUtils::RunTortoiseProc(GetShowLogCmd(logPath, sFile));
}
开发者ID:memoarfaa,项目名称:tortoisesvn,代码行数:15,代码来源:TreeConflictEditorDlg.cpp


示例18: Clear

void CTSVNPathList::LoadFromAsteriskSeparatedString(const CString& sPathString)
{
    if (GetCount() > 0)
        Clear();

    int pos = 0;
    CString temp;
    for(;;)
    {
        temp = sPathString.Tokenize(L"*",pos);
        if(temp.IsEmpty())
        {
            break;
        }
        AddPath(CTSVNPath(CPathUtils::GetLongPathname(temp)));
    }
}
开发者ID:yuexiaoyun,项目名称:tortoisesvn,代码行数:17,代码来源:TSVNPath.cpp


示例19: diff

bool DiffCommand::Execute()
{
	bool bRet = false;
	CString path2 = CPathUtils::GetLongPathname(parser.GetVal(_T("path2")));
	bool bAlternativeTool = !!parser.HasKey(_T("alternative"));
	bool bBlame = !!parser.HasKey(_T("blame"));
	if (path2.IsEmpty())
	{
		SVNDiff diff(NULL, hwndExplorer);
		diff.SetAlternativeTool(bAlternativeTool);
		diff.SetJumpLine(parser.GetLongVal(_T("line")));
		if ( parser.HasKey(_T("startrev")) && parser.HasKey(_T("endrev")) )
		{
			SVNRev StartRevision = SVNRev(parser.GetLongVal(_T("startrev")));
			SVNRev EndRevision = SVNRev(parser.GetLongVal(_T("endrev")));
			bRet = diff.ShowCompare(cmdLinePath, StartRevision, cmdLinePath, EndRevision, SVNRev(), false, bBlame);
		}
		else
		{
			svn_revnum_t baseRev = 0;
			if (cmdLinePath.IsDirectory())
			{
				bRet = diff.DiffProps(cmdLinePath, SVNRev::REV_WC, SVNRev::REV_BASE, baseRev);
				if (bRet == false)
				{
					CChangedDlg dlg;
					dlg.m_pathList = CTSVNPathList(cmdLinePath);
					dlg.DoModal();
					bRet = true;
				}
			}
			else
			{
				bRet = diff.DiffFileAgainstBase(cmdLinePath, baseRev);
			}
		}
	} 
	else
		bRet = CAppUtils::StartExtDiff(
			CTSVNPath(path2), cmdLinePath, CString(), CString(),
			CAppUtils::DiffFlags().AlternativeTool(bAlternativeTool), parser.GetLongVal(_T("line")));
	return bRet;
}
开发者ID:fatterbetter,项目名称:ZTools,代码行数:43,代码来源:DiffCommand.cpp


示例20: CTSVNPath

void CConflictResolveDlg::OnBnClickedEditconflict()
{
	CString filename, n1, n2, n3;
	if (m_pConflictDescription->property_name)
	{
		filename = CUnicodeUtils::GetUnicode(m_pConflictDescription->property_name);
		n1.Format(IDS_DIFF_PROP_WCNAME, (LPCTSTR)filename);
		n2.Format(IDS_DIFF_PROP_BASENAME, (LPCTSTR)filename);
		n3.Format(IDS_DIFF_PROP_REMOTENAME, (LPCTSTR)filename);
	}
	else
	{
		filename = CUnicodeUtils::GetUnicode(m_pConflictDescription->path);
		filename = CPathUtils::GetFileNameFromPath(filename);
		n1.Format(IDS_DIFF_WCNAME, (LPCTSTR)filename);
		n2.Format(IDS_DIFF_BASENAME, (LPCTSTR)filename);
		n3.Format(IDS_DIFF_REMOTENAME, (LPCTSTR)filename);
	}

	if (m_pConflictDescription->base_file == NULL)
	{
		CAppUtils::DiffFlags flags;
		// no base file, start TortoiseMerge in Two-way diff mode
		CAppUtils::StartExtDiff(CTSVNPath(CUnicodeUtils::GetUnicode(m_pConflictDescription->their_file)),
			CTSVNPath(CUnicodeUtils::GetUnicode(m_pConflictDescription->my_file)),
			n3, n1, flags);
	}
	else
	{
		// Subversion segfaults (1.5.1) if the path of the merged file is not a child of the
		// folder where the conflict occurs. That's why we try to use the provided file path first...
		if (m_pConflictDescription->merged_file)
			m_mergedfile = CUnicodeUtils::GetUnicode(m_pConflictDescription->merged_file);
		else
			m_mergedfile = CTempFiles::Instance().GetTempFilePath(false, CTSVNPath(CUnicodeUtils::GetUnicode(m_pConflictDescription->path))).GetWinPath();
		CAppUtils::StartExtMerge(CTSVNPath(CUnicodeUtils::GetUnicode(m_pConflictDescription->base_file)),
								CTSVNPath(CUnicodeUtils::GetUnicode(m_pConflictDescription->their_file)),
								CTSVNPath(CUnicodeUtils::GetUnicode(m_pConflictDescription->my_file)),
								CTSVNPath(m_mergedfile),
								n2, n3, n1, CString(), false);
	}

	GetDlgItem(IDC_RESOLVED)->EnableWindow(TRUE);
}
开发者ID:omnibs,项目名称:TortoiseGit,代码行数:44,代码来源:ConflictResolveDlg.cpp



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C++ CTXFREE函数代码示例发布时间:2022-05-30
下一篇:
C++ CTSTRING函数代码示例发布时间:2022-05-30
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap