#include "stdafx.h"\r
#include "TortoiseMerge.h"\r
#include "AboutDlg.h"\r
-//#include "svn_version.h"\r
-//#include "svn_diff.h"\r
-//#include "..\..\\apr\include\apr_version.h"\r
-//#include "..\..\apr-util\include\apu_version.h"\r
+#include "svn_version.h"\r
+#include "svn_diff.h"\r
+#include "..\..\\apr\include\apr_version.h"\r
+#include "..\..\apr-util\include\apu_version.h"\r
#include "..\version.h"\r
\r
// CAboutDlg dialog\r
// when the application's main window is not a dialog\r
SetIcon(m_hIcon, TRUE); // Set big icon\r
SetIcon(m_hIcon, FALSE); // Set small icon\r
-#if 0\r
+\r
//set the version string\r
CString temp, boxtitle;\r
boxtitle.Format(IDS_ABOUTVERSIONBOX, TSVN_VERMAJOR, TSVN_VERMINOR, TSVN_VERMICRO, TSVN_VERBUILD, _T(TSVN_PLATFORM), _T(TSVN_VERDATE));\r
\r
m_cWebLink.SetURL(_T("http://tortoisesvn.net"));\r
m_cSupportLink.SetURL(_T("http://tortoisesvn.tigris.org/contributors.html"));\r
-#endif\r
+\r
return TRUE; // return TRUE unless you set the focus to a control\r
// EXCEPTION: OCX Property Pages should return FALSE\r
}\r
// TortoiseMerge - a Diff/Patch program\r
\r
-// Copyright (C) 2006-2008 - TortoiseSVN\r
+// Copyright (C) 2006-2009 - TortoiseSVN\r
\r
// This program is free software; you can redistribute it and/or\r
// modify it under the terms of the GNU General Public License\r
#include "StdAfx.h"\r
#include "Registry.h"\r
#include "AppUtils.h"\r
+#include "PathUtils.h"\r
#include "UnicodeUtils.h"\r
#include "SysProgressDlg.h"\r
\r
-//#include "svn_pools.h"\r
-//#include "svn_io.h"\r
-//#include "svn_path.h"\r
-//#include "svn_diff.h"\r
-//#include "svn_string.h"\r
-//#include "svn_utf.h"\r
+#include "svn_pools.h"\r
+#include "svn_io.h"\r
+#include "svn_path.h"\r
+#include "svn_diff.h"\r
+#include "svn_string.h"\r
+#include "svn_utf.h"\r
\r
CAppUtils::CAppUtils(void)\r
{\r
if (sSCMPath.IsEmpty())\r
{\r
// no path set, so use TortoiseSVN as default\r
- sSCMPath = CRegString(_T("Software\\TortoiseGit\\ProcPath"), _T(""), false, HKEY_LOCAL_MACHINE);\r
- if (sSCMPath.IsEmpty())\r
- {\r
- TCHAR pszSCMPath[MAX_PATH];\r
- GetModuleFileName(NULL, pszSCMPath, MAX_PATH);\r
- sSCMPath = pszSCMPath;\r
- sSCMPath = sSCMPath.Left(sSCMPath.ReverseFind('\\'));\r
- sSCMPath += _T("\\TortoiseProc.exe");\r
- }\r
+ sSCMPath = CPathUtils::GetAppDirectory() + _T("TortoiseProc.exe");\r
sSCMPath += _T(" /command:cat /path:\"%1\" /revision:%2 /savepath:\"%3\" /hwnd:%4");\r
}\r
CString sTemp;\r
apr_file_t * outfile = NULL;\r
apr_pool_t * pool = svn_pool_create(NULL);\r
\r
- svn_error_t * err = svn_io_file_open (&outfile, svn_path_canonicalize(CUnicodeUtils::GetUTF8(output), pool),\r
+ svn_error_t * err = svn_io_file_open (&outfile, svn_path_internal_style(CUnicodeUtils::GetUTF8(output), pool),\r
APR_WRITE | APR_CREATE | APR_BINARY | APR_TRUNCATE,\r
APR_OS_DEFAULT, pool);\r
if (err == NULL)\r
svn_diff_file_options_t * opts = svn_diff_file_options_create(pool);\r
opts->ignore_eol_style = false;\r
opts->ignore_space = svn_diff_file_ignore_space_none;\r
- err = svn_diff_file_diff_2(&diff, svn_path_canonicalize(CUnicodeUtils::GetUTF8(orig), pool), \r
- svn_path_canonicalize(CUnicodeUtils::GetUTF8(modified), pool), opts, pool);\r
+ err = svn_diff_file_diff_2(&diff, svn_path_internal_style(CUnicodeUtils::GetUTF8(orig), pool), \r
+ svn_path_internal_style(CUnicodeUtils::GetUTF8(modified), pool), opts, pool);\r
if (err == NULL)\r
{\r
- err = svn_diff_file_output_unified(stream, diff, svn_path_canonicalize(CUnicodeUtils::GetUTF8(orig), pool), \r
- svn_path_canonicalize(CUnicodeUtils::GetUTF8(modified), pool),\r
+ err = svn_diff_file_output_unified(stream, diff, svn_path_internal_style(CUnicodeUtils::GetUTF8(orig), pool), \r
+ svn_path_internal_style(CUnicodeUtils::GetUTF8(modified), pool),\r
NULL, NULL, pool);\r
svn_stream_close(stream);\r
}\r
return true;\r
}\r
\r
-CString CAppUtils::GetErrorString(git_error_t * Err)\r
+CString CAppUtils::GetErrorString(svn_error_t * Err)\r
{\r
-#if 0\r
CString msg;\r
CString temp;\r
char errbuf[256];\r
}\r
return msg;\r
}\r
-#endif\r
return _T("");\r
}\r
\r
// 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.\r
//\r
#pragma once\r
-//#include "svn_types.h"\r
-#include "GitStatus.h"\r
+#include "svn_types.h"\r
\r
class CSysProgressDlg;\r
\r
static bool CreateUnifiedDiff(const CString& orig, const CString& modified, const CString& output, bool bShowError);\r
\r
static bool HasClipboardFormat(UINT format);\r
- static CString GetErrorString(git_error_t * Err);\r
+ static CString GetErrorString(svn_error_t * Err);\r
\r
};\r
// TortoiseMerge - a Diff/Patch program\r
\r
-// Copyright (C) 2003-2008 - TortoiseSVN\r
+// Copyright (C) 2003-2009 - TortoiseSVN\r
\r
// This program is free software; you can redistribute it and/or\r
// modify it under the terms of the GNU General Public License\r
#define INLINEREMOVED_COLOR RGB(200, 100, 100)\r
#define MODIFIED_COLOR RGB(220, 220, 255)\r
\r
+#define IDT_SCROLLTIMER 101\r
+\r
CBaseView * CBaseView::m_pwndLeft = NULL;\r
CBaseView * CBaseView::m_pwndRight = NULL;\r
CBaseView * CBaseView::m_pwndBottom = NULL;\r
ON_COMMAND(ID_EDIT_CUT, &CBaseView::OnEditCut)\r
ON_COMMAND(ID_EDIT_PASTE, &CBaseView::OnEditPaste)\r
ON_WM_MOUSELEAVE()\r
+ ON_WM_TIMER()\r
END_MESSAGE_MAP()\r
\r
\r
\r
CString diffline;\r
ExpandChars(pszDiffChars, 0, nDiffLength, diffline);\r
-// svn_diff_t * diff = NULL;\r
-// m_svnlinediff.Diff(&diff, line, line.GetLength(), diffline, diffline.GetLength(), m_bInlineWordDiff);\r
-// if (!diff || !SVNLineDiff::ShowInlineDiff(diff))\r
-// return false;\r
+ svn_diff_t * diff = NULL;\r
+ m_svnlinediff.Diff(&diff, line, line.GetLength(), diffline, diffline.GetLength(), m_bInlineWordDiff);\r
+ if (!diff || !SVNLineDiff::ShowInlineDiff(diff))\r
+ return false;\r
\r
int lineoffset = 0;\r
std::deque<int> removedPositions;\r
-#if 0\r
while (diff)\r
{\r
apr_off_t len = diff->original_length;\r
// Draw vertical bars at removed chunks' positions.\r
for (std::deque<int>::iterator it = removedPositions.begin(); it != removedPositions.end(); ++it)\r
pDC->FillSolidRect(*it, rc.top, 1, rc.Height(), m_InlineRemovedBk);\r
-#endif\r
return true;\r
}\r
\r
\r
void CBaseView::GoToFirstDifference()\r
{\r
- int nCenterPos = 0;\r
- if ((m_pViewData)&&(0 < m_pViewData->GetCount()))\r
- {\r
- while (nCenterPos < m_pViewData->GetCount())\r
- {\r
- DiffStates linestate = m_pViewData->GetState(nCenterPos);\r
- if ((linestate != DIFFSTATE_NORMAL) &&\r
- (linestate != DIFFSTATE_UNKNOWN))\r
- break;\r
- nCenterPos++;\r
- }\r
- if (nCenterPos >= m_pViewData->GetCount())\r
- nCenterPos = m_pViewData->GetCount()-1;\r
- int nTopPos = nCenterPos - (GetScreenLines()/2);\r
- if (nTopPos < 0)\r
- nTopPos = 0;\r
- if (m_pwndLeft)\r
- {\r
- m_pwndLeft->m_ptCaretPos.x = 0;\r
- m_pwndLeft->m_ptCaretPos.y = nCenterPos;\r
- m_pwndLeft->m_nCaretGoalPos = 0;\r
- }\r
- if (m_pwndRight)\r
- {\r
- m_pwndRight->m_ptCaretPos.x = 0;\r
- m_pwndRight->m_ptCaretPos.y = nCenterPos;\r
- m_pwndRight->m_nCaretGoalPos = 0;\r
- }\r
- if (m_pwndBottom)\r
- {\r
- m_pwndBottom->m_ptCaretPos.x = 0;\r
- m_pwndBottom->m_ptCaretPos.y = nCenterPos;\r
- m_pwndBottom->m_nCaretGoalPos = 0;\r
- }\r
- ScrollAllToLine(nTopPos);\r
- RecalcAllVertScrollBars(TRUE);\r
- }\r
+ m_ptCaretPos.y = 0;\r
+ SelectNextBlock(1, false, false);\r
}\r
\r
void CBaseView::HiglightLines(int start, int end /* = -1 */)\r
SelectNextBlock(-1, false);\r
}\r
\r
-void CBaseView::SelectNextBlock(int nDirection, bool bConflict)\r
+void CBaseView::SelectNextBlock(int nDirection, bool bConflict, bool bSkipEndOfCurrentBlock /* = true */)\r
{\r
if (! m_pViewData)\r
return;\r
if (nCenterPos >= m_pViewData->GetCount())\r
nCenterPos = m_pViewData->GetCount()-1;\r
\r
- // Find end of current block\r
- DiffStates state = m_pViewData->GetState(nCenterPos);\r
- while ((nCenterPos != nLimit) && \r
- (m_pViewData->GetState(nCenterPos)==state))\r
- nCenterPos += nDirection;\r
+ if (bSkipEndOfCurrentBlock) \r
+ {\r
+ // Find end of current block\r
+ DiffStates state = m_pViewData->GetState(nCenterPos);\r
+ while ((nCenterPos != nLimit) && \r
+ (m_pViewData->GetState(nCenterPos)==state))\r
+ nCenterPos += nDirection;\r
+ }\r
\r
// Find next diff/conflict block\r
while (nCenterPos != nLimit)\r
}\r
\r
// Find end of new block\r
- state = m_pViewData->GetState(nCenterPos);\r
+ DiffStates state = m_pViewData->GetState(nCenterPos);\r
int nBlockEnd = nCenterPos;\r
while ((nBlockEnd != nLimit) && \r
- (state == m_pViewData->GetState(nBlockEnd + nDirection)))\r
+ (state == m_pViewData->GetState(nBlockEnd + nDirection)))\r
nBlockEnd += nDirection;\r
\r
int nTopPos = nCenterPos - (GetScreenLines()/2);\r
\r
void CBaseView::OnMouseMove(UINT nFlags, CPoint point)\r
{\r
+ if (m_pMainFrame->m_nMoveMovesToIgnore > 0) {\r
+ --m_pMainFrame->m_nMoveMovesToIgnore;\r
+ CView::OnMouseMove(nFlags, point);\r
+ return;\r
+ }\r
+\r
int nMouseLine = (((point.y - HEADERHEIGHT) / GetLineHeight()) + m_nTopLine);\r
nMouseLine--; //we need the index\r
if (nMouseLine < -1)\r
}\r
ShowDiffLines(nMouseLine);\r
\r
+ KillTimer(IDT_SCROLLTIMER);\r
if (nFlags & MK_LBUTTON)\r
{\r
+ int saveMouseLine = nMouseLine >= 0 ? nMouseLine : 0;\r
+ saveMouseLine = saveMouseLine < GetLineCount() ? saveMouseLine : GetLineCount() - 1;\r
+ int charIndex = CalculateCharIndex(saveMouseLine, m_nOffsetChar + (point.x - GetMarginWidth()) / GetCharWidth());\r
if (((m_nSelBlockStart >= 0)&&(m_nSelBlockEnd >= 0))&&\r
((nMouseLine >= m_nTopLine)&&(nMouseLine < GetLineCount())))\r
{\r
m_ptCaretPos.y = nMouseLine;\r
- m_ptCaretPos.x = CalculateCharIndex(m_ptCaretPos.y, m_nOffsetChar + (point.x - GetMarginWidth()) / GetCharWidth());\r
+ m_ptCaretPos.x = charIndex;\r
UpdateGoalPos();\r
AdjustSelection();\r
UpdateCaret();\r
Invalidate();\r
UpdateWindow();\r
}\r
+ if (nMouseLine < m_nTopLine)\r
+ {\r
+ ScrollToLine(m_nTopLine-1, TRUE);\r
+ SetTimer(IDT_SCROLLTIMER, 20, NULL);\r
+ }\r
+ if (nMouseLine >= m_nTopLine + GetScreenLines())\r
+ {\r
+ ScrollToLine(m_nTopLine+1, TRUE);\r
+ SetTimer(IDT_SCROLLTIMER, 20, NULL);\r
+ }\r
+ if (charIndex <= m_nOffsetChar)\r
+ {\r
+ ScrollSide(-1);\r
+ SetTimer(IDT_SCROLLTIMER, 20, NULL);\r
+ }\r
+ if (charIndex >= (GetScreenChars()+m_nOffsetChar))\r
+ {\r
+ ScrollSide(1);\r
+ SetTimer(IDT_SCROLLTIMER, 20, NULL);\r
+ }\r
}\r
\r
if (!m_bMouseWithin)\r
{\r
ShowDiffLines(-1);\r
m_bMouseWithin = FALSE;\r
-\r
+ KillTimer(IDT_SCROLLTIMER);\r
CView::OnMouseLeave();\r
}\r
\r
+void CBaseView::OnTimer(UINT_PTR nIDEvent)\r
+{\r
+ if (nIDEvent == IDT_SCROLLTIMER)\r
+ {\r
+ POINT point;\r
+ GetCursorPos(&point);\r
+ ScreenToClient(&point);\r
+ int nMouseLine = (((point.y - HEADERHEIGHT) / GetLineHeight()) + m_nTopLine);\r
+ nMouseLine--; //we need the index\r
+ if (nMouseLine < -1)\r
+ {\r
+ nMouseLine = -1;\r
+ }\r
+ if (GetKeyState(VK_LBUTTON)&0x8000)\r
+ {\r
+ int saveMouseLine = nMouseLine >= 0 ? nMouseLine : 0;\r
+ saveMouseLine = saveMouseLine < GetLineCount() ? saveMouseLine : GetLineCount() - 1;\r
+ int charIndex = CalculateCharIndex(saveMouseLine, m_nOffsetChar + (point.x - GetMarginWidth()) / GetCharWidth());\r
+ if (nMouseLine < m_nTopLine)\r
+ {\r
+ ScrollToLine(m_nTopLine-1, TRUE);\r
+ SetTimer(IDT_SCROLLTIMER, 20, NULL);\r
+ }\r
+ if (nMouseLine >= m_nTopLine + GetScreenLines())\r
+ {\r
+ ScrollToLine(m_nTopLine+1, TRUE);\r
+ SetTimer(IDT_SCROLLTIMER, 20, NULL);\r
+ }\r
+ if (charIndex <= m_nOffsetChar)\r
+ {\r
+ ScrollSide(-1);\r
+ SetTimer(IDT_SCROLLTIMER, 20, NULL);\r
+ }\r
+ if (charIndex >= GetScreenChars())\r
+ {\r
+ ScrollSide(1);\r
+ SetTimer(IDT_SCROLLTIMER, 20, NULL);\r
+ }\r
+ }\r
+\r
+ }\r
+\r
+ CView::OnTimer(nIDEvent);\r
+}\r
+\r
void CBaseView::SelectLines(int nLine1, int nLine2)\r
{\r
if (nLine2 == -1)\r
m_pwndBottom->m_pViewData->SetLine(i, m_pwndLeft->m_pViewData->GetLine(i));\r
bottomstate.linestates[i] = m_pwndBottom->m_pViewData->GetState(i);\r
m_pwndBottom->m_pViewData->SetState(i, m_pwndLeft->m_pViewData->GetState(i));\r
+ m_pwndBottom->m_pViewData->SetLineEnding(i, EOL_AUTOLINE);\r
if (m_pwndBottom->IsLineConflicted(i))\r
{\r
if (m_pwndLeft->m_pViewData->GetState(i) == DIFFSTATE_CONFLICTEMPTY)\r
else\r
m_pwndBottom->m_pViewData->SetState(i, DIFFSTATE_CONFLICTRESOLVED);\r
}\r
+ m_pwndLeft->m_pViewData->SetState(i, DIFFSTATE_YOURSADDED);\r
}\r
\r
// your block is done, now insert their block\r
else\r
m_pwndBottom->m_pViewData->SetState(index, DIFFSTATE_CONFLICTRESOLVED);\r
}\r
+ m_pwndRight->m_pViewData->SetState(i, DIFFSTATE_THEIRSADDED);\r
index++;\r
}\r
// adjust line numbers\r
// now insert an empty block in both yours and theirs\r
for (int emptyblocks=0; emptyblocks < m_nSelBlockEnd-m_nSelBlockStart+1; ++emptyblocks)\r
{\r
- leftstate.addedlines.push_back(m_nSelBlockStart);\r
- m_pwndLeft->m_pViewData->InsertData(m_nSelBlockStart, _T(""), DIFFSTATE_EMPTY, -1, EOL_NOENDING);\r
- m_pwndRight->m_pViewData->InsertData(m_nSelBlockEnd+1, _T(""), DIFFSTATE_EMPTY, -1, EOL_NOENDING);\r
- rightstate.addedlines.push_back(m_nSelBlockEnd+1);\r
+ rightstate.addedlines.push_back(m_nSelBlockStart);\r
+ m_pwndRight->m_pViewData->InsertData(m_nSelBlockStart, _T(""), DIFFSTATE_EMPTY, -1, EOL_NOENDING);\r
+ m_pwndLeft->m_pViewData->InsertData(m_nSelBlockEnd+1, _T(""), DIFFSTATE_EMPTY, -1, EOL_NOENDING);\r
+ leftstate.addedlines.push_back(m_nSelBlockEnd+1);\r
}\r
RecalcAllVertScrollBars();\r
m_pwndBottom->SetModified();\r
bottomstate.linestates[i] = m_pwndBottom->m_pViewData->GetState(i);\r
m_pwndBottom->m_pViewData->SetState(i, m_pwndRight->m_pViewData->GetState(i));\r
rightstate.linestates[i] = m_pwndRight->m_pViewData->GetState(i);\r
+ m_pwndBottom->m_pViewData->SetLineEnding(i, EOL_AUTOLINE);\r
if (m_pwndBottom->IsLineConflicted(i))\r
{\r
if (m_pwndRight->m_pViewData->GetState(i) == DIFFSTATE_CONFLICTEMPTY)\r
}\r
}\r
\r
+\r
//\r
#pragma once\r
#include "DiffData.h"\r
-//#include "SVNLineDiff.h"\r
+#include "SVNLineDiff.h"\r
#include "ScrollTool.h"\r
#include "Undo.h"\r
#include "LocatorBar.h"\r
afx_msg void OnLButtonDown(UINT nFlags, CPoint point);\r
afx_msg void OnEditCopy();\r
afx_msg void OnMouseMove(UINT nFlags, CPoint point);\r
+ afx_msg void OnTimer(UINT_PTR nIDEvent);\r
afx_msg void OnMouseLeave();\r
afx_msg void OnChar(UINT nChar, UINT nRepCnt, UINT nFlags);\r
afx_msg void OnCaretDown();\r
void DrawText(CDC * pDC, const CRect &rc, LPCTSTR text, int textlength, int nLineIndex, POINT coords, bool bModified, bool bInlineDiff);\r
void ClearCurrentSelection();\r
void AdjustSelection();\r
- void SelectNextBlock(int nDirection, bool bConflict);\r
+ void SelectNextBlock(int nDirection, bool bConflict, bool bSkipEndOfCurrentBlock = true);\r
\r
void RemoveLine(int nLineIndex);\r
void RemoveSelectedText();\r
COLORREF m_WhiteSpaceFg;\r
UINT m_nStatusBarID; ///< The ID of the status bar pane used by this view. Must be set by the parent class.\r
\r
-// SVNLineDiff m_svnlinediff;\r
+ SVNLineDiff m_svnlinediff;\r
BOOL m_bOtherDiffChecked;\r
BOOL m_bModified;\r
BOOL m_bFocused;\r
// TortoiseMerge - a Diff/Patch program\r
\r
-// Copyright (C) 2006-2008 - TortoiseSVN\r
+// Copyright (C) 2006-2009 - TortoiseSVN\r
\r
// This program is free software; you can redistribute it and/or\r
// modify it under the terms of the GNU General Public License\r
m_pViewData->SetLine(i, m_pwndLeft->m_pViewData->GetLine(i));\r
bottomstate.linestates[i] = m_pViewData->GetState(i);\r
m_pViewData->SetState(i, m_pwndLeft->m_pViewData->GetState(i));\r
+ m_pViewData->SetLineEnding(i, EOL_AUTOLINE);\r
if (IsLineConflicted(i))\r
{\r
if (m_pwndLeft->m_pViewData->GetState(i) == DIFFSTATE_CONFLICTEMPTY)\r
m_pViewData->SetLine(i, m_pwndRight->m_pViewData->GetLine(i));\r
bottomstate.linestates[i] = m_pViewData->GetState(i);\r
m_pViewData->SetState(i, m_pwndRight->m_pViewData->GetState(i));\r
+ m_pViewData->SetLineEnding(i, EOL_AUTOLINE);\r
+ m_pViewData->SetLineEnding(i, EOL_AUTOLINE);\r
{\r
if (m_pwndRight->m_pViewData->GetState(i) == DIFFSTATE_CONFLICTEMPTY)\r
m_pViewData->SetState(i, DIFFSTATE_CONFLICTRESOLVEDEMPTY);\r
// TortoiseMerge - a Diff/Patch program\r
\r
-// Copyright (C) 2006-2008 - TortoiseSVN\r
+// Copyright (C) 2006-2009 - TortoiseSVN\r
\r
// This program is free software; you can redistribute it and/or\r
// modify it under the terms of the GNU General Public License\r
// 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.\r
//\r
#include "StdAfx.h"\r
+#include "svn_version.h"\r
+#include "svn_io.h"\r
#include "diff.h"\r
#include "TempFiles.h"\r
#include "registry.h"\r
#include "Diffdata.h"\r
#include "UnicodeUtils.h"\r
#include "GitAdminDir.h"\r
-\r
+#include "svn_dso.h"\r
\r
#pragma warning(push)\r
#pragma warning(disable: 4702) // unreachable code\r
\r
CDiffData::CDiffData(void)\r
{\r
-// apr_initialize();\r
-// svn_dso_initialize();\r
-// g_SVNAdminDir.Init();\r
+ apr_initialize();\r
+ svn_dso_initialize2();\r
+ g_GitAdminDir.Init();\r
\r
m_bBlame = false;\r
\r
\r
CDiffData::~CDiffData(void)\r
{\r
-//// g_SVNAdminDir.Close();\r
-// apr_terminate();\r
+ g_GitAdminDir.Close();\r
+ apr_terminate();\r
}\r
\r
int CDiffData::GetLineCount()\r
\r
BOOL CDiffData::Load()\r
{\r
-\r
CString sConvertedBaseFilename, sConvertedTheirFilename, sConvertedYourFilename;\r
apr_pool_t * pool;\r
\r
int lengthHint = max(m_arBaseFile.GetCount(), m_arTheirFile.GetCount());\r
lengthHint = max(lengthHint, m_arYourFile.GetCount());\r
\r
- m_YourBaseBoth.Reserve(lengthHint);\r
- m_YourBaseLeft.Reserve(lengthHint);\r
- m_YourBaseRight.Reserve(lengthHint);\r
+ try\r
+ {\r
+ m_YourBaseBoth.Reserve(lengthHint);\r
+ m_YourBaseLeft.Reserve(lengthHint);\r
+ m_YourBaseRight.Reserve(lengthHint);\r
\r
- m_TheirBaseBoth.Reserve(lengthHint);\r
- m_TheirBaseLeft.Reserve(lengthHint);\r
- m_TheirBaseRight.Reserve(lengthHint);\r
+ m_TheirBaseBoth.Reserve(lengthHint);\r
+ m_TheirBaseLeft.Reserve(lengthHint);\r
+ m_TheirBaseRight.Reserve(lengthHint);\r
\r
- m_arDiff3LinesBase.Reserve(lengthHint);\r
- m_arDiff3LinesYour.Reserve(lengthHint);\r
- m_arDiff3LinesTheir.Reserve(lengthHint);\r
+ m_arDiff3LinesBase.Reserve(lengthHint);\r
+ m_arDiff3LinesYour.Reserve(lengthHint);\r
+ m_arDiff3LinesTheir.Reserve(lengthHint);\r
+ }\r
+ catch (CMemoryException* e)\r
+ {\r
+ e->GetErrorMessage(m_sError.GetBuffer(255), 255);\r
+ m_sError.ReleaseBuffer();\r
+ return FALSE;\r
+ }\r
\r
// Is this a two-way diff?\r
if (IsBaseFileInUse() && IsYourFileInUse() && !IsTheirFileInUse())\r
}\r
\r
apr_pool_destroy (pool); // free the allocated memory\r
-\r
-\r
return TRUE;\r
}\r
\r
\r
bool\r
-CDiffData::DoTwoWayDiff(const CString& sBaseFilename, const CString& sYourFilename, DWORD dwIgnoreWS, bool bIgnoreEOL,apr_pool_t *pool)\r
+CDiffData::DoTwoWayDiff(const CString& sBaseFilename, const CString& sYourFilename, DWORD dwIgnoreWS, bool bIgnoreEOL, apr_pool_t * pool)\r
{\r
// convert CString filenames (UTF-16 or ANSI) to UTF-8\r
CStringA sBaseFilenameUtf8 = CUnicodeUtils::GetUTF8(sBaseFilename);\r
CStringA sYourFilenameUtf8 = CUnicodeUtils::GetUTF8(sYourFilename);\r
\r
-\r
svn_diff_t * diffYourBase = NULL;\r
svn_error_t * svnerr = NULL;\r
svn_diff_file_options_t * options = svn_diff_file_options_create(pool);\r
}\r
\r
bool\r
-CDiffData::DoThreeWayDiff(const CString& sBaseFilename, const CString& sYourFilename, const CString& sTheirFilename, DWORD dwIgnoreWS, bool bIgnoreEOL, bool bIgnoreCase,apr_pool_t *pool)\r
+CDiffData::DoThreeWayDiff(const CString& sBaseFilename, const CString& sYourFilename, const CString& sTheirFilename, DWORD dwIgnoreWS, bool bIgnoreEOL, bool bIgnoreCase, apr_pool_t * pool)\r
{\r
// convert CString filenames (UTF-16 or ANSI) to UTF-8\r
CStringA sBaseFilenameUtf8 = CUnicodeUtils::GetUTF8(sBaseFilename);\r
CStringA sYourFilenameUtf8 = CUnicodeUtils::GetUTF8(sYourFilename);\r
CStringA sTheirFilenameUtf8 = CUnicodeUtils::GetUTF8(sTheirFilename);\r
-\r
svn_diff_t * diffTheirYourBase = NULL;\r
svn_diff_file_options_t * options = svn_diff_file_options_create(pool);\r
options->ignore_eol_style = bIgnoreEOL;\r
\r
private:\r
bool DoTwoWayDiff(const CString& sBaseFilename, const CString& sYourFilename, DWORD dwIgnoreWS, bool bIgnoreEOL, apr_pool_t * pool);\r
- bool DoThreeWayDiff(const CString& sBaseFilename, const CString& sYourFilename, const CString& sTheirFilename, DWORD dwIgnoreWS, bool bIgnoreEOL, bool bIgnoreCase,apr_pool_t * pool);\r
+ bool DoThreeWayDiff(const CString& sBaseFilename, const CString& sYourFilename, const CString& sTheirFilename, DWORD dwIgnoreWS, bool bIgnoreEOL, bool bIgnoreCase, apr_pool_t * pool);\r
\r
\r
public:\r
// TortoiseMerge - a Diff/Patch program\r
\r
-// Copyright (C) 2007-2008 - TortoiseSVN\r
+// Copyright (C) 2007-2009 - TortoiseSVN\r
\r
// This program is free software; you can redistribute it and/or\r
// modify it under the terms of the GNU General Public License\r
if (bIgnoreCase)\r
sLine = sLine.MakeLower();\r
file.Write((LPCTSTR)sLine, sLine.GetLength()*sizeof(TCHAR));\r
- if ((ending == EOL_AUTOLINE)||(ending == EOL_NOENDING))\r
+ if (ending == EOL_AUTOLINE)\r
ending = m_LineEndings;\r
switch (ending)\r
{\r
sLine = sLine.MakeLower();\r
if ((m_bReturnAtEnd)||(i != GetCount()-1))\r
{\r
- if ((ending == EOL_AUTOLINE)||(ending == EOL_NOENDING))\r
+ if (ending == EOL_AUTOLINE)\r
ending = m_LineEndings;\r
switch (ending)\r
{\r
\r
if ((m_bReturnAtEnd)||(i != GetCount()-1))\r
{\r
- if ((ending == EOL_AUTOLINE)||(ending == EOL_NOENDING))\r
+ if (ending == EOL_AUTOLINE)\r
ending = m_LineEndings;\r
switch (ending)\r
{\r
// TortoiseMerge - a Diff/Patch program\r
\r
-// Copyright (C) 2006-2008 - TortoiseSVN\r
+// Copyright (C) 2006-2009 - TortoiseSVN\r
\r
// This program is free software; you can redistribute it and/or\r
// modify it under the terms of the GNU General Public License\r
m_pwndBottom->m_pViewData->SetLine(i, m_pViewData->GetLine(i));\r
bottomstate.linestates[i] = m_pwndBottom->m_pViewData->GetState(i);\r
m_pwndBottom->m_pViewData->SetState(i, m_pViewData->GetState(i));\r
+ m_pwndBottom->m_pViewData->SetLineEnding(i, m_pViewData->GetLineEnding(i));\r
if (m_pwndBottom->IsLineConflicted(i))\r
{\r
if (m_pViewData->GetState(i) == DIFFSTATE_CONFLICTEMPTY)\r
{\r
rightstate.difflines[i] = m_pwndRight->m_pViewData->GetLine(i);\r
m_pwndRight->m_pViewData->SetLine(i, m_pViewData->GetLine(i));\r
- DiffStates state = m_pViewData->GetState(i);\r
- switch (state)\r
+ m_pwndRight->m_pViewData->SetLineEnding(i, m_pViewData->GetLineEnding(i));\r
+ DiffStates state2 = m_pViewData->GetState(i);\r
+ switch (state2)\r
{\r
case DIFFSTATE_CONFLICTEMPTY:\r
case DIFFSTATE_UNKNOWN:\r
case DIFFSTATE_EMPTY:\r
rightstate.linestates[i] = m_pwndRight->m_pViewData->GetState(i);\r
- m_pwndRight->m_pViewData->SetState(i, state);\r
+ m_pwndRight->m_pViewData->SetState(i, state2);\r
break;\r
case DIFFSTATE_YOURSADDED:\r
case DIFFSTATE_IDENTICALADDED:\r
m_pwndBottom->m_pViewData->SetLine(i, m_pViewData->GetLine(i));\r
bottomstate.linestates[i] = m_pwndBottom->m_pViewData->GetState(i);\r
m_pwndBottom->m_pViewData->SetState(i, m_pViewData->GetState(i));\r
+ m_pwndBottom->m_pViewData->SetLineEnding(i, EOL_AUTOLINE);\r
if (m_pwndBottom->IsLineConflicted(i))\r
{\r
if (m_pViewData->GetState(i) == DIFFSTATE_CONFLICTEMPTY)\r
{\r
rightstate.difflines[i] = m_pwndRight->m_pViewData->GetLine(i);\r
m_pwndRight->m_pViewData->SetLine(i, m_pViewData->GetLine(i));\r
- DiffStates state = m_pViewData->GetState(i);\r
- switch (state)\r
+ m_pwndRight->m_pViewData->SetLineEnding(i, EOL_AUTOLINE);\r
+ DiffStates state2 = m_pViewData->GetState(i);\r
+ switch (state2)\r
{\r
case DIFFSTATE_ADDED:\r
case DIFFSTATE_CONFLICTADDED:\r
case DIFFSTATE_YOURSADDED:\r
case DIFFSTATE_EMPTY:\r
rightstate.linestates[i] = m_pwndRight->m_pViewData->GetState(i);\r
- m_pwndRight->m_pViewData->SetState(i, state);\r
+ m_pwndRight->m_pViewData->SetState(i, state2);\r
break;\r
case DIFFSTATE_IDENTICALREMOVED:\r
case DIFFSTATE_REMOVED:\r
{\r
identcount = m_arLeftIdent.GetAt(i);\r
state = m_arLeftState.GetAt(i);\r
- COLORREF color, color2;\r
CDiffColors::GetInstance().GetColors((DiffStates)state, color, color2);\r
if ((DiffStates)state != DIFFSTATE_NORMAL)\r
cacheDC.FillSolidRect(rect.left, height*linecount/m_nLines, \r
{\r
identcount = m_arRightIdent.GetAt(i);\r
state = m_arRightState.GetAt(i);\r
- COLORREF color, color2;\r
CDiffColors::GetInstance().GetColors((DiffStates)state, color, color2);\r
if ((DiffStates)state != DIFFSTATE_NORMAL)\r
cacheDC.FillSolidRect(rect.left + (width*2/3), height*linecount/m_nLines, \r
{\r
identcount = m_arBottomIdent.GetAt(i);\r
state = m_arBottomState.GetAt(i);\r
- COLORREF color, color2;\r
CDiffColors::GetInstance().GetColors((DiffStates)state, color, color2);\r
if ((DiffStates)state != DIFFSTATE_NORMAL)\r
cacheDC.FillSolidRect(rect.left + (width/3), height*linecount/m_nLines, \r
{\r
for (int j=fishstart; j<fishstart+fishheight; j++)\r
{\r
- COLORREF color = cacheDC.GetPixel(i, j);\r
+ color = cacheDC.GetPixel(i, j);\r
int r,g,b;\r
r = max(GetRValue(color)-20, 0);\r
g = max(GetGValue(color)-20, 0);\r
// TortoiseMerge - a Diff/Patch program\r
\r
-// Copyright (C) 2004-2008 - TortoiseSVN\r
+// Copyright (C) 2004-2009 - TortoiseSVN\r
\r
// This program is free software; you can redistribute it and/or\r
// modify it under the terms of the GNU General Public License\r
m_bInlineWordDiff = true;\r
m_bLineDiff = true;\r
m_bLocatorBar = true;\r
+ m_nMoveMovesToIgnore = 0;\r
theApp.m_nAppLook = theApp.GetInt(_T("ApplicationLook"), ID_VIEW_APPLOOK_VS_2005);\r
}\r
\r
\r
m_wndLocatorBar.EnableGripper(FALSE);\r
m_wndLineDiffBar.EnableGripper(FALSE);\r
+\r
return 0;\r
}\r
\r
m_Data.m_sDiffFile = dlg.m_sUnifiedDiffFile;\r
m_Data.m_sPatchPath = dlg.m_sPatchDirectory;\r
m_Data.m_mergedFile.SetOutOfUse();\r
-// g_crasher.AddFile((LPCSTR)(LPCTSTR)dlg.m_sBaseFile, (LPCSTR)(LPCTSTR)_T("Basefile"));\r
-// g_crasher.AddFile((LPCSTR)(LPCTSTR)dlg.m_sTheirFile, (LPCSTR)(LPCTSTR)_T("Theirfile"));\r
-// g_crasher.AddFile((LPCSTR)(LPCTSTR)dlg.m_sYourFile, (LPCSTR)(LPCTSTR)_T("Yourfile"));\r
-// g_crasher.AddFile((LPCSTR)(LPCTSTR)dlg.m_sUnifiedDiffFile, (LPCSTR)(LPCTSTR)_T("Difffile"));\r
+ g_crasher.AddFile((LPCSTR)(LPCTSTR)dlg.m_sBaseFile, (LPCSTR)(LPCTSTR)_T("Basefile"));\r
+ g_crasher.AddFile((LPCSTR)(LPCTSTR)dlg.m_sTheirFile, (LPCSTR)(LPCTSTR)_T("Theirfile"));\r
+ g_crasher.AddFile((LPCSTR)(LPCTSTR)dlg.m_sYourFile, (LPCSTR)(LPCTSTR)_T("Yourfile"));\r
+ g_crasher.AddFile((LPCSTR)(LPCTSTR)dlg.m_sUnifiedDiffFile, (LPCSTR)(LPCTSTR)_T("Difffile"));\r
\r
if (!m_Data.IsBaseFileInUse() && m_Data.IsTheirFileInUse() && m_Data.IsYourFileInUse())\r
{\r
m_Data.SetBlame(m_bBlame);\r
m_bHasConflicts = false;\r
CBaseView* pwndActiveView = m_pwndLeftView;\r
+ int nOldLine = m_pwndLeftView ? m_pwndLeftView->m_nTopLine : -1;\r
int nOldLineNumber =\r
m_pwndLeftView && m_pwndLeftView->m_pViewData ?\r
m_pwndLeftView->m_pViewData->GetLineNumber(m_pwndLeftView->m_nTopLine) : -1;\r
UpdateLayout();\r
SetActiveView(pwndActiveView);\r
\r
- if (bRetainPosition && pwndActiveView->m_pViewData && nOldLineNumber >= 0)\r
+ if (bRetainPosition && m_pwndLeftView->m_pViewData)\r
{\r
- if (int n = pwndActiveView->m_pViewData->FindLineNumber(nOldLineNumber))\r
- {\r
- pwndActiveView->ScrollAllToLine(n);\r
- POINT p;\r
- p.x = 0;\r
- p.y = n;\r
- pwndActiveView->SetCaretPosition(p);\r
- }\r
+ int n = nOldLineNumber;\r
+ if (n >= 0)\r
+ n = m_pwndLeftView->m_pViewData->FindLineNumber(n);\r
+ if (n < 0)\r
+ n = nOldLine;\r
+\r
+ m_pwndLeftView->ScrollAllToLine(n);\r
+ POINT p;\r
+ p.x = 0;\r
+ p.y = n;\r
+ m_pwndLeftView->SetCaretPosition(p);\r
}\r
else\r
{\r
bool bGoFirstDiff = (0 != (DWORD)CRegDWORD(_T("Software\\TortoiseMerge\\FirstDiffOnLoad"), TRUE));\r
- if (bGoFirstDiff)\r
+ if (bGoFirstDiff) {\r
pwndActiveView->GoToFirstDifference();\r
+ // Ignore the first few Mouse Move messages, so that the line diff stays on\r
+ // the first diff line until the user actually moves the mouse\r
+ m_nMoveMovesToIgnore = 3; \r
+ }\r
+\r
}\r
// Avoid incorrect rendering of active pane.\r
m_pwndBottomView->ScrollToChar(0);\r
\r
void CMainFrame::OnSize(UINT nType, int cx, int cy)\r
{\r
- if (m_bInitSplitter && nType != SIZE_MINIMIZED)\r
- {\r
+ if (m_bInitSplitter && nType != SIZE_MINIMIZED)\r
+ {\r
UpdateLayout();\r
- }\r
- CFrameWndEx::OnSize(nType, cx, cy);\r
+ }\r
+ CFrameWndEx::OnSize(nType, cx, cy);\r
}\r
\r
void CMainFrame::OnViewWhitespaces()\r
LoadViews(true);\r
}\r
\r
+void CMainFrame::ShowDiffBar(bool bShow)\r
+{\r
+ if (bShow)\r
+ {\r
+ // restore the line diff bar\r
+ m_wndLineDiffBar.ShowPane(m_bLineDiff, false, true);\r
+ m_wndLineDiffBar.DocumentUpdated();\r
+ m_wndLocatorBar.ShowPane(m_bLocatorBar, false, true);\r
+ m_wndLocatorBar.DocumentUpdated();\r
+ }\r
+ else\r
+ {\r
+ // in one way view, hide the line diff bar\r
+ m_wndLineDiffBar.ShowPane(false, false, true);\r
+ m_wndLineDiffBar.DocumentUpdated();\r
+ }\r
+}\r
+\r
int CMainFrame::CheckResolved()\r
{\r
//only in three way diffs can be conflicts!\r
do \r
{\r
last++;\r
- } while(last<pViewData->GetCount() && (pViewData->GetState(last)==DIFFSTATE_CONFLICTED)||(pViewData->GetState(last)==DIFFSTATE_CONFLICTED_IGNORED));\r
+ } while((last<pViewData->GetCount()) && ((pViewData->GetState(last)==DIFFSTATE_CONFLICTED)||(pViewData->GetState(last)==DIFFSTATE_CONFLICTED_IGNORED)));\r
file.Add(_T("<<<<<<< .mine"), EOL_NOENDING);\r
for (int j=first; j<last; j++)\r
{\r
}\r
if (((DWORD)CRegDWORD(_T("Software\\TortoiseMerge\\Backup"))) != 0)\r
{\r
- DeleteFile(m_Data.m_mergedFile.GetFilename() + _T(".bak"));\r
- MoveFile(m_Data.m_mergedFile.GetFilename(), m_Data.m_mergedFile.GetFilename() + _T(".bak"));\r
+ MoveFileEx(m_Data.m_mergedFile.GetFilename(), m_Data.m_mergedFile.GetFilename() + _T(".bak"), MOVEFILE_COPY_ALLOWED | MOVEFILE_REPLACE_EXISTING | MOVEFILE_WRITE_THROUGH);\r
}\r
if (SaveFile(m_Data.m_mergedFile.GetFilename())==0)\r
{\r
// TortoiseMerge - a Diff/Patch program\r
\r
-// Copyright (C) 2006-2008 - TortoiseSVN\r
+// Copyright (C) 2006-2009 - TortoiseSVN\r
\r
// This program is free software; you can redistribute it and/or\r
// modify it under the terms of the GNU General Public License\r
afx_msg void OnViewLinediffbar();\r
afx_msg void OnUpdateViewLocatorbar(CCmdUI *pCmdUI);\r
afx_msg void OnViewLocatorbar();\r
+ afx_msg void OnEditUseleftblock();\r
+ afx_msg void OnUpdateEditUseleftblock(CCmdUI *pCmdUI);\r
+ afx_msg void OnEditUseleftfile();\r
+ afx_msg void OnUpdateEditUseleftfile(CCmdUI *pCmdUI);\r
+ afx_msg void OnEditUseblockfromleftbeforeright();\r
+ afx_msg void OnUpdateEditUseblockfromleftbeforeright(CCmdUI *pCmdUI);\r
+ afx_msg void OnEditUseblockfromrightbeforeleft();\r
+ afx_msg void OnUpdateEditUseblockfromrightbeforeleft(CCmdUI *pCmdUI);\r
\r
DECLARE_MESSAGE_MAP()\r
protected:\r
bool m_bInlineWordDiff;\r
bool m_bLineDiff;\r
bool m_bLocatorBar;\r
+\r
public:\r
CLeftView * m_pwndLeftView;\r
CRightView * m_pwndRightView;\r
CDiffData m_Data;\r
bool m_bReadOnly;\r
bool m_bBlame;\r
- afx_msg void OnEditUseleftblock();\r
- afx_msg void OnUpdateEditUseleftblock(CCmdUI *pCmdUI);\r
- afx_msg void OnEditUseleftfile();\r
- afx_msg void OnUpdateEditUseleftfile(CCmdUI *pCmdUI);\r
- afx_msg void OnEditUseblockfromleftbeforeright();\r
- afx_msg void OnUpdateEditUseblockfromleftbeforeright(CCmdUI *pCmdUI);\r
- afx_msg void OnEditUseblockfromrightbeforeleft();\r
- afx_msg void OnUpdateEditUseblockfromrightbeforeleft(CCmdUI *pCmdUI);\r
+ int m_nMoveMovesToIgnore;\r
+\r
+ void ShowDiffBar(bool bShow);\r
};\r
\r
\r
// TortoiseMerge - a Diff/Patch program\r
\r
-// Copyright (C) 2004-2008 - TortoiseSVN\r
+// Copyright (C) 2004-2009 - TortoiseSVN\r
\r
// This program is free software; you can redistribute it and/or\r
// modify it under the terms of the GNU General Public License\r
#include "UnicodeUtils.h"\r
#include "DirFileEnum.h"\r
#include "TortoiseMerge.h"\r
-//#include "svn_wc.h"\r
+#include "svn_wc.h"\r
#include "GitAdminDir.h"\r
#include "Patch.h"\r
\r
EOL ending = EOL_NOENDING;\r
INT_PTR nIndex = 0;\r
INT_PTR nLineCount = 0;\r
-// g_crasher.AddFile((LPCSTR)(LPCTSTR)filename, (LPCSTR)(LPCTSTR)_T("unified diff file"));\r
+ g_crasher.AddFile((LPCSTR)(LPCTSTR)filename, (LPCSTR)(LPCTSTR)_T("unified diff file"));\r
\r
CFileTextLines PatchLines;\r
if (!PatchLines.Load(filename))\r
CString sPatchFile = sBaseFile.IsEmpty() ? sPath : sBaseFile;\r
if (PathFileExists(sPatchFile))\r
{\r
-// g_crasher.AddFile((LPCSTR)(LPCTSTR)sPatchFile, (LPCSTR)(LPCTSTR)_T("File to patch"));\r
+ g_crasher.AddFile((LPCSTR)(LPCTSTR)sPatchFile, (LPCSTR)(LPCTSTR)_T("File to patch"));\r
}\r
CFileTextLines PatchLines;\r
CFileTextLines PatchLinesResult;\r
{\r
if ((lAddLine < PatchLines.GetCount())&&(sPatchLine.Compare(PatchLines.GetAt(lAddLine))==0))\r
lAddLine++;\r
+ else if (((lAddLine + 1) < PatchLines.GetCount())&&(sPatchLine.Compare(PatchLines.GetAt(lAddLine+1))==0))\r
+ lAddLine += 2;\r
else if ((lRemoveLine < PatchLines.GetCount())&&(sPatchLine.Compare(PatchLines.GetAt(lRemoveLine))==0))\r
lRemoveLine++;\r
else\r
bool isDir = false;\r
CString subpath;\r
CDirFileEnum filefinder(path);\r
-#if 0\r
while (filefinder.NextFile(subpath, &isDir))\r
{\r
if (!isDir)\r
continue;\r
- if (g_SVNAdminDir.IsAdminDirPath(subpath))\r
+ if (g_GitAdminDir.IsAdminDirPath(subpath))\r
continue;\r
if (CountMatches(subpath) > (GetNumberOfFiles()/3))\r
return subpath;\r
}\r
-#endif\r
\r
// if a patch file only contains newly added files\r
// we can't really find the correct path.\r
// TortoiseMerge - a Diff/Patch program\r
\r
-// Copyright (C) 2006-2008 - TortoiseSVN\r
+// Copyright (C) 2006-2009 - TortoiseSVN\r
\r
// This program is free software; you can redistribute it and/or\r
// modify it under the terms of the GNU General Public License\r
m_pwndBottom->m_pViewData->SetLine(i, m_pViewData->GetLine(i));\r
bottomstate.linestates[i] = m_pwndBottom->m_pViewData->GetState(i);\r
m_pwndBottom->m_pViewData->SetState(i, m_pViewData->GetState(i));\r
+ m_pwndBottom->m_pViewData->SetLineEnding(i, m_pViewData->GetLineEnding(i));\r
if (m_pwndBottom->IsLineConflicted(i))\r
m_pwndBottom->m_pViewData->SetState(i, DIFFSTATE_CONFLICTRESOLVED);\r
}\r
{\r
rightstate.difflines[i] = m_pViewData->GetLine(i);\r
m_pViewData->SetLine(i, m_pwndLeft->m_pViewData->GetLine(i));\r
+ m_pViewData->SetLineEnding(i, m_pwndLeft->m_pViewData->GetLineEnding(i));\r
DiffStates state = m_pwndLeft->m_pViewData->GetState(i);\r
switch (state)\r
{\r
m_pwndBottom->m_pViewData->SetLine(i, m_pViewData->GetLine(i));\r
bottomstate.linestates[i] = m_pwndBottom->m_pViewData->GetState(i);\r
m_pwndBottom->m_pViewData->SetState(i, m_pViewData->GetState(i));\r
+ m_pwndBottom->m_pViewData->SetLineEnding(i, EOL_AUTOLINE);\r
if (m_pwndBottom->IsLineConflicted(i))\r
{\r
if (m_pViewData->GetState(i) == DIFFSTATE_CONFLICTEMPTY)\r
{\r
rightstate.difflines[i] = m_pViewData->GetLine(i);\r
m_pViewData->SetLine(i, m_pwndLeft->m_pViewData->GetLine(i));\r
+ m_pViewData->SetLineEnding(i, EOL_AUTOLINE);\r
DiffStates state = m_pwndLeft->m_pViewData->GetState(i);\r
switch (state)\r
{\r
#include "stdafx.h"\r
#include "TortoiseMerge.h"\r
#include "DirFileEnum.h"\r
-#include "..\\version.h"\r
+#include "version.h"\r
#include "AppUtils.h"\r
#include "PathUtils.h"\r
#include "SetMainPage.h"\r
// TortoiseMerge - a Diff/Patch program\r
\r
-// Copyright (C) 2006-2008 - TortoiseSVN\r
+// Copyright (C) 2006-2009 - TortoiseSVN\r
\r
// This program is free software; you can redistribute it and/or\r
// modify it under the terms of the GNU General Public License\r
#include "MainFrm.h"\r
#include "AboutDlg.h"\r
#include "CmdLineParser.h"\r
-#include "..\\version.h"\r
+#include "version.h"\r
#include "AppUtils.h"\r
#include "PathUtils.h"\r
#include "BrowseFolder.h"\r
+#include "DirFileEnum.h"\r
\r
#ifdef _DEBUG\r
#define new DEBUG_NEW\r
\r
// The one and only CTortoiseMergeApp object\r
CTortoiseMergeApp theApp;\r
-//CCrashReport g_crasher("crashreports@tortoisesvn.tigris.org", "Crash Report for TortoiseMerge " APP_X64_STRING " : " STRPRODUCTVER, TRUE);\r
+CCrashReport g_crasher("tortoisesvn@gmail.com", "Crash Report for TortoiseMerge " APP_X64_STRING " : " STRPRODUCTVER, TRUE);\r
\r
// CTortoiseMergeApp initialization\r
BOOL CTortoiseMergeApp::InitInstance()\r
CMFCVisualManager::SetDefaultManager(RUNTIME_CLASS(CMFCVisualManagerWindows));\r
CMFCButton::EnableWindowsTheming();\r
//set the resource dll for the required language\r
- CRegDWORD loc = CRegDWORD(_T("Software\\TortoiseGit\\LanguageID"), 1033);\r
+ CRegDWORD loc = CRegDWORD(_T("Software\\TortoiseSVN\\LanguageID"), 1033);\r
long langId = loc;\r
CString langDll;\r
HINSTANCE hInst = NULL;\r
sHelppath = CPathUtils::GetAppParentDirectory() + _T("Languages\\TortoiseMerge_en.chm");\r
do\r
{\r
- GetLocaleInfo(MAKELCID(langId, SORT_DEFAULT), LOCALE_SISO639LANGNAME, buf, sizeof(buf));\r
+ GetLocaleInfo(MAKELCID(langId, SORT_DEFAULT), LOCALE_SISO639LANGNAME, buf, sizeof(buf)/sizeof(TCHAR));\r
CString sLang = _T("_");\r
sLang += buf;\r
sHelppath.Replace(_T("_en"), sLang);\r
break;\r
}\r
sHelppath.Replace(sLang, _T("_en"));\r
- GetLocaleInfo(MAKELCID(langId, SORT_DEFAULT), LOCALE_SISO3166CTRYNAME, buf, sizeof(buf));\r
+ GetLocaleInfo(MAKELCID(langId, SORT_DEFAULT), LOCALE_SISO3166CTRYNAME, buf, sizeof(buf)/sizeof(TCHAR));\r
sLang += _T("_");\r
sLang += buf;\r
sHelppath.Replace(_T("_en"), sLang);\r
langId = 0;\r
} while (langId);\r
setlocale(LC_ALL, ""); \r
+ // We need to explicitly set the thread locale to the system default one to avoid possible problems with saving files in its original codepage\r
+ // The problems occures when the language of OS differs from the regional settings\r
+ // See the details here: http://connect.microsoft.com/VisualStudio/feedback/ViewFeedback.aspx?FeedbackID=100887\r
+ SetThreadLocale(LOCALE_SYSTEM_DEFAULT);\r
\r
// InitCommonControls() is required on Windows XP if an application\r
// manifest specifies use of ComCtl32.dll version 6 or later to enable\r
pFrame->ActivateFrame();\r
pFrame->ShowWindow(SW_SHOW);\r
pFrame->UpdateWindow();\r
+ pFrame->ShowDiffBar(!pFrame->m_bOneWay);\r
if (!pFrame->m_Data.IsBaseFileInUse() && pFrame->m_Data.m_sPatchPath.IsEmpty() && pFrame->m_Data.m_sDiffFile.IsEmpty())\r
{\r
pFrame->OnFileOpen();\r
return TRUE;\r
}\r
+\r
return pFrame->LoadViews();\r
}\r
\r
TCHAR * path = new TCHAR[len+1];\r
TCHAR * tempF = new TCHAR[len+100];\r
GetTempPath (len+1, path);\r
- GetTempFileName (path, TEXT("svn"), 0, tempF);\r
+ GetTempFileName (path, TEXT("tsm"), 0, tempF);\r
std::wstring sTempFile = std::wstring(tempF);\r
delete [] path;\r
delete [] tempF;\r
}\r
return 0;\r
}\r
+\r
+int CTortoiseMergeApp::ExitInstance()\r
+{\r
+ // Look for temporary files left around by TortoiseMerge and\r
+ // remove them. But only delete 'old' files \r
+ DWORD len = ::GetTempPath(0, NULL);\r
+ TCHAR * path = new TCHAR[len + 100];\r
+ len = ::GetTempPath (len+100, path);\r
+ if (len != 0)\r
+ {\r
+ CSimpleFileFind finder = CSimpleFileFind(path, _T("*tsm*.*"));\r
+ FILETIME systime_;\r
+ ::GetSystemTimeAsFileTime(&systime_);\r
+ __int64 systime = (((_int64)systime_.dwHighDateTime)<<32) | ((__int64)systime_.dwLowDateTime);\r
+ while (finder.FindNextFileNoDirectories())\r
+ {\r
+ CString filepath = finder.GetFilePath();\r
+ HANDLE hFile = ::CreateFile(filepath, GENERIC_READ, FILE_SHARE_READ, NULL, OPEN_EXISTING, NULL, NULL);\r
+ if (hFile != INVALID_HANDLE_VALUE)\r
+ {\r
+ FILETIME createtime_;\r
+ if (::GetFileTime(hFile, &createtime_, NULL, NULL))\r
+ {\r
+ ::CloseHandle(hFile);\r
+ __int64 createtime = (((_int64)createtime_.dwHighDateTime)<<32) | ((__int64)createtime_.dwLowDateTime);\r
+ if ((createtime + 864000000000) < systime) //only delete files older than a day\r
+ {\r
+ ::SetFileAttributes(filepath, FILE_ATTRIBUTE_NORMAL);\r
+ ::DeleteFile(filepath);\r
+ }\r
+ }\r
+ else\r
+ ::CloseHandle(hFile);\r
+ }\r
+ }\r
+ } \r
+ delete[] path; \r
+\r
+ return CWinAppEx::ExitInstance();\r
+}\r
#endif\r
\r
#include "resource.h" // main symbols\r
-//#include "CrashReport.h"\r
+#include "CrashReport.h"\r
\r
\r
/**\r
// Overrides\r
public:\r
virtual BOOL InitInstance();\r
+ virtual int ExitInstance();\r
\r
// Implementation\r
UINT m_nAppLook;\r
};\r
\r
extern CTortoiseMergeApp theApp;\r
-//extern CCrashReport g_crasher;\r
+extern CCrashReport g_crasher;\r
<Configurations>\r
<Configuration\r
Name="Debug|Win32"\r
- OutputDirectory="..\bin\Debug\bin"\r
- IntermediateDirectory="..\obj\TortoiseMerge\Debug"\r
+ OutputDirectory="..\..\bin\Debug\bin"\r
+ IntermediateDirectory="..\..\obj\TortoiseMerge\Debug"\r
ConfigurationType="1"\r
UseOfMFC="2"\r
CharacterSet="1"\r
<Tool\r
Name="VCCLCompilerTool"\r
Optimization="0"\r
- AdditionalIncludeDirectories="libsvn_diff;svninclude;..\Utils;..\Git;..\Utils\MiscUI;"\r
+ AdditionalIncludeDirectories="..\git;.\svninclude;..\..\ext\apr\include;"..\..\ext\apr-util\include";..\..\ext\SubVersion\subversion\include;.\libsvn_diff;..\Utils;..\Utils\NewMenu;..\Utils\ColourPickerXP;..\TortoiseMerge;..\crashrpt;..\;..\SVN;..\Utils\MiscUI"\r
PreprocessorDefinitions="WIN32;_WINDOWS;_DEBUG;APR_DECLARE_STATIC;APU_DECLARE_STATIC"\r
MinimalRebuild="true"\r
BasicRuntimeChecks="3"\r
/>\r
<Tool\r
Name="VCLinkerTool"\r
- AdditionalDependencies="Crypt32.lib shlwapi.lib Version.lib"\r
+ AdditionalDependencies="Crypt32.lib shlwapi.lib Version.lib ../../bin\debug\bin\libapr_tsvn.lib ../../bin\debug\bin\libaprutil_tsvn.lib ../../ext/libintl/libintl3-win32/lib/intl3_tsvn.lib ../../bin\debug\bin\xml.lib libcpmt.lib"\r
LinkIncremental="2"\r
GenerateDebugInformation="true"\r
SubSystem="2"\r
Name="VCCLCompilerTool"\r
Optimization="3"\r
FavorSizeOrSpeed="2"\r
- AdditionalIncludeDirectories="libsvn_diff;svninclude;..\Utils;..\Git;..\Utils\MiscUI;"\r
+ AdditionalIncludeDirectories="..\git;.\svninclude;..\..\ext\apr\include;"..\..\ext\apr-util\include";..\..\ext\SubVersion\subversion\include;.\libsvn_diff;..\Utils;..\Utils\NewMenu;..\Utils\ColourPickerXP;..\TortoiseMerge;..\crashrpt;..\;..\SVN;..\Utils\MiscUI"\r
PreprocessorDefinitions="WIN32;_WINDOWS;NDEBUG;APR_DECLARE_STATIC;APU_DECLARE_STATIC"\r
MinimalRebuild="false"\r
RuntimeLibrary="2"\r
/>\r
<Tool\r
Name="VCLinkerTool"\r
- AdditionalDependencies="Crypt32.lib shlwapi.lib Version.lib"\r
+ AdditionalDependencies="Crypt32.lib shlwapi.lib Version.lib ../../ext/Subversion\release_win32\libsvn_diff-nonet.lib ../../ext/Subversion\release_win32\libsvn_subr-nonet.lib ../../ext/Subversion\release_win32\libsvn_client-nonet.lib ../../ext/apr\release_win32\libapr_tsvn.lib ../../ext/apr-util\release_win32\libaprutil_tsvn.lib ../../ext/libintl/libintl3-win32/lib/intl3_tsvn.lib ../../ext/Subversion\release_win32\libsvn_wc-nonet.lib ../../ext/Subversion\release_win32\libsvn_delta-nonet.lib ../../ext/apr-util\xml\expat\lib\release_win32\xml.lib"\r
LinkIncremental="1"\r
GenerateDebugInformation="true"\r
SubSystem="2"\r
Name="VCCLCompilerTool"\r
Optimization="3"\r
FavorSizeOrSpeed="2"\r
- AdditionalIncludeDirectories="libsvn_diff;svninclude;..\Utils;..\Git;..\Utils\MiscUI;"\r
+ AdditionalIncludeDirectories="..\git;.\svninclude;..\..\ext\apr\include;"..\..\ext\apr-util\include";..\..\ext\SubVersion\subversion\include;.\libsvn_diff;..\Utils;..\Utils\NewMenu;..\Utils\ColourPickerXP;..\TortoiseMerge;..\crashrpt;..\;..\SVN;..\Utils\MiscUI"\r
PreprocessorDefinitions="WIN32;_WINDOWS;NDEBUG;APR_DECLARE_STATIC;APU_DECLARE_STATIC"\r
MinimalRebuild="false"\r
RuntimeLibrary="0"\r
Name="VCCLCompilerTool"\r
Optimization="0"\r
FavorSizeOrSpeed="2"\r
- AdditionalIncludeDirectories="libsvn_diff;svninclude;..\Utils;..\Git;..\Utils\MiscUI;"\r
+ AdditionalIncludeDirectories="..\git;.\svninclude;..\..\ext\apr\include;"..\..\ext\apr-util\include";..\..\ext\SubVersion\subversion\include;.\libsvn_diff;..\Utils;..\Utils\NewMenu;..\Utils\ColourPickerXP;..\TortoiseMerge;..\crashrpt;..\;..\SVN;..\Utils\MiscUI"\r
PreprocessorDefinitions="WIN32;_WINDOWS;_DEBUG;APR_DECLARE_STATIC;APU_DECLARE_STATIC"\r
MinimalRebuild="false"\r
RuntimeLibrary="1"\r
>\r
</File>\r
<File\r
+ RelativePath="..\Git\GitAdminDir.cpp"\r
+ >\r
+ </File>\r
+ <File\r
RelativePath=".\LeftView.cpp"\r
>\r
</File>\r
</File>\r
</Filter>\r
<Filter\r
+ Name="Resource Files"\r
+ Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx"\r
+ UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}"\r
+ >\r
+ <File\r
+ RelativePath="..\Resources\download.avi"\r
+ >\r
+ </File>\r
+ <File\r
+ RelativePath="..\Resources\lineadded.ico"\r
+ >\r
+ </File>\r
+ <File\r
+ RelativePath="..\Resources\lineconflicted.ico"\r
+ >\r
+ </File>\r
+ <File\r
+ RelativePath="..\Resources\lineconflictedignored.ico"\r
+ >\r
+ </File>\r
+ <File\r
+ RelativePath="..\Resources\lineedited.ico"\r
+ >\r
+ </File>\r
+ <File\r
+ RelativePath="..\Resources\LineEndingCR.ico"\r
+ >\r
+ </File>\r
+ <File\r
+ RelativePath="..\Resources\LineEndingCRLF.ico"\r
+ >\r
+ </File>\r
+ <File\r
+ RelativePath="..\Resources\LineEndingLF.ico"\r
+ >\r
+ </File>\r
+ <File\r
+ RelativePath="..\Resources\lineequal.ico"\r
+ >\r
+ </File>\r
+ <File\r
+ RelativePath="..\Resources\lineremoved.ico"\r
+ >\r
+ </File>\r
+ <File\r
+ RelativePath="..\Resources\linewhitespace.ico"\r
+ >\r
+ </File>\r
+ <File\r
+ RelativePath="..\Resources\Toolbar.bmp"\r
+ >\r
+ </File>\r
+ <File\r
+ RelativePath="..\Resources\TortoiseMerge.ico"\r
+ >\r
+ </File>\r
+ <File\r
+ RelativePath="..\Resources\TortoiseMerge.rc2"\r
+ >\r
+ </File>\r
+ <File\r
+ RelativePath="..\Resources\tortoisemerge_logoflipped.bmp"\r
+ >\r
+ </File>\r
+ <File\r
+ RelativePath="..\Resources\TortoiseMergeENG.rc"\r
+ >\r
+ </File>\r
+ <File\r
+ RelativePath="..\Resources\tortoisesvn_logoflipped.bmp"\r
+ >\r
+ </File>\r
+ <File\r
+ RelativePath="..\Resources\ttf_glyph.bmp"\r
+ >\r
+ </File>\r
+ </Filter>\r
+ <Filter\r
Name="Utils"\r
>\r
<Filter\r
</Filter>\r
</Filter>\r
<Filter\r
- Name="libsvndiff"\r
+ Name="Libdiff"\r
>\r
<File\r
- RelativePath=".\svninclude\apr.h"\r
- >\r
- </File>\r
- <File\r
- RelativePath=".\svninclude\apr_errno.h"\r
- >\r
- </File>\r
- <File\r
- RelativePath=".\svninclude\apr_file_info.h"\r
- >\r
- </File>\r
- <File\r
- RelativePath=".\svninclude\apr_file_io.h"\r
- >\r
- </File>\r
- <File\r
- RelativePath=".\svninclude\apr_general.h"\r
- >\r
- </File>\r
- <File\r
- RelativePath=".\svninclude\apr_getopt.h"\r
- >\r
- </File>\r
- <File\r
- RelativePath=".\svninclude\apr_hash.h"\r
- >\r
- </File>\r
- <File\r
- RelativePath=".\svninclude\apr_mmap.h"\r
- >\r
- </File>\r
- <File\r
- RelativePath=".\svninclude\apr_pools.h"\r
- >\r
- </File>\r
- <File\r
- RelativePath=".\svninclude\apr_sha1.h"\r
- >\r
- </File>\r
- <File\r
- RelativePath=".\svninclude\apr_strings.h"\r
- >\r
- </File>\r
- <File\r
- RelativePath=".\svninclude\apr_tables.h"\r
- >\r
- </File>\r
- <File\r
- RelativePath=".\svninclude\apr_time.h"\r
- >\r
- </File>\r
- <File\r
- RelativePath=".\svninclude\apr_want.h"\r
- >\r
- </File>\r
- <File\r
- RelativePath=".\libsvn_diff\diff.c"\r
+ RelativePath=".\libsvn_diff\adler32.c"\r
>\r
<FileConfiguration\r
Name="Debug|Win32"\r
</FileConfiguration>\r
</File>\r
<File\r
- RelativePath=".\libsvn_diff\diff.h"\r
- >\r
- </File>\r
- <File\r
- RelativePath=".\libsvn_diff\diff3.c"\r
+ RelativePath=".\libsvn_diff\checksum.c"\r
>\r
<FileConfiguration\r
Name="Debug|Win32"\r
</FileConfiguration>\r
</File>\r
<File\r
- RelativePath=".\libsvn_diff\diff4.c"\r
+ RelativePath=".\libsvn_diff\cmdline.c"\r
>\r
<FileConfiguration\r
Name="Debug|Win32"\r
</FileConfiguration>\r
</File>\r
<File\r
- RelativePath=".\libsvn_diff\diff_file.c"\r
+ RelativePath=".\libsvn_diff\compress.c"\r
>\r
<FileConfiguration\r
Name="Debug|Win32"\r
</FileConfiguration>\r
</File>\r
<File\r
- RelativePath=".\libsvn_diff\lcs.c"\r
+ RelativePath=".\libsvn_diff\crc32.c"\r
>\r
<FileConfiguration\r
Name="Debug|Win32"\r
</FileConfiguration>\r
</File>\r
<File\r
- RelativePath=".\libsvn_diff\porting.c"\r
+ RelativePath=".\libsvn_diff\ctype.c"\r
>\r
<FileConfiguration\r
Name="Debug|Win32"\r
</FileConfiguration>\r
</File>\r
<File\r
- RelativePath=".\svninclude\svn_error.h"\r
- >\r
- </File>\r
- <File\r
- RelativePath=".\svninclude\svn_error_codes.h"\r
- >\r
- </File>\r
- <File\r
- RelativePath=".\svninclude\svn_pools.h"\r
- >\r
- </File>\r
- <File\r
- RelativePath=".\svninclude\svn_string.h"\r
- >\r
- </File>\r
- <File\r
- RelativePath=".\svninclude\svn_types.h"\r
+ RelativePath=".\libsvn_diff\deflate.c"\r
>\r
+ <FileConfiguration\r
+ Name="Debug|Win32"\r
+ >\r
+ <Tool\r
+ Name="VCCLCompilerTool"\r
+ UsePrecompiledHeader="0"\r
+ />\r
+ </FileConfiguration>\r
+ <FileConfiguration\r
+ Name="Release|Win32"\r
+ >\r
+ <Tool\r
+ Name="VCCLCompilerTool"\r
+ UsePrecompiledHeader="0"\r
+ />\r
+ </FileConfiguration>\r
+ <FileConfiguration\r
+ Name="release_static|Win32"\r
+ >\r
+ <Tool\r
+ Name="VCCLCompilerTool"\r
+ UsePrecompiledHeader="0"\r
+ />\r
+ </FileConfiguration>\r
+ <FileConfiguration\r
+ Name="debug_static|Win32"\r
+ >\r
+ <Tool\r
+ Name="VCCLCompilerTool"\r
+ UsePrecompiledHeader="0"\r
+ />\r
+ </FileConfiguration>\r
</File>\r
<File\r
- RelativePath=".\libsvn_diff\token.c"\r
+ RelativePath=".\libsvn_diff\diff.c"\r
>\r
<FileConfiguration\r
Name="Debug|Win32"\r
/>\r
</FileConfiguration>\r
</File>\r
- </Filter>\r
- <Filter\r
- Name="Resource Files"\r
- Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx"\r
- UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}"\r
- >\r
<File\r
- RelativePath="..\Resources\download.avi"\r
+ RelativePath=".\libsvn_diff\diff.h"\r
>\r
</File>\r
<File\r
- RelativePath="..\Resources\lineadded.ico"\r
+ RelativePath=".\libsvn_diff\diff3.c"\r
>\r
+ <FileConfiguration\r
+ Name="Debug|Win32"\r
+ >\r
+ <Tool\r
+ Name="VCCLCompilerTool"\r
+ UsePrecompiledHeader="0"\r
+ />\r
+ </FileConfiguration>\r
+ <FileConfiguration\r
+ Name="Release|Win32"\r
+ >\r
+ <Tool\r
+ Name="VCCLCompilerTool"\r
+ UsePrecompiledHeader="0"\r
+ />\r
+ </FileConfiguration>\r
+ <FileConfiguration\r
+ Name="release_static|Win32"\r
+ >\r
+ <Tool\r
+ Name="VCCLCompilerTool"\r
+ UsePrecompiledHeader="0"\r
+ />\r
+ </FileConfiguration>\r
+ <FileConfiguration\r
+ Name="debug_static|Win32"\r
+ >\r
+ <Tool\r
+ Name="VCCLCompilerTool"\r
+ UsePrecompiledHeader="0"\r
+ />\r
+ </FileConfiguration>\r
</File>\r
<File\r
- RelativePath="..\Resources\lineconflicted.ico"\r
+ RelativePath=".\libsvn_diff\diff4.c"\r
>\r
+ <FileConfiguration\r
+ Name="Debug|Win32"\r
+ >\r
+ <Tool\r
+ Name="VCCLCompilerTool"\r
+ UsePrecompiledHeader="0"\r
+ />\r
+ </FileConfiguration>\r
+ <FileConfiguration\r
+ Name="Release|Win32"\r
+ >\r
+ <Tool\r
+ Name="VCCLCompilerTool"\r
+ UsePrecompiledHeader="0"\r
+ />\r
+ </FileConfiguration>\r
+ <FileConfiguration\r
+ Name="release_static|Win32"\r
+ >\r
+ <Tool\r
+ Name="VCCLCompilerTool"\r
+ UsePrecompiledHeader="0"\r
+ />\r
+ </FileConfiguration>\r
+ <FileConfiguration\r
+ Name="debug_static|Win32"\r
+ >\r
+ <Tool\r
+ Name="VCCLCompilerTool"\r
+ UsePrecompiledHeader="0"\r
+ />\r
+ </FileConfiguration>\r
</File>\r
<File\r
- RelativePath="..\Resources\lineconflictedignored.ico"\r
- >\r
- </File>\r
- <File\r
- RelativePath="..\Resources\lineedited.ico"\r
- >\r
- </File>\r
- <File\r
- RelativePath="..\Resources\LineEndingCR.ico"\r
- >\r
- </File>\r
- <File\r
- RelativePath="..\Resources\LineEndingCRLF.ico"\r
- >\r
- </File>\r
- <File\r
- RelativePath="..\Resources\LineEndingLF.ico"\r
+ RelativePath=".\libsvn_diff\diff_file.c"\r
>\r
+ <FileConfiguration\r
+ Name="Debug|Win32"\r
+ >\r
+ <Tool\r
+ Name="VCCLCompilerTool"\r
+ UsePrecompiledHeader="0"\r
+ />\r
+ </FileConfiguration>\r
+ <FileConfiguration\r
+ Name="Release|Win32"\r
+ >\r
+ <Tool\r
+ Name="VCCLCompilerTool"\r
+ UsePrecompiledHeader="0"\r
+ />\r
+ </FileConfiguration>\r
+ <FileConfiguration\r
+ Name="release_static|Win32"\r
+ >\r
+ <Tool\r
+ Name="VCCLCompilerTool"\r
+ UsePrecompiledHeader="0"\r
+ />\r
+ </FileConfiguration>\r
+ <FileConfiguration\r
+ Name="debug_static|Win32"\r
+ >\r
+ <Tool\r
+ Name="VCCLCompilerTool"\r
+ UsePrecompiledHeader="0"\r
+ />\r
+ </FileConfiguration>\r
</File>\r
<File\r
- RelativePath="..\Resources\lineequal.ico"\r
+ RelativePath=".\libsvn_diff\diff_memory.c"\r
>\r
+ <FileConfiguration\r
+ Name="Debug|Win32"\r
+ >\r
+ <Tool\r
+ Name="VCCLCompilerTool"\r
+ UsePrecompiledHeader="0"\r
+ />\r
+ </FileConfiguration>\r
+ <FileConfiguration\r
+ Name="Release|Win32"\r
+ >\r
+ <Tool\r
+ Name="VCCLCompilerTool"\r
+ UsePrecompiledHeader="0"\r
+ />\r
+ </FileConfiguration>\r
+ <FileConfiguration\r
+ Name="release_static|Win32"\r
+ >\r
+ <Tool\r
+ Name="VCCLCompilerTool"\r
+ UsePrecompiledHeader="0"\r
+ />\r
+ </FileConfiguration>\r
+ <FileConfiguration\r
+ Name="debug_static|Win32"\r
+ >\r
+ <Tool\r
+ Name="VCCLCompilerTool"\r
+ UsePrecompiledHeader="0"\r
+ />\r
+ </FileConfiguration>\r
</File>\r
<File\r
- RelativePath="..\Resources\lineremoved.ico"\r
+ RelativePath=".\libsvn_diff\dirent_uri.c"\r
>\r
+ <FileConfiguration\r
+ Name="Debug|Win32"\r
+ >\r
+ <Tool\r
+ Name="VCCLCompilerTool"\r
+ UsePrecompiledHeader="0"\r
+ />\r
+ </FileConfiguration>\r
+ <FileConfiguration\r
+ Name="Release|Win32"\r
+ >\r
+ <Tool\r
+ Name="VCCLCompilerTool"\r
+ UsePrecompiledHeader="0"\r
+ />\r
+ </FileConfiguration>\r
+ <FileConfiguration\r
+ Name="release_static|Win32"\r
+ >\r
+ <Tool\r
+ Name="VCCLCompilerTool"\r
+ UsePrecompiledHeader="0"\r
+ />\r
+ </FileConfiguration>\r
+ <FileConfiguration\r
+ Name="debug_static|Win32"\r
+ >\r
+ <Tool\r
+ Name="VCCLCompilerTool"\r
+ UsePrecompiledHeader="0"\r
+ />\r
+ </FileConfiguration>\r
</File>\r
<File\r
- RelativePath="..\Resources\linewhitespace.ico"\r
+ RelativePath=".\libsvn_diff\dso.c"\r
>\r
+ <FileConfiguration\r
+ Name="Debug|Win32"\r
+ >\r
+ <Tool\r
+ Name="VCCLCompilerTool"\r
+ UsePrecompiledHeader="0"\r
+ />\r
+ </FileConfiguration>\r
+ <FileConfiguration\r
+ Name="Release|Win32"\r
+ >\r
+ <Tool\r
+ Name="VCCLCompilerTool"\r
+ UsePrecompiledHeader="0"\r
+ />\r
+ </FileConfiguration>\r
+ <FileConfiguration\r
+ Name="release_static|Win32"\r
+ >\r
+ <Tool\r
+ Name="VCCLCompilerTool"\r
+ UsePrecompiledHeader="0"\r
+ />\r
+ </FileConfiguration>\r
+ <FileConfiguration\r
+ Name="debug_static|Win32"\r
+ >\r
+ <Tool\r
+ Name="VCCLCompilerTool"\r
+ UsePrecompiledHeader="0"\r
+ />\r
+ </FileConfiguration>\r
</File>\r
<File\r
- RelativePath="..\Resources\Toolbar.bmp"\r
+ RelativePath=".\libsvn_diff\error.c"\r
>\r
+ <FileConfiguration\r
+ Name="Debug|Win32"\r
+ >\r
+ <Tool\r
+ Name="VCCLCompilerTool"\r
+ UsePrecompiledHeader="0"\r
+ />\r
+ </FileConfiguration>\r
+ <FileConfiguration\r
+ Name="Release|Win32"\r
+ >\r
+ <Tool\r
+ Name="VCCLCompilerTool"\r
+ UsePrecompiledHeader="0"\r
+ />\r
+ </FileConfiguration>\r
+ <FileConfiguration\r
+ Name="release_static|Win32"\r
+ >\r
+ <Tool\r
+ Name="VCCLCompilerTool"\r
+ UsePrecompiledHeader="0"\r
+ />\r
+ </FileConfiguration>\r
+ <FileConfiguration\r
+ Name="debug_static|Win32"\r
+ >\r
+ <Tool\r
+ Name="VCCLCompilerTool"\r
+ UsePrecompiledHeader="0"\r
+ />\r
+ </FileConfiguration>\r
</File>\r
<File\r
- RelativePath="..\Resources\TortoiseMerge.ico"\r
+ RelativePath=".\libsvn_diff\gzio.c"\r
>\r
+ <FileConfiguration\r
+ Name="Debug|Win32"\r
+ >\r
+ <Tool\r
+ Name="VCCLCompilerTool"\r
+ UsePrecompiledHeader="0"\r
+ />\r
+ </FileConfiguration>\r
</File>\r
<File\r
- RelativePath="..\Resources\TortoiseMerge.rc2"\r
+ RelativePath=".\libsvn_diff\infblock.c"\r
>\r
+ <FileConfiguration\r
+ Name="Debug|Win32"\r
+ >\r
+ <Tool\r
+ Name="VCCLCompilerTool"\r
+ UsePrecompiledHeader="0"\r
+ />\r
+ </FileConfiguration>\r
+ <FileConfiguration\r
+ Name="Release|Win32"\r
+ >\r
+ <Tool\r
+ Name="VCCLCompilerTool"\r
+ UsePrecompiledHeader="0"\r
+ />\r
+ </FileConfiguration>\r
+ <FileConfiguration\r
+ Name="release_static|Win32"\r
+ >\r
+ <Tool\r
+ Name="VCCLCompilerTool"\r
+ UsePrecompiledHeader="0"\r
+ />\r
+ </FileConfiguration>\r
+ <FileConfiguration\r
+ Name="debug_static|Win32"\r
+ >\r
+ <Tool\r
+ Name="VCCLCompilerTool"\r
+ UsePrecompiledHeader="0"\r
+ />\r
+ </FileConfiguration>\r
</File>\r
<File\r
- RelativePath="..\Resources\tortoisemerge_logoflipped.bmp"\r
+ RelativePath=".\libsvn_diff\infcodes.c"\r
>\r
+ <FileConfiguration\r
+ Name="Debug|Win32"\r
+ >\r
+ <Tool\r
+ Name="VCCLCompilerTool"\r
+ UsePrecompiledHeader="0"\r
+ />\r
+ </FileConfiguration>\r
+ <FileConfiguration\r
+ Name="Release|Win32"\r
+ >\r
+ <Tool\r
+ Name="VCCLCompilerTool"\r
+ UsePrecompiledHeader="0"\r
+ />\r
+ </FileConfiguration>\r
+ <FileConfiguration\r
+ Name="release_static|Win32"\r
+ >\r
+ <Tool\r
+ Name="VCCLCompilerTool"\r
+ UsePrecompiledHeader="0"\r
+ />\r
+ </FileConfiguration>\r
+ <FileConfiguration\r
+ Name="debug_static|Win32"\r
+ >\r
+ <Tool\r
+ Name="VCCLCompilerTool"\r
+ UsePrecompiledHeader="0"\r
+ />\r
+ </FileConfiguration>\r
</File>\r
<File\r
- RelativePath="..\Resources\TortoiseMergeENG.rc"\r
+ RelativePath=".\libsvn_diff\inffast.c"\r
>\r
+ <FileConfiguration\r
+ Name="Debug|Win32"\r
+ >\r
+ <Tool\r
+ Name="VCCLCompilerTool"\r
+ UsePrecompiledHeader="0"\r
+ />\r
+ </FileConfiguration>\r
+ <FileConfiguration\r
+ Name="Release|Win32"\r
+ >\r
+ <Tool\r
+ Name="VCCLCompilerTool"\r
+ UsePrecompiledHeader="0"\r
+ />\r
+ </FileConfiguration>\r
+ <FileConfiguration\r
+ Name="release_static|Win32"\r
+ >\r
+ <Tool\r
+ Name="VCCLCompilerTool"\r
+ UsePrecompiledHeader="0"\r
+ />\r
+ </FileConfiguration>\r
+ <FileConfiguration\r
+ Name="debug_static|Win32"\r
+ >\r
+ <Tool\r
+ Name="VCCLCompilerTool"\r
+ UsePrecompiledHeader="0"\r
+ />\r
+ </FileConfiguration>\r
+ </File>\r
+ <File\r
+ RelativePath=".\libsvn_diff\inflate.c"\r
+ >\r
+ <FileConfiguration\r
+ Name="Debug|Win32"\r
+ >\r
+ <Tool\r
+ Name="VCCLCompilerTool"\r
+ UsePrecompiledHeader="0"\r
+ />\r
+ </FileConfiguration>\r
+ <FileConfiguration\r
+ Name="Release|Win32"\r
+ >\r
+ <Tool\r
+ Name="VCCLCompilerTool"\r
+ UsePrecompiledHeader="0"\r
+ />\r
+ </FileConfiguration>\r
+ <FileConfiguration\r
+ Name="release_static|Win32"\r
+ >\r
+ <Tool\r
+ Name="VCCLCompilerTool"\r
+ UsePrecompiledHeader="0"\r
+ />\r
+ </FileConfiguration>\r
+ <FileConfiguration\r
+ Name="debug_static|Win32"\r
+ >\r
+ <Tool\r
+ Name="VCCLCompilerTool"\r
+ UsePrecompiledHeader="0"\r
+ />\r
+ </FileConfiguration>\r
+ </File>\r
+ <File\r
+ RelativePath=".\libsvn_diff\inftrees.c"\r
+ >\r
+ <FileConfiguration\r
+ Name="Debug|Win32"\r
+ >\r
+ <Tool\r
+ Name="VCCLCompilerTool"\r
+ UsePrecompiledHeader="0"\r
+ />\r
+ </FileConfiguration>\r
+ <FileConfiguration\r
+ Name="Release|Win32"\r
+ >\r
+ <Tool\r
+ Name="VCCLCompilerTool"\r
+ UsePrecompiledHeader="0"\r
+ />\r
+ </FileConfiguration>\r
+ <FileConfiguration\r
+ Name="release_static|Win32"\r
+ >\r
+ <Tool\r
+ Name="VCCLCompilerTool"\r
+ UsePrecompiledHeader="0"\r
+ />\r
+ </FileConfiguration>\r
+ <FileConfiguration\r
+ Name="debug_static|Win32"\r
+ >\r
+ <Tool\r
+ Name="VCCLCompilerTool"\r
+ UsePrecompiledHeader="0"\r
+ />\r
+ </FileConfiguration>\r
+ </File>\r
+ <File\r
+ RelativePath=".\libsvn_diff\infutil.c"\r
+ >\r
+ <FileConfiguration\r
+ Name="Debug|Win32"\r
+ >\r
+ <Tool\r
+ Name="VCCLCompilerTool"\r
+ UsePrecompiledHeader="0"\r
+ />\r
+ </FileConfiguration>\r
+ <FileConfiguration\r
+ Name="Release|Win32"\r
+ >\r
+ <Tool\r
+ Name="VCCLCompilerTool"\r
+ UsePrecompiledHeader="0"\r
+ />\r
+ </FileConfiguration>\r
+ <FileConfiguration\r
+ Name="release_static|Win32"\r
+ >\r
+ <Tool\r
+ Name="VCCLCompilerTool"\r
+ UsePrecompiledHeader="0"\r
+ />\r
+ </FileConfiguration>\r
+ <FileConfiguration\r
+ Name="debug_static|Win32"\r
+ >\r
+ <Tool\r
+ Name="VCCLCompilerTool"\r
+ UsePrecompiledHeader="0"\r
+ />\r
+ </FileConfiguration>\r
+ </File>\r
+ <File\r
+ RelativePath=".\libsvn_diff\io.c"\r
+ >\r
+ <FileConfiguration\r
+ Name="Debug|Win32"\r
+ >\r
+ <Tool\r
+ Name="VCCLCompilerTool"\r
+ UsePrecompiledHeader="0"\r
+ />\r
+ </FileConfiguration>\r
+ <FileConfiguration\r
+ Name="Release|Win32"\r
+ >\r
+ <Tool\r
+ Name="VCCLCompilerTool"\r
+ UsePrecompiledHeader="0"\r
+ />\r
+ </FileConfiguration>\r
+ <FileConfiguration\r
+ Name="release_static|Win32"\r
+ >\r
+ <Tool\r
+ Name="VCCLCompilerTool"\r
+ UsePrecompiledHeader="0"\r
+ />\r
+ </FileConfiguration>\r
+ <FileConfiguration\r
+ Name="debug_static|Win32"\r
+ >\r
+ <Tool\r
+ Name="VCCLCompilerTool"\r
+ UsePrecompiledHeader="0"\r
+ />\r
+ </FileConfiguration>\r
+ </File>\r
+ <File\r
+ RelativePath=".\libsvn_diff\lcs.c"\r
+ >\r
+ <FileConfiguration\r
+ Name="Debug|Win32"\r
+ >\r
+ <Tool\r
+ Name="VCCLCompilerTool"\r
+ UsePrecompiledHeader="0"\r
+ />\r
+ </FileConfiguration>\r
+ <FileConfiguration\r
+ Name="Release|Win32"\r
+ >\r
+ <Tool\r
+ Name="VCCLCompilerTool"\r
+ UsePrecompiledHeader="0"\r
+ />\r
+ </FileConfiguration>\r
+ <FileConfiguration\r
+ Name="release_static|Win32"\r
+ >\r
+ <Tool\r
+ Name="VCCLCompilerTool"\r
+ UsePrecompiledHeader="0"\r
+ />\r
+ </FileConfiguration>\r
+ <FileConfiguration\r
+ Name="debug_static|Win32"\r
+ >\r
+ <Tool\r
+ Name="VCCLCompilerTool"\r
+ UsePrecompiledHeader="0"\r
+ />\r
+ </FileConfiguration>\r
+ </File>\r
+ <File\r
+ RelativePath=".\libsvn_diff\maketree.c"\r
+ >\r
+ <FileConfiguration\r
+ Name="Debug|Win32"\r
+ >\r
+ <Tool\r
+ Name="VCCLCompilerTool"\r
+ UsePrecompiledHeader="0"\r
+ />\r
+ </FileConfiguration>\r
+ </File>\r
+ <File\r
+ RelativePath=".\libsvn_diff\md5.c"\r
+ >\r
+ <FileConfiguration\r
+ Name="Debug|Win32"\r
+ >\r
+ <Tool\r
+ Name="VCCLCompilerTool"\r
+ UsePrecompiledHeader="0"\r
+ />\r
+ </FileConfiguration>\r
+ <FileConfiguration\r
+ Name="Release|Win32"\r
+ >\r
+ <Tool\r
+ Name="VCCLCompilerTool"\r
+ UsePrecompiledHeader="0"\r
+ />\r
+ </FileConfiguration>\r
+ <FileConfiguration\r
+ Name="release_static|Win32"\r
+ >\r
+ <Tool\r
+ Name="VCCLCompilerTool"\r
+ UsePrecompiledHeader="0"\r
+ />\r
+ </FileConfiguration>\r
+ <FileConfiguration\r
+ Name="debug_static|Win32"\r
+ >\r
+ <Tool\r
+ Name="VCCLCompilerTool"\r
+ UsePrecompiledHeader="0"\r
+ />\r
+ </FileConfiguration>\r
+ </File>\r
+ <File\r
+ RelativePath=".\libsvn_diff\path.c"\r
+ >\r
+ <FileConfiguration\r
+ Name="Debug|Win32"\r
+ >\r
+ <Tool\r
+ Name="VCCLCompilerTool"\r
+ UsePrecompiledHeader="0"\r
+ />\r
+ </FileConfiguration>\r
+ <FileConfiguration\r
+ Name="Release|Win32"\r
+ >\r
+ <Tool\r
+ Name="VCCLCompilerTool"\r
+ UsePrecompiledHeader="0"\r
+ />\r
+ </FileConfiguration>\r
+ <FileConfiguration\r
+ Name="release_static|Win32"\r
+ >\r
+ <Tool\r
+ Name="VCCLCompilerTool"\r
+ UsePrecompiledHeader="0"\r
+ />\r
+ </FileConfiguration>\r
+ <FileConfiguration\r
+ Name="debug_static|Win32"\r
+ >\r
+ <Tool\r
+ Name="VCCLCompilerTool"\r
+ UsePrecompiledHeader="0"\r
+ />\r
+ </FileConfiguration>\r
+ </File>\r
+ <File\r
+ RelativePath=".\libsvn_diff\pool.c"\r
+ >\r
+ </File>\r
+ <File\r
+ RelativePath=".\libsvn_diff\sha1.c"\r
+ >\r
+ <FileConfiguration\r
+ Name="Debug|Win32"\r
+ >\r
+ <Tool\r
+ Name="VCCLCompilerTool"\r
+ UsePrecompiledHeader="0"\r
+ />\r
+ </FileConfiguration>\r
+ <FileConfiguration\r
+ Name="Release|Win32"\r
+ >\r
+ <Tool\r
+ Name="VCCLCompilerTool"\r
+ UsePrecompiledHeader="0"\r
+ />\r
+ </FileConfiguration>\r
+ <FileConfiguration\r
+ Name="release_static|Win32"\r
+ >\r
+ <Tool\r
+ Name="VCCLCompilerTool"\r
+ UsePrecompiledHeader="0"\r
+ />\r
+ </FileConfiguration>\r
+ <FileConfiguration\r
+ Name="debug_static|Win32"\r
+ >\r
+ <Tool\r
+ Name="VCCLCompilerTool"\r
+ UsePrecompiledHeader="0"\r
+ />\r
+ </FileConfiguration>\r
+ </File>\r
+ <File\r
+ RelativePath=".\libsvn_diff\stream.c"\r
+ >\r
+ <FileConfiguration\r
+ Name="Debug|Win32"\r
+ >\r
+ <Tool\r
+ Name="VCCLCompilerTool"\r
+ UsePrecompiledHeader="0"\r
+ />\r
+ </FileConfiguration>\r
+ <FileConfiguration\r
+ Name="Release|Win32"\r
+ >\r
+ <Tool\r
+ Name="VCCLCompilerTool"\r
+ UsePrecompiledHeader="0"\r
+ />\r
+ </FileConfiguration>\r
+ <FileConfiguration\r
+ Name="release_static|Win32"\r
+ >\r
+ <Tool\r
+ Name="VCCLCompilerTool"\r
+ UsePrecompiledHeader="0"\r
+ />\r
+ </FileConfiguration>\r
+ <FileConfiguration\r
+ Name="debug_static|Win32"\r
+ >\r
+ <Tool\r
+ Name="VCCLCompilerTool"\r
+ UsePrecompiledHeader="0"\r
+ />\r
+ </FileConfiguration>\r
+ </File>\r
+ <File\r
+ RelativePath=".\libsvn_diff\svn_string.c"\r
+ >\r
+ <FileConfiguration\r
+ Name="Debug|Win32"\r
+ >\r
+ <Tool\r
+ Name="VCCLCompilerTool"\r
+ UsePrecompiledHeader="0"\r
+ />\r
+ </FileConfiguration>\r
+ <FileConfiguration\r
+ Name="Release|Win32"\r
+ >\r
+ <Tool\r
+ Name="VCCLCompilerTool"\r
+ UsePrecompiledHeader="0"\r
+ />\r
+ </FileConfiguration>\r
+ <FileConfiguration\r
+ Name="release_static|Win32"\r
+ >\r
+ <Tool\r
+ Name="VCCLCompilerTool"\r
+ UsePrecompiledHeader="0"\r
+ />\r
+ </FileConfiguration>\r
+ <FileConfiguration\r
+ Name="debug_static|Win32"\r
+ >\r
+ <Tool\r
+ Name="VCCLCompilerTool"\r
+ UsePrecompiledHeader="0"\r
+ />\r
+ </FileConfiguration>\r
+ </File>\r
+ <File\r
+ RelativePath=".\libsvn_diff\SVNLineDiff.cpp"\r
+ >\r
+ </File>\r
+ <File\r
+ RelativePath=".\libsvn_diff\token.c"\r
+ >\r
+ <FileConfiguration\r
+ Name="Debug|Win32"\r
+ >\r
+ <Tool\r
+ Name="VCCLCompilerTool"\r
+ UsePrecompiledHeader="0"\r
+ />\r
+ </FileConfiguration>\r
+ <FileConfiguration\r
+ Name="Release|Win32"\r
+ >\r
+ <Tool\r
+ Name="VCCLCompilerTool"\r
+ UsePrecompiledHeader="0"\r
+ />\r
+ </FileConfiguration>\r
+ <FileConfiguration\r
+ Name="release_static|Win32"\r
+ >\r
+ <Tool\r
+ Name="VCCLCompilerTool"\r
+ UsePrecompiledHeader="0"\r
+ />\r
+ </FileConfiguration>\r
+ <FileConfiguration\r
+ Name="debug_static|Win32"\r
+ >\r
+ <Tool\r
+ Name="VCCLCompilerTool"\r
+ UsePrecompiledHeader="0"\r
+ />\r
+ </FileConfiguration>\r
+ </File>\r
+ <File\r
+ RelativePath=".\libsvn_diff\trees.c"\r
+ >\r
+ <FileConfiguration\r
+ Name="Debug|Win32"\r
+ >\r
+ <Tool\r
+ Name="VCCLCompilerTool"\r
+ UsePrecompiledHeader="0"\r
+ />\r
+ </FileConfiguration>\r
+ <FileConfiguration\r
+ Name="Release|Win32"\r
+ >\r
+ <Tool\r
+ Name="VCCLCompilerTool"\r
+ UsePrecompiledHeader="0"\r
+ />\r
+ </FileConfiguration>\r
+ <FileConfiguration\r
+ Name="release_static|Win32"\r
+ >\r
+ <Tool\r
+ Name="VCCLCompilerTool"\r
+ UsePrecompiledHeader="0"\r
+ />\r
+ </FileConfiguration>\r
+ <FileConfiguration\r
+ Name="debug_static|Win32"\r
+ >\r
+ <Tool\r
+ Name="VCCLCompilerTool"\r
+ UsePrecompiledHeader="0"\r
+ />\r
+ </FileConfiguration>\r
+ </File>\r
+ <File\r
+ RelativePath=".\libsvn_diff\uncompr.c"\r
+ >\r
+ <FileConfiguration\r
+ Name="Debug|Win32"\r
+ >\r
+ <Tool\r
+ Name="VCCLCompilerTool"\r
+ UsePrecompiledHeader="0"\r
+ />\r
+ </FileConfiguration>\r
+ <FileConfiguration\r
+ Name="Release|Win32"\r
+ >\r
+ <Tool\r
+ Name="VCCLCompilerTool"\r
+ UsePrecompiledHeader="0"\r
+ />\r
+ </FileConfiguration>\r
+ <FileConfiguration\r
+ Name="release_static|Win32"\r
+ >\r
+ <Tool\r
+ Name="VCCLCompilerTool"\r
+ UsePrecompiledHeader="0"\r
+ />\r
+ </FileConfiguration>\r
+ <FileConfiguration\r
+ Name="debug_static|Win32"\r
+ >\r
+ <Tool\r
+ Name="VCCLCompilerTool"\r
+ UsePrecompiledHeader="0"\r
+ />\r
+ </FileConfiguration>\r
</File>\r
<File\r
- RelativePath="..\Resources\tortoisesvn_logoflipped.bmp"\r
+ RelativePath=".\libsvn_diff\unzip.c"\r
>\r
+ <FileConfiguration\r
+ Name="Debug|Win32"\r
+ >\r
+ <Tool\r
+ Name="VCCLCompilerTool"\r
+ UsePrecompiledHeader="0"\r
+ />\r
+ </FileConfiguration>\r
+ <FileConfiguration\r
+ Name="Release|Win32"\r
+ >\r
+ <Tool\r
+ Name="VCCLCompilerTool"\r
+ UsePrecompiledHeader="0"\r
+ />\r
+ </FileConfiguration>\r
+ <FileConfiguration\r
+ Name="release_static|Win32"\r
+ >\r
+ <Tool\r
+ Name="VCCLCompilerTool"\r
+ UsePrecompiledHeader="0"\r
+ />\r
+ </FileConfiguration>\r
+ <FileConfiguration\r
+ Name="debug_static|Win32"\r
+ >\r
+ <Tool\r
+ Name="VCCLCompilerTool"\r
+ UsePrecompiledHeader="0"\r
+ />\r
+ </FileConfiguration>\r
</File>\r
<File\r
- RelativePath="..\Resources\ttf_glyph.bmp"\r
+ RelativePath=".\libsvn_diff\utf.c"\r
+ >\r
+ <FileConfiguration\r
+ Name="Debug|Win32"\r
+ >\r
+ <Tool\r
+ Name="VCCLCompilerTool"\r
+ UsePrecompiledHeader="0"\r
+ />\r
+ </FileConfiguration>\r
+ <FileConfiguration\r
+ Name="Release|Win32"\r
+ >\r
+ <Tool\r
+ Name="VCCLCompilerTool"\r
+ UsePrecompiledHeader="0"\r
+ />\r
+ </FileConfiguration>\r
+ <FileConfiguration\r
+ Name="release_static|Win32"\r
+ >\r
+ <Tool\r
+ Name="VCCLCompilerTool"\r
+ UsePrecompiledHeader="0"\r
+ />\r
+ </FileConfiguration>\r
+ <FileConfiguration\r
+ Name="debug_static|Win32"\r
+ >\r
+ <Tool\r
+ Name="VCCLCompilerTool"\r
+ UsePrecompiledHeader="0"\r
+ />\r
+ </FileConfiguration>\r
+ </File>\r
+ <File\r
+ RelativePath=".\libsvn_diff\utf_validate.c"\r
+ >\r
+ <FileConfiguration\r
+ Name="Debug|Win32"\r
+ >\r
+ <Tool\r
+ Name="VCCLCompilerTool"\r
+ UsePrecompiledHeader="0"\r
+ />\r
+ </FileConfiguration>\r
+ <FileConfiguration\r
+ Name="Release|Win32"\r
+ >\r
+ <Tool\r
+ Name="VCCLCompilerTool"\r
+ UsePrecompiledHeader="0"\r
+ />\r
+ </FileConfiguration>\r
+ <FileConfiguration\r
+ Name="release_static|Win32"\r
+ >\r
+ <Tool\r
+ Name="VCCLCompilerTool"\r
+ UsePrecompiledHeader="0"\r
+ />\r
+ </FileConfiguration>\r
+ <FileConfiguration\r
+ Name="debug_static|Win32"\r
+ >\r
+ <Tool\r
+ Name="VCCLCompilerTool"\r
+ UsePrecompiledHeader="0"\r
+ />\r
+ </FileConfiguration>\r
+ </File>\r
+ <File\r
+ RelativePath=".\libsvn_diff\util.c"\r
+ >\r
+ <FileConfiguration\r
+ Name="Debug|Win32"\r
+ >\r
+ <Tool\r
+ Name="VCCLCompilerTool"\r
+ UsePrecompiledHeader="0"\r
+ />\r
+ </FileConfiguration>\r
+ <FileConfiguration\r
+ Name="Release|Win32"\r
+ >\r
+ <Tool\r
+ Name="VCCLCompilerTool"\r
+ UsePrecompiledHeader="0"\r
+ />\r
+ </FileConfiguration>\r
+ <FileConfiguration\r
+ Name="release_static|Win32"\r
+ >\r
+ <Tool\r
+ Name="VCCLCompilerTool"\r
+ UsePrecompiledHeader="0"\r
+ />\r
+ </FileConfiguration>\r
+ <FileConfiguration\r
+ Name="debug_static|Win32"\r
+ >\r
+ <Tool\r
+ Name="VCCLCompilerTool"\r
+ UsePrecompiledHeader="0"\r
+ />\r
+ </FileConfiguration>\r
+ </File>\r
+ <File\r
+ RelativePath=".\libsvn_diff\win32_xlate.c"\r
+ >\r
+ <FileConfiguration\r
+ Name="Debug|Win32"\r
+ >\r
+ <Tool\r
+ Name="VCCLCompilerTool"\r
+ UsePrecompiledHeader="0"\r
+ />\r
+ </FileConfiguration>\r
+ <FileConfiguration\r
+ Name="Release|Win32"\r
+ >\r
+ <Tool\r
+ Name="VCCLCompilerTool"\r
+ UsePrecompiledHeader="0"\r
+ />\r
+ </FileConfiguration>\r
+ <FileConfiguration\r
+ Name="release_static|Win32"\r
+ >\r
+ <Tool\r
+ Name="VCCLCompilerTool"\r
+ UsePrecompiledHeader="0"\r
+ />\r
+ </FileConfiguration>\r
+ <FileConfiguration\r
+ Name="debug_static|Win32"\r
+ >\r
+ <Tool\r
+ Name="VCCLCompilerTool"\r
+ UsePrecompiledHeader="0"\r
+ />\r
+ </FileConfiguration>\r
+ </File>\r
+ <File\r
+ RelativePath=".\libsvn_diff\zip.c"\r
+ >\r
+ <FileConfiguration\r
+ Name="Debug|Win32"\r
+ >\r
+ <Tool\r
+ Name="VCCLCompilerTool"\r
+ UsePrecompiledHeader="0"\r
+ />\r
+ </FileConfiguration>\r
+ <FileConfiguration\r
+ Name="Release|Win32"\r
+ >\r
+ <Tool\r
+ Name="VCCLCompilerTool"\r
+ UsePrecompiledHeader="0"\r
+ />\r
+ </FileConfiguration>\r
+ <FileConfiguration\r
+ Name="release_static|Win32"\r
+ >\r
+ <Tool\r
+ Name="VCCLCompilerTool"\r
+ UsePrecompiledHeader="0"\r
+ />\r
+ </FileConfiguration>\r
+ <FileConfiguration\r
+ Name="debug_static|Win32"\r
+ >\r
+ <Tool\r
+ Name="VCCLCompilerTool"\r
+ UsePrecompiledHeader="0"\r
+ />\r
+ </FileConfiguration>\r
+ </File>\r
+ <File\r
+ RelativePath=".\libsvn_diff\zutil.c"\r
>\r
+ <FileConfiguration\r
+ Name="Debug|Win32"\r
+ >\r
+ <Tool\r
+ Name="VCCLCompilerTool"\r
+ UsePrecompiledHeader="0"\r
+ />\r
+ </FileConfiguration>\r
+ <FileConfiguration\r
+ Name="Release|Win32"\r
+ >\r
+ <Tool\r
+ Name="VCCLCompilerTool"\r
+ UsePrecompiledHeader="0"\r
+ />\r
+ </FileConfiguration>\r
+ <FileConfiguration\r
+ Name="release_static|Win32"\r
+ >\r
+ <Tool\r
+ Name="VCCLCompilerTool"\r
+ UsePrecompiledHeader="0"\r
+ />\r
+ </FileConfiguration>\r
+ <FileConfiguration\r
+ Name="debug_static|Win32"\r
+ >\r
+ <Tool\r
+ Name="VCCLCompilerTool"\r
+ UsePrecompiledHeader="0"\r
+ />\r
+ </FileConfiguration>\r
</File>\r
</Filter>\r
</Files>\r
--- /dev/null
+// TortoiseMerge - a Diff/Patch program\r
+\r
+// Copyright (C) 2006-2008 - TortoiseSVN\r
+\r
+// This program is free software; you can redistribute it and/or\r
+// modify it under the terms of the GNU General Public License\r
+// as published by the Free Software Foundation; either version 2\r
+// of the License, or (at your option) any later version.\r
+\r
+// This program is distributed in the hope that it will be useful,\r
+// but WITHOUT ANY WARRANTY; without even the implied warranty of\r
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\r
+// GNU General Public License for more details.\r
+\r
+// You should have received a copy of the GNU General Public License\r
+// along with this program; if not, write to the Free Software Foundation,\r
+// 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.\r
+//\r
+#include "StdAfx.h"\r
+#include "SVNLineDiff.h"\r
+\r
+const svn_diff_fns_t SVNLineDiff::SVNLineDiff_vtable =\r
+{\r
+ SVNLineDiff::datasource_open,\r
+ SVNLineDiff::datasource_close,\r
+ SVNLineDiff::next_token,\r
+ SVNLineDiff::compare_token,\r
+ SVNLineDiff::discard_token,\r
+ SVNLineDiff::discard_all_token\r
+};\r
+\r
+#define SVNLINEDIFF_CHARTYPE_NONE 0\r
+#define SVNLINEDIFF_CHARTYPE_ALPHANUMERIC 1\r
+#define SVNLINEDIFF_CHARTYPE_SPACE 2\r
+#define SVNLINEDIFF_CHARTYPE_OTHER 3\r
+\r
+typedef void (*LineParser)(LPCTSTR line, unsigned long lineLength, std::vector<std::wstring> &tokens);\r
+\r
+void SVNLineDiff::ParseLineWords(\r
+ LPCTSTR line, unsigned long lineLength, std::vector<std::wstring> &tokens)\r
+{\r
+ std::wstring token;\r
+ int prevCharType = SVNLINEDIFF_CHARTYPE_NONE;\r
+ for (unsigned long i = 0; i < lineLength; ++i)\r
+ {\r
+ int charType = \r
+ IsCharAlphaNumeric(line[i]) ? SVNLINEDIFF_CHARTYPE_ALPHANUMERIC :\r
+ IsCharWhiteSpace(line[i]) ? SVNLINEDIFF_CHARTYPE_SPACE :\r
+ SVNLINEDIFF_CHARTYPE_OTHER;\r
+\r
+ // Token is a sequence of either alphanumeric or whitespace characters.\r
+ // Treat all other characters as a separate tokens.\r
+ if (charType == prevCharType && charType != SVNLINEDIFF_CHARTYPE_OTHER)\r
+ token += line[i];\r
+ else\r
+ {\r
+ if (!token.empty())\r
+ tokens.push_back(token);\r
+ token = line[i];\r
+ }\r
+ prevCharType = charType;\r
+ }\r
+ if (!token.empty())\r
+ tokens.push_back(token);\r
+}\r
+\r
+void SVNLineDiff::ParseLineChars(\r
+ LPCTSTR line, unsigned long lineLength, std::vector<std::wstring> &tokens)\r
+{\r
+ std::wstring token;\r
+ for (unsigned long i = 0; i < lineLength; ++i)\r
+ {\r
+ token = line[i];\r
+ tokens.push_back(token);\r
+ }\r
+}\r
+\r
+svn_error_t * SVNLineDiff::datasource_open(void * baton, svn_diff_datasource_e datasource)\r
+{\r
+ SVNLineDiff * linediff = (SVNLineDiff *)baton;\r
+ LineParser parser = linediff->m_bWordDiff ? ParseLineWords : ParseLineChars;\r
+ switch (datasource)\r
+ {\r
+ case svn_diff_datasource_original:\r
+ parser(linediff->m_line1, linediff->m_line1length, linediff->m_line1tokens);\r
+ break;\r
+ case svn_diff_datasource_modified:\r
+ parser(linediff->m_line2, linediff->m_line2length, linediff->m_line2tokens);\r
+ break;\r
+ }\r
+ return SVN_NO_ERROR;\r
+}\r
+\r
+svn_error_t * SVNLineDiff::datasource_close(void * /*baton*/, svn_diff_datasource_e /*datasource*/)\r
+{\r
+ return SVN_NO_ERROR;\r
+}\r
+\r
+void SVNLineDiff::NextTokenWords(\r
+ apr_uint32_t* hash, void** token, unsigned long& linePos, const std::vector<std::wstring>& tokens)\r
+{\r
+ if (linePos < tokens.size())\r
+ {\r
+ *token = (void*)tokens[linePos].c_str();\r
+ *hash = SVNLineDiff::Adler32(0, tokens[linePos].c_str(), tokens[linePos].size());\r
+ linePos++;\r
+ }\r
+}\r
+\r
+void SVNLineDiff::NextTokenChars(\r
+ apr_uint32_t* hash, void** token, unsigned long& linePos, LPCTSTR line, unsigned long lineLength)\r
+{\r
+ if (linePos < lineLength)\r
+ {\r
+ *token = (void*)&line[linePos];\r
+ *hash = line[linePos];\r
+ linePos++;\r
+ }\r
+}\r
+\r
+svn_error_t * SVNLineDiff::next_token(\r
+ apr_uint32_t * hash, void ** token, void * baton, svn_diff_datasource_e datasource)\r
+{\r
+ SVNLineDiff * linediff = (SVNLineDiff *)baton;\r
+ *token = NULL;\r
+ switch (datasource)\r
+ {\r
+ case svn_diff_datasource_original:\r
+ if (linediff->m_bWordDiff)\r
+ NextTokenWords(hash, token, linediff->m_line1pos, linediff->m_line1tokens);\r
+ else\r
+ NextTokenChars(hash, token, linediff->m_line1pos, linediff->m_line1, linediff->m_line1length);\r
+ break;\r
+ case svn_diff_datasource_modified:\r
+ if (linediff->m_bWordDiff)\r
+ NextTokenWords(hash, token, linediff->m_line2pos, linediff->m_line2tokens);\r
+ else\r
+ NextTokenChars(hash, token, linediff->m_line2pos, linediff->m_line2, linediff->m_line2length);\r
+ break;\r
+ }\r
+ return SVN_NO_ERROR;\r
+}\r
+\r
+svn_error_t * SVNLineDiff::compare_token(void * baton, void * token1, void * token2, int * compare)\r
+{\r
+ SVNLineDiff * linediff = (SVNLineDiff *)baton;\r
+ if (linediff->m_bWordDiff)\r
+ {\r
+ LPCTSTR s1 = (LPCTSTR)token1;\r
+ LPCTSTR s2 = (LPCTSTR)token2;\r
+ if (s1 && s2)\r
+ {\r
+ *compare = _tcscmp(s1, s2);\r
+ }\r
+ }\r
+ else\r
+ {\r
+ TCHAR * c1 = (TCHAR *)token1;\r
+ TCHAR * c2 = (TCHAR *)token2;\r
+ if (c1 && c2)\r
+ {\r
+ if (*c1 == *c2)\r
+ *compare = 0;\r
+ else if (*c1 < *c2)\r
+ *compare = -1;\r
+ else\r
+ *compare = 1;\r
+ }\r
+ }\r
+ return SVN_NO_ERROR;\r
+}\r
+\r
+void SVNLineDiff::discard_token(void * /*baton*/, void * /*token*/)\r
+{\r
+}\r
+\r
+void SVNLineDiff::discard_all_token(void * /*baton*/)\r
+{\r
+}\r
+\r
+SVNLineDiff::SVNLineDiff()\r
+ : m_pool(NULL)\r
+ , m_subpool(NULL)\r
+ , m_line1(NULL)\r
+ , m_line1length(0)\r
+ , m_line2(NULL)\r
+ , m_line2length(0)\r
+ , m_line1pos(0)\r
+ , m_line2pos(0)\r
+ , m_bWordDiff(false)\r
+{\r
+ m_pool = svn_pool_create(NULL);\r
+}\r
+\r
+SVNLineDiff::~SVNLineDiff()\r
+{\r
+ svn_pool_destroy(m_pool);\r
+};\r
+\r
+bool SVNLineDiff::Diff(svn_diff_t **diff, LPCTSTR line1, int len1, LPCTSTR line2, int len2, bool bWordDiff)\r
+{\r
+ if (m_subpool)\r
+ svn_pool_clear(m_subpool);\r
+ else\r
+ m_subpool = svn_pool_create(m_pool);\r
+\r
+ if (m_subpool == NULL)\r
+ return false;\r
+\r
+ m_bWordDiff = bWordDiff;\r
+ m_line1 = line1;\r
+ m_line2 = line2;\r
+ m_line1length = len1 ? len1 : _tcslen(m_line1);\r
+ m_line2length = len2 ? len2 : _tcslen(m_line2);\r
+\r
+ m_line1pos = 0;\r
+ m_line2pos = 0;\r
+ m_line1tokens.clear();\r
+ m_line2tokens.clear();\r
+ svn_error_t * err = svn_diff_diff(diff, this, &SVNLineDiff_vtable, m_subpool);\r
+ if (err)\r
+ {\r
+ svn_error_clear(err);\r
+ svn_pool_clear(m_subpool);\r
+ return false;\r
+ }\r
+ return true;\r
+}\r
+\r
+#define ADLER_MOD_BASE 65521\r
+#define ADLER_MOD_BLOCK_SIZE 5552\r
+\r
+apr_uint32_t SVNLineDiff::Adler32(apr_uint32_t checksum, const WCHAR *data, apr_size_t len)\r
+{\r
+ const unsigned char * input = (const unsigned char *)data;\r
+ apr_uint32_t s1 = checksum & 0xFFFF;\r
+ apr_uint32_t s2 = checksum >> 16;\r
+ apr_uint32_t b;\r
+ len *= 2;\r
+ apr_size_t blocks = len / ADLER_MOD_BLOCK_SIZE;\r
+\r
+ len %= ADLER_MOD_BLOCK_SIZE;\r
+\r
+ while (blocks--)\r
+ {\r
+ int count = ADLER_MOD_BLOCK_SIZE;\r
+ while (count--)\r
+ {\r
+ b = *input++;\r
+ s1 += b;\r
+ s2 += s1;\r
+ }\r
+\r
+ s1 %= ADLER_MOD_BASE;\r
+ s2 %= ADLER_MOD_BASE;\r
+ }\r
+\r
+ while (len--)\r
+ {\r
+ b = *input++;\r
+ s1 += b;\r
+ s2 += s1;\r
+ }\r
+\r
+ return ((s2 % ADLER_MOD_BASE) << 16) | (s1 % ADLER_MOD_BASE);\r
+}\r
+\r
+bool SVNLineDiff::IsCharWhiteSpace(TCHAR c)\r
+{\r
+ return (c == ' ') || (c == '\t');\r
+}\r
+\r
+bool SVNLineDiff::ShowInlineDiff(svn_diff_t* diff)\r
+{\r
+ svn_diff_t* tempdiff = diff;\r
+ int diffcounts = 0;\r
+ int origcounts = 0;\r
+ apr_off_t origsize = 0;\r
+ apr_off_t diffsize = 0;\r
+ while (tempdiff)\r
+ {\r
+ if (tempdiff->type == svn_diff__type_common)\r
+ {\r
+ origcounts++;\r
+ origsize += tempdiff->original_length;\r
+ }\r
+ else\r
+ {\r
+ diffcounts++;\r
+ diffsize += tempdiff->original_length;\r
+ diffsize += tempdiff->modified_length;\r
+ }\r
+ tempdiff = tempdiff->next;\r
+ }\r
+ return (origcounts >= diffcounts) && (origsize > diffsize);\r
+}\r
--- /dev/null
+/* adler32.c -- compute the Adler-32 checksum of a data stream\r
+ * Copyright (C) 1995-2002 Mark Adler\r
+ * For conditions of distribution and use, see copyright notice in zlib.h \r
+ */\r
+\r
+/* @(#) $Id: adler32.c,v 1.1 2003/05/23 21:05:30 steveking Exp $ */\r
+\r
+#include "zlib.h"\r
+\r
+#define BASE 65521L /* largest prime smaller than 65536 */\r
+#define NMAX 5552\r
+/* NMAX is the largest n such that 255n(n+1)/2 + (n+1)(BASE-1) <= 2^32-1 */\r
+\r
+#define DO1(buf,i) {s1 += buf[i]; s2 += s1;}\r
+#define DO2(buf,i) DO1(buf,i); DO1(buf,i+1);\r
+#define DO4(buf,i) DO2(buf,i); DO2(buf,i+2);\r
+#define DO8(buf,i) DO4(buf,i); DO4(buf,i+4);\r
+#define DO16(buf) DO8(buf,0); DO8(buf,8);\r
+\r
+/* ========================================================================= */\r
+uLong ZEXPORT adler32(adler, buf, len)\r
+ uLong adler;\r
+ const Bytef *buf;\r
+ uInt len;\r
+{\r
+ unsigned long s1 = adler & 0xffff;\r
+ unsigned long s2 = (adler >> 16) & 0xffff;\r
+ int k;\r
+\r
+ if (buf == Z_NULL) return 1L;\r
+\r
+ while (len > 0) {\r
+ k = len < NMAX ? len : NMAX;\r
+ len -= k;\r
+ while (k >= 16) {\r
+ DO16(buf);\r
+ buf += 16;\r
+ k -= 16;\r
+ }\r
+ if (k != 0) do {\r
+ s1 += *buf++;\r
+ s2 += s1;\r
+ } while (--k);\r
+ s1 %= BASE;\r
+ s2 %= BASE;\r
+ }\r
+ return (s2 << 16) | s1;\r
+}\r
--- /dev/null
+/*\r
+ * checksum.c: checksum routines\r
+ *\r
+ * ====================================================================\r
+ * Copyright (c) 2008 CollabNet. All rights reserved.\r
+ *\r
+ * This software is licensed as described in the file COPYING, which\r
+ * you should have received as part of this distribution. The terms\r
+ * are also available at http://subversion.tigris.org/license-1.html.\r
+ * If newer versions of this license are posted there, you may use a\r
+ * newer version instead, at your option.\r
+ *\r
+ * This software consists of voluntary contributions made by many\r
+ * individuals. For exact contribution history, see the revision\r
+ * history and logs, available at http://subversion.tigris.org/.\r
+ * ====================================================================\r
+ */\r
+\r
+\r
+#include <ctype.h>\r
+\r
+#include <apr_md5.h>\r
+#include <apr_sha1.h>\r
+\r
+#include "svn_checksum.h"\r
+#include "svn_error.h"\r
+\r
+#include "sha1.h"\r
+#include "md5.h"\r
+\r
+\f\r
+\r
+/* Returns the digest size of it's argument. */\r
+#define DIGESTSIZE(k) ((k) == svn_checksum_md5 ? APR_MD5_DIGESTSIZE : \\r
+ (k) == svn_checksum_sha1 ? APR_SHA1_DIGESTSIZE : 0)\r
+\r
+\r
+/* Check to see if KIND is something we recognize. If not, return\r
+ * SVN_ERR_BAD_CHECKSUM_KIND */\r
+static svn_error_t *\r
+validate_kind(svn_checksum_kind_t kind)\r
+{\r
+ if (kind == svn_checksum_md5 || kind == svn_checksum_sha1)\r
+ return SVN_NO_ERROR;\r
+ else\r
+ return svn_error_create(SVN_ERR_BAD_CHECKSUM_KIND, NULL, NULL);\r
+}\r
+\r
+\r
+svn_checksum_t *\r
+svn_checksum_create(svn_checksum_kind_t kind,\r
+ apr_pool_t *pool)\r
+{\r
+ svn_checksum_t *checksum;\r
+\r
+ switch (kind)\r
+ {\r
+ case svn_checksum_md5:\r
+ case svn_checksum_sha1:\r
+ checksum = apr_pcalloc(pool, sizeof(*checksum) + DIGESTSIZE(kind));\r
+ checksum->digest = (unsigned char *)checksum + sizeof(*checksum);\r
+ checksum->kind = kind;\r
+ return checksum;\r
+\r
+ default:\r
+ return NULL;\r
+ }\r
+}\r
+\r
+svn_checksum_t *\r
+svn_checksum__from_digest(const unsigned char *digest,\r
+ svn_checksum_kind_t kind,\r
+ apr_pool_t *result_pool)\r
+{\r
+ svn_checksum_t *checksum = svn_checksum_create(kind, result_pool);\r
+\r
+ memcpy((unsigned char *)checksum->digest, digest, DIGESTSIZE(kind));\r
+ return checksum;\r
+}\r
+\r
+svn_error_t *\r
+svn_checksum_clear(svn_checksum_t *checksum)\r
+{\r
+ SVN_ERR(validate_kind(checksum->kind));\r
+\r
+ memset((unsigned char *) checksum->digest, 0, DIGESTSIZE(checksum->kind));\r
+ return SVN_NO_ERROR;\r
+}\r
+\r
+svn_boolean_t\r
+svn_checksum_match(const svn_checksum_t *checksum1,\r
+ const svn_checksum_t *checksum2)\r
+{\r
+ if (checksum1 == NULL || checksum2 == NULL)\r
+ return TRUE;\r
+\r
+ if (checksum1->kind != checksum2->kind)\r
+ return FALSE;\r
+\r
+ switch (checksum1->kind)\r
+ {\r
+ case svn_checksum_md5:\r
+ return svn_md5__digests_match(checksum1->digest, checksum2->digest);\r
+ case svn_checksum_sha1:\r
+ return svn_sha1__digests_match(checksum1->digest, checksum2->digest);\r
+ default:\r
+ /* We really shouldn't get here, but if we do... */\r
+ return FALSE;\r
+ }\r
+}\r
+\r
+const char *\r
+svn_checksum_to_cstring_display(const svn_checksum_t *checksum,\r
+ apr_pool_t *pool)\r
+{\r
+ switch (checksum->kind)\r
+ {\r
+ case svn_checksum_md5:\r
+ return svn_md5__digest_to_cstring_display(checksum->digest, pool);\r
+ case svn_checksum_sha1:\r
+ return svn_sha1__digest_to_cstring_display(checksum->digest, pool);\r
+ default:\r
+ /* We really shouldn't get here, but if we do... */\r
+ return NULL;\r
+ }\r
+}\r
+\r
+const char *\r
+svn_checksum_to_cstring(const svn_checksum_t *checksum,\r
+ apr_pool_t *pool)\r
+{\r
+ switch (checksum->kind)\r
+ {\r
+ case svn_checksum_md5:\r
+ return svn_md5__digest_to_cstring(checksum->digest, pool);\r
+ case svn_checksum_sha1:\r
+ return svn_sha1__digest_to_cstring(checksum->digest, pool);\r
+ default:\r
+ /* We really shouldn't get here, but if we do... */\r
+ return NULL;\r
+ }\r
+}\r
+\r
+svn_error_t *\r
+svn_checksum_parse_hex(svn_checksum_t **checksum,\r
+ svn_checksum_kind_t kind,\r
+ const char *hex,\r
+ apr_pool_t *pool)\r
+{\r
+ int len;\r
+ int i;\r
+ unsigned char is_zeros = '\0';\r
+\r
+ if (hex == NULL)\r
+ {\r
+ *checksum = NULL;\r
+ return SVN_NO_ERROR;\r
+ }\r
+\r
+ SVN_ERR(validate_kind(kind));\r
+\r
+ *checksum = svn_checksum_create(kind, pool);\r
+ len = DIGESTSIZE(kind);\r
+\r
+ for (i = 0; i < len; i++)\r
+ {\r
+ if ((! isxdigit(hex[i * 2])) || (! isxdigit(hex[i * 2 + 1])))\r
+ return svn_error_create(SVN_ERR_BAD_CHECKSUM_PARSE, NULL, NULL);\r
+\r
+ ((unsigned char *)(*checksum)->digest)[i] =\r
+ (( isalpha(hex[i*2]) ? hex[i*2] - 'a' + 10 : hex[i*2] - '0') << 4) |\r
+ ( isalpha(hex[i*2+1]) ? hex[i*2+1] - 'a' + 10 : hex[i*2+1] - '0');\r
+ is_zeros |= (*checksum)->digest[i];\r
+ }\r
+\r
+ if (is_zeros == '\0')\r
+ *checksum = NULL;\r
+\r
+ return SVN_NO_ERROR;\r
+}\r
+\r
+svn_checksum_t *\r
+svn_checksum_dup(const svn_checksum_t *checksum,\r
+ apr_pool_t *pool)\r
+{\r
+ /* The duplicate of a NULL checksum is a NULL... */\r
+ if (checksum == NULL)\r
+ return NULL;\r
+\r
+ return svn_checksum__from_digest(checksum->digest, checksum->kind, pool);\r
+}\r
+\r
+svn_error_t *\r
+svn_checksum(svn_checksum_t **checksum,\r
+ svn_checksum_kind_t kind,\r
+ const void *data,\r
+ apr_size_t len,\r
+ apr_pool_t *pool)\r
+{\r
+ apr_sha1_ctx_t sha1_ctx;\r
+\r
+ SVN_ERR(validate_kind(kind));\r
+ *checksum = svn_checksum_create(kind, pool);\r
+\r
+ switch (kind)\r
+ {\r
+ case svn_checksum_md5:\r
+ apr_md5((unsigned char *)(*checksum)->digest, data, len);\r
+ break;\r
+\r
+ case svn_checksum_sha1:\r
+ apr_sha1_init(&sha1_ctx);\r
+ apr_sha1_update(&sha1_ctx, data, len);\r
+ apr_sha1_final((unsigned char *)(*checksum)->digest, &sha1_ctx);\r
+ break;\r
+\r
+ default:\r
+ /* We really shouldn't get here, but if we do... */\r
+ return svn_error_create(SVN_ERR_BAD_CHECKSUM_KIND, NULL, NULL);\r
+ }\r
+\r
+ return SVN_NO_ERROR;\r
+}\r
+\r
+\r
+svn_checksum_t *\r
+svn_checksum_empty_checksum(svn_checksum_kind_t kind,\r
+ apr_pool_t *pool)\r
+{\r
+ const unsigned char *digest;\r
+\r
+ switch (kind)\r
+ {\r
+ case svn_checksum_md5:\r
+ digest = svn_md5__empty_string_digest();\r
+ break;\r
+\r
+ case svn_checksum_sha1:\r
+ digest = svn_sha1__empty_string_digest();\r
+ break;\r
+\r
+ default:\r
+ /* We really shouldn't get here, but if we do... */\r
+ return NULL;\r
+ }\r
+\r
+ return svn_checksum__from_digest(digest, kind, pool);\r
+}\r
+\r
+struct svn_checksum_ctx_t\r
+{\r
+ void *apr_ctx;\r
+ svn_checksum_kind_t kind;\r
+};\r
+\r
+svn_checksum_ctx_t *\r
+svn_checksum_ctx_create(svn_checksum_kind_t kind,\r
+ apr_pool_t *pool)\r
+{\r
+ svn_checksum_ctx_t *ctx = apr_palloc(pool, sizeof(*ctx));\r
+\r
+ ctx->kind = kind;\r
+ switch (kind)\r
+ {\r
+ case svn_checksum_md5:\r
+ ctx->apr_ctx = apr_palloc(pool, sizeof(apr_md5_ctx_t));\r
+ apr_md5_init(ctx->apr_ctx);\r
+ break;\r
+\r
+ case svn_checksum_sha1:\r
+ ctx->apr_ctx = apr_palloc(pool, sizeof(apr_sha1_ctx_t));\r
+ apr_sha1_init(ctx->apr_ctx);\r
+ break;\r
+\r
+ default:\r
+ return NULL;\r
+ }\r
+\r
+ return ctx;\r
+}\r
+\r
+svn_error_t *\r
+svn_checksum_update(svn_checksum_ctx_t *ctx,\r
+ const void *data,\r
+ apr_size_t len)\r
+{\r
+ switch (ctx->kind)\r
+ {\r
+ case svn_checksum_md5:\r
+ apr_md5_update(ctx->apr_ctx, data, len);\r
+ break;\r
+\r
+ case svn_checksum_sha1:\r
+ apr_sha1_update(ctx->apr_ctx, data, len);\r
+ break;\r
+\r
+ default:\r
+ /* We really shouldn't get here, but if we do... */\r
+ return svn_error_create(SVN_ERR_BAD_CHECKSUM_KIND, NULL, NULL);\r
+ }\r
+\r
+ return SVN_NO_ERROR;\r
+}\r
+\r
+svn_error_t *\r
+svn_checksum_final(svn_checksum_t **checksum,\r
+ const svn_checksum_ctx_t *ctx,\r
+ apr_pool_t *pool)\r
+{\r
+ *checksum = svn_checksum_create(ctx->kind, pool);\r
+\r
+ switch (ctx->kind)\r
+ {\r
+ case svn_checksum_md5:\r
+ apr_md5_final((unsigned char *)(*checksum)->digest, ctx->apr_ctx);\r
+ break;\r
+\r
+ case svn_checksum_sha1:\r
+ apr_sha1_final((unsigned char *)(*checksum)->digest, ctx->apr_ctx);\r
+ break;\r
+\r
+ default:\r
+ /* We really shouldn't get here, but if we do... */\r
+ return svn_error_create(SVN_ERR_BAD_CHECKSUM_KIND, NULL, NULL);\r
+ }\r
+\r
+ return SVN_NO_ERROR;\r
+}\r
+\r
+apr_size_t\r
+svn_checksum_size(const svn_checksum_t *checksum)\r
+{\r
+ return DIGESTSIZE(checksum->kind);\r
+}\r
--- /dev/null
+/*\r
+ * cmdline.c : Helpers for command-line programs.\r
+ *\r
+ * ====================================================================\r
+ * Copyright (c) 2003-2009 CollabNet. All rights reserved.\r
+ *\r
+ * This software is licensed as described in the file COPYING, which\r
+ * you should have received as part of this distribution. The terms\r
+ * are also available at http://subversion.tigris.org/license-1.html.\r
+ * If newer versions of this license are posted there, you may use a\r
+ * newer version instead, at your option.\r
+ *\r
+ * This software consists of voluntary contributions made by many\r
+ * individuals. For exact contribution history, see the revision\r
+ * history and logs, available at http://subversion.tigris.org/.\r
+ * ====================================================================\r
+ */\r
+\r
+\r
+#include <stdlib.h> /* for atexit() */\r
+#include <stdio.h> /* for setvbuf() */\r
+#include <locale.h> /* for setlocale() */\r
+\r
+#ifndef WIN32\r
+#include <sys/types.h>\r
+#include <sys/stat.h>\r
+#include <fcntl.h>\r
+#include <unistd.h>\r
+#endif\r
+\r
+#include <apr_errno.h> /* for apr_strerror */\r
+#include <apr_general.h> /* for apr_initialize/apr_terminate */\r
+#include <apr_atomic.h> /* for apr_atomic_init */\r
+#include <apr_strings.h> /* for apr_snprintf */\r
+#include <apr_pools.h>\r
+\r
+#include "svn_cmdline.h"\r
+#include "svn_dso.h"\r
+#include "svn_path.h"\r
+#include "svn_pools.h"\r
+#include "svn_error.h"\r
+#include "svn_nls.h"\r
+#include "svn_utf.h"\r
+#include "svn_auth.h"\r
+#include "svn_version.h"\r
+#include "svn_xml.h"\r
+#include "svn_base64.h"\r
+#include "svn_config.h"\r
+\r
+//#include "private/svn_cmdline_private.h"\r
+//#include "private/svn_utf_private.h"\r
+\r
+//#include "svn_private_config.h"\r
+\r
+//#include "win32_crashrpt.h"\r
+\r
+/* The stdin encoding. If null, it's the same as the native encoding. */\r
+static const char *input_encoding = NULL;\r
+\r
+/* The stdout encoding. If null, it's the same as the native encoding. */\r
+static const char *output_encoding = NULL;\r
+\r
+#if 0\r
+int\r
+svn_cmdline_init(const char *progname, FILE *error_stream)\r
+{\r
+ apr_status_t status;\r
+ apr_pool_t *pool;\r
+ svn_error_t *err;\r
+\r
+#ifndef WIN32\r
+ {\r
+ struct stat st;\r
+\r
+ /* The following makes sure that file descriptors 0 (stdin), 1\r
+ (stdout) and 2 (stderr) will not be "reused", because if\r
+ e.g. file descriptor 2 would be reused when opening a file, a\r
+ write to stderr would write to that file and most likely\r
+ corrupt it. */\r
+ if ((fstat(0, &st) == -1 && open("/dev/null", O_RDONLY) == -1) ||\r
+ (fstat(1, &st) == -1 && open("/dev/null", O_WRONLY) == -1) ||\r
+ (fstat(2, &st) == -1 && open("/dev/null", O_WRONLY) == -1))\r
+ {\r
+ if (error_stream)\r
+ fprintf(error_stream, "%s: error: cannot open '/dev/null'\n",\r
+ progname);\r
+ return EXIT_FAILURE;\r
+ }\r
+ }\r
+#endif\r
+\r
+ /* Ignore any errors encountered while attempting to change stream\r
+ buffering, as the streams should retain their default buffering\r
+ modes. */\r
+ if (error_stream)\r
+ setvbuf(error_stream, NULL, _IONBF, 0);\r
+#ifndef WIN32\r
+ setvbuf(stdout, NULL, _IOLBF, 0);\r
+#endif\r
+\r
+#ifdef WIN32\r
+#if _MSC_VER < 1400\r
+ /* Initialize the input and output encodings. */\r
+ {\r
+ static char input_encoding_buffer[16];\r
+ static char output_encoding_buffer[16];\r
+\r
+ apr_snprintf(input_encoding_buffer, sizeof input_encoding_buffer,\r
+ "CP%u", (unsigned) GetConsoleCP());\r
+ input_encoding = input_encoding_buffer;\r
+\r
+ apr_snprintf(output_encoding_buffer, sizeof output_encoding_buffer,\r
+ "CP%u", (unsigned) GetConsoleOutputCP());\r
+ output_encoding = output_encoding_buffer;\r
+ }\r
+#endif /* _MSC_VER < 1400 */\r
+\r
+#ifdef SVN_USE_WIN32_CRASHHANDLER\r
+ /* Attach (but don't load) the crash handler */\r
+ SetUnhandledExceptionFilter(svn__unhandled_exception_filter);\r
+#endif\r
+\r
+#endif /* WIN32 */\r
+\r
+ /* C programs default to the "C" locale. But because svn is supposed\r
+ to be i18n-aware, it should inherit the default locale of its\r
+ environment. */\r
+ if (!setlocale(LC_ALL, "")\r
+ && !setlocale(LC_CTYPE, ""))\r
+ {\r
+ if (error_stream)\r
+ {\r
+ const char *env_vars[] = { "LC_ALL", "LC_CTYPE", "LANG", NULL };\r
+ const char **env_var = &env_vars[0], *env_val = NULL;\r
+ while (*env_var)\r
+ {\r
+ env_val = getenv(*env_var);\r
+ if (env_val && env_val[0])\r
+ break;\r
+ ++env_var;\r
+ }\r
+\r
+ if (!*env_var)\r
+ {\r
+ /* Unlikely. Can setlocale fail if no env vars are set? */\r
+ --env_var;\r
+ env_val = "not set";\r
+ }\r
+\r
+ fprintf(error_stream,\r
+ "%s: warning: cannot set LC_CTYPE locale\n"\r
+ "%s: warning: environment variable %s is %s\n"\r
+ "%s: warning: please check that your locale name is correct\n",\r
+ progname, progname, *env_var, env_val, progname);\r
+ }\r
+ }\r
+\r
+ /* Initialize the APR subsystem, and register an atexit() function\r
+ to Uninitialize that subsystem at program exit. */\r
+ status = apr_initialize();\r
+ if (status)\r
+ {\r
+ if (error_stream)\r
+ {\r
+ char buf[1024];\r
+ apr_strerror(status, buf, sizeof(buf) - 1);\r
+ fprintf(error_stream,\r
+ "%s: error: cannot initialize APR: %s\n",\r
+ progname, buf);\r
+ }\r
+ return EXIT_FAILURE;\r
+ }\r
+\r
+ /* This has to happen before any pools are created. */\r
+ if ((err = svn_dso_initialize2()))\r
+ {\r
+ if (error_stream && err->message)\r
+ fprintf(error_stream, "%s", err->message);\r
+\r
+ svn_error_clear(err);\r
+ return EXIT_FAILURE;\r
+ }\r
+\r
+ if (0 > atexit(apr_terminate))\r
+ {\r
+ if (error_stream)\r
+ fprintf(error_stream,\r
+ "%s: error: atexit registration failed\n",\r
+ progname);\r
+ return EXIT_FAILURE;\r
+ }\r
+\r
+ /* Create a pool for use by the UTF-8 routines. It will be cleaned\r
+ up by APR at exit time. */\r
+ pool = svn_pool_create(NULL);\r
+ svn_utf_initialize(pool);\r
+\r
+ if ((err = svn_nls_init()))\r
+ {\r
+ if (error_stream && err->message)\r
+ fprintf(error_stream, "%s", err->message);\r
+\r
+ svn_error_clear(err);\r
+ return EXIT_FAILURE;\r
+ }\r
+\r
+ return EXIT_SUCCESS;\r
+}\r
+#endif \r
+\r
+svn_error_t *\r
+svn_cmdline_cstring_from_utf8(const char **dest,\r
+ const char *src,\r
+ apr_pool_t *pool)\r
+{\r
+ if (output_encoding == NULL)\r
+ return svn_utf_cstring_from_utf8(dest, src, pool);\r
+ else\r
+ return svn_utf_cstring_from_utf8_ex2(dest, src, output_encoding, pool);\r
+}\r
+\r
+const char *\r
+svn_cmdline_cstring_from_utf8_fuzzy(const char *src,\r
+ apr_pool_t *pool)\r
+{\r
+ return svn_utf__cstring_from_utf8_fuzzy(src, pool,\r
+ svn_cmdline_cstring_from_utf8);\r
+}\r
+\r
+\r
+svn_error_t *\r
+svn_cmdline_cstring_to_utf8(const char **dest,\r
+ const char *src,\r
+ apr_pool_t *pool)\r
+{\r
+ if (input_encoding == NULL)\r
+ return svn_utf_cstring_to_utf8(dest, src, pool);\r
+ else\r
+ return svn_utf_cstring_to_utf8_ex2(dest, src, input_encoding, pool);\r
+}\r
+\r
+#if 0\r
+svn_error_t *\r
+svn_cmdline_path_local_style_from_utf8(const char **dest,\r
+ const char *src,\r
+ apr_pool_t *pool)\r
+{\r
+ return svn_cmdline_cstring_from_utf8(dest,\r
+ svn_path_local_style(src, pool),\r
+ pool);\r
+}\r
+\r
+svn_error_t *\r
+svn_cmdline_printf(apr_pool_t *pool, const char *fmt, ...)\r
+{\r
+ const char *message;\r
+ va_list ap;\r
+\r
+ /* A note about encoding issues:\r
+ * APR uses the execution character set, but here we give it UTF-8 strings,\r
+ * both the fmt argument and any other string arguments. Since apr_pvsprintf\r
+ * only cares about and produces ASCII characters, this works under the\r
+ * assumption that all supported platforms use an execution character set\r
+ * with ASCII as a subset.\r
+ */\r
+\r
+ va_start(ap, fmt);\r
+ message = apr_pvsprintf(pool, fmt, ap);\r
+ va_end(ap);\r
+\r
+ return svn_cmdline_fputs(message, stdout, pool);\r
+}\r
+#endif\r
+svn_error_t *\r
+svn_cmdline_fprintf(FILE *stream, apr_pool_t *pool, const char *fmt, ...)\r
+{\r
+ const char *message;\r
+ va_list ap;\r
+\r
+ /* See svn_cmdline_printf () for a note about character encoding issues. */\r
+\r
+ va_start(ap, fmt);\r
+ message = apr_pvsprintf(pool, fmt, ap);\r
+ va_end(ap);\r
+\r
+ return svn_cmdline_fputs(message, stream, pool);\r
+}\r
+\r
+svn_error_t *\r
+svn_cmdline_fputs(const char *string, FILE* stream, apr_pool_t *pool)\r
+{\r
+ svn_error_t *err;\r
+ const char *out;\r
+\r
+ err = svn_cmdline_cstring_from_utf8(&out, string, pool);\r
+\r
+ if (err)\r
+ {\r
+ svn_error_clear(err);\r
+ out = svn_cmdline_cstring_from_utf8_fuzzy(string, pool);\r
+ }\r
+\r
+ /* On POSIX systems, errno will be set on an error in fputs, but this might\r
+ not be the case on other platforms. We reset errno and only\r
+ use it if it was set by the below fputs call. Else, we just return\r
+ a generic error. */\r
+ errno = 0;\r
+\r
+ if (fputs(out, stream) == EOF)\r
+ {\r
+ if (errno)\r
+ return svn_error_wrap_apr(errno, _("Write error"));\r
+ else\r
+ return svn_error_create\r
+ (SVN_ERR_IO_WRITE_ERROR, NULL, NULL);\r
+ }\r
+\r
+ return SVN_NO_ERROR;\r
+}\r
+#if 0\r
+svn_error_t *\r
+svn_cmdline_fflush(FILE *stream)\r
+{\r
+ /* See comment in svn_cmdline_fputs about use of errno and stdio. */\r
+ errno = 0;\r
+ if (fflush(stream) == EOF)\r
+ {\r
+ if (errno)\r
+ return svn_error_wrap_apr(errno, _("Write error"));\r
+ else\r
+ return svn_error_create(SVN_ERR_IO_WRITE_ERROR, NULL, NULL);\r
+ }\r
+\r
+ return SVN_NO_ERROR;\r
+}\r
+\r
+const char *svn_cmdline_output_encoding(apr_pool_t *pool)\r
+{\r
+ if (output_encoding)\r
+ return apr_pstrdup(pool, output_encoding);\r
+ else\r
+ return SVN_APR_LOCALE_CHARSET;\r
+}\r
+\r
+int\r
+svn_cmdline_handle_exit_error(svn_error_t *err,\r
+ apr_pool_t *pool,\r
+ const char *prefix)\r
+{\r
+ svn_handle_error2(err, stderr, FALSE, prefix);\r
+ svn_error_clear(err);\r
+ if (pool)\r
+ svn_pool_destroy(pool);\r
+ return EXIT_FAILURE;\r
+}\r
+\r
+/* This implements 'svn_auth_ssl_server_trust_prompt_func_t'.\r
+\r
+ Don't actually prompt. Instead, set *CRED_P to valid credentials\r
+ iff FAILURES is empty or is exactly SVN_AUTH_SSL_UNKNOWNCA. If\r
+ there are any other failure bits, then set *CRED_P to null (that\r
+ is, reject the cert).\r
+\r
+ Ignore MAY_SAVE; we don't save certs we never prompted for.\r
+\r
+ Ignore BATON, REALM, and CERT_INFO,\r
+\r
+ Ignore any further films by George Lucas. */\r
+static svn_error_t *\r
+ssl_trust_unknown_server_cert\r
+ (svn_auth_cred_ssl_server_trust_t **cred_p,\r
+ void *baton,\r
+ const char *realm,\r
+ apr_uint32_t failures,\r
+ const svn_auth_ssl_server_cert_info_t *cert_info,\r
+ svn_boolean_t may_save,\r
+ apr_pool_t *pool)\r
+{\r
+ *cred_p = NULL;\r
+\r
+ if (failures == 0 || failures == SVN_AUTH_SSL_UNKNOWNCA)\r
+ {\r
+ *cred_p = apr_pcalloc(pool, sizeof(**cred_p));\r
+ (*cred_p)->may_save = FALSE;\r
+ (*cred_p)->accepted_failures = failures;\r
+ }\r
+\r
+ return SVN_NO_ERROR;\r
+}\r
+\r
+svn_error_t *\r
+svn_cmdline_create_auth_baton(svn_auth_baton_t **ab,\r
+ svn_boolean_t non_interactive,\r
+ const char *auth_username,\r
+ const char *auth_password,\r
+ const char *config_dir,\r
+ svn_boolean_t no_auth_cache,\r
+ svn_boolean_t trust_server_cert,\r
+ svn_config_t *cfg,\r
+ svn_cancel_func_t cancel_func,\r
+ void *cancel_baton,\r
+ apr_pool_t *pool)\r
+{\r
+ svn_boolean_t store_password_val = TRUE;\r
+ svn_boolean_t store_auth_creds_val = TRUE;\r
+ svn_auth_provider_object_t *provider;\r
+ svn_cmdline_prompt_baton2_t *pb = NULL;\r
+\r
+ /* The whole list of registered providers */\r
+ apr_array_header_t *providers;\r
+\r
+ /* Populate the registered providers with the platform-specific providers */\r
+ SVN_ERR(svn_auth_get_platform_specific_client_providers\r
+ (&providers, cfg, pool));\r
+\r
+ /* If we have a cancellation function, cram it and the stuff it\r
+ needs into the prompt baton. */\r
+ if (cancel_func)\r
+ {\r
+ pb = apr_palloc(pool, sizeof(*pb));\r
+ pb->cancel_func = cancel_func;\r
+ pb->cancel_baton = cancel_baton;\r
+ pb->config_dir = config_dir;\r
+ }\r
+\r
+ if (non_interactive == FALSE)\r
+ {\r
+ /* This provider doesn't prompt the user in order to get creds;\r
+ it prompts the user regarding the caching of creds. */\r
+ svn_auth_get_simple_provider2(&provider,\r
+ svn_cmdline_auth_plaintext_prompt,\r
+ pb, pool);\r
+ }\r
+ else\r
+ {\r
+ svn_auth_get_simple_provider2(&provider, NULL, NULL, pool);\r
+ }\r
+\r
+ APR_ARRAY_PUSH(providers, svn_auth_provider_object_t *) = provider;\r
+ svn_auth_get_username_provider(&provider, pool);\r
+ APR_ARRAY_PUSH(providers, svn_auth_provider_object_t *) = provider;\r
+\r
+ /* The server-cert, client-cert, and client-cert-password providers. */\r
+ SVN_ERR(svn_auth_get_platform_specific_provider(&provider,\r
+ "windows",\r
+ "ssl_server_trust",\r
+ pool));\r
+\r
+ if (provider)\r
+ APR_ARRAY_PUSH(providers, svn_auth_provider_object_t *) = provider;\r
+\r
+ svn_auth_get_ssl_server_trust_file_provider(&provider, pool);\r
+ APR_ARRAY_PUSH(providers, svn_auth_provider_object_t *) = provider;\r
+ svn_auth_get_ssl_client_cert_file_provider(&provider, pool);\r
+ APR_ARRAY_PUSH(providers, svn_auth_provider_object_t *) = provider;\r
+\r
+ if (non_interactive == FALSE)\r
+ {\r
+ /* This provider doesn't prompt the user in order to get creds;\r
+ it prompts the user regarding the caching of creds. */\r
+ svn_auth_get_ssl_client_cert_pw_file_provider2\r
+ (&provider, svn_cmdline_auth_plaintext_passphrase_prompt,\r
+ pb, pool);\r
+ }\r
+ else\r
+ {\r
+ svn_auth_get_ssl_client_cert_pw_file_provider2(&provider, NULL, NULL,\r
+ pool);\r
+ }\r
+ APR_ARRAY_PUSH(providers, svn_auth_provider_object_t *) = provider;\r
+\r
+ if (non_interactive == FALSE)\r
+ {\r
+ /* Two basic prompt providers: username/password, and just username. */\r
+ svn_auth_get_simple_prompt_provider(&provider,\r
+ svn_cmdline_auth_simple_prompt,\r
+ pb,\r
+ 2, /* retry limit */\r
+ pool);\r
+ APR_ARRAY_PUSH(providers, svn_auth_provider_object_t *) = provider;\r
+\r
+ svn_auth_get_username_prompt_provider\r
+ (&provider, svn_cmdline_auth_username_prompt, pb,\r
+ 2, /* retry limit */ pool);\r
+ APR_ARRAY_PUSH(providers, svn_auth_provider_object_t *) = provider;\r
+\r
+ /* Three ssl prompt providers, for server-certs, client-certs,\r
+ and client-cert-passphrases. */\r
+ svn_auth_get_ssl_server_trust_prompt_provider\r
+ (&provider, svn_cmdline_auth_ssl_server_trust_prompt, pb, pool);\r
+ APR_ARRAY_PUSH(providers, svn_auth_provider_object_t *) = provider;\r
+\r
+ svn_auth_get_ssl_client_cert_prompt_provider\r
+ (&provider, svn_cmdline_auth_ssl_client_cert_prompt, pb, 2, pool);\r
+ APR_ARRAY_PUSH(providers, svn_auth_provider_object_t *) = provider;\r
+\r
+ svn_auth_get_ssl_client_cert_pw_prompt_provider\r
+ (&provider, svn_cmdline_auth_ssl_client_cert_pw_prompt, pb, 2, pool);\r
+ APR_ARRAY_PUSH(providers, svn_auth_provider_object_t *) = provider;\r
+ }\r
+ else if (trust_server_cert)\r
+ {\r
+ /* Remember, only register this provider if non_interactive. */\r
+ svn_auth_get_ssl_server_trust_prompt_provider\r
+ (&provider, ssl_trust_unknown_server_cert, NULL, pool);\r
+ APR_ARRAY_PUSH(providers, svn_auth_provider_object_t *) = provider;\r
+ }\r
+\r
+ /* Build an authentication baton to give to libsvn_client. */\r
+ svn_auth_open(ab, providers, pool);\r
+\r
+ /* Place any default --username or --password credentials into the\r
+ auth_baton's run-time parameter hash. */\r
+ if (auth_username)\r
+ svn_auth_set_parameter(*ab, SVN_AUTH_PARAM_DEFAULT_USERNAME,\r
+ auth_username);\r
+ if (auth_password)\r
+ svn_auth_set_parameter(*ab, SVN_AUTH_PARAM_DEFAULT_PASSWORD,\r
+ auth_password);\r
+\r
+ /* Same with the --non-interactive option. */\r
+ if (non_interactive)\r
+ svn_auth_set_parameter(*ab, SVN_AUTH_PARAM_NON_INTERACTIVE, "");\r
+\r
+ if (config_dir)\r
+ svn_auth_set_parameter(*ab, SVN_AUTH_PARAM_CONFIG_DIR,\r
+ config_dir);\r
+\r
+ /* Determine whether storing passwords in any form is allowed.\r
+ * This is the deprecated location for this option, the new\r
+ * location is SVN_CONFIG_CATEGORY_SERVERS. The RA layer may\r
+ * override the value we set here. */\r
+ SVN_ERR(svn_config_get_bool(cfg, &store_password_val,\r
+ SVN_CONFIG_SECTION_AUTH,\r
+ SVN_CONFIG_OPTION_STORE_PASSWORDS,\r
+ SVN_CONFIG_DEFAULT_OPTION_STORE_PASSWORDS));\r
+\r
+ if (! store_password_val)\r
+ svn_auth_set_parameter(*ab, SVN_AUTH_PARAM_DONT_STORE_PASSWORDS, "");\r
+\r
+ /* Determine whether we are allowed to write to the auth/ area.\r
+ * This is the deprecated location for this option, the new\r
+ * location is SVN_CONFIG_CATEGORY_SERVERS. The RA layer may\r
+ * override the value we set here. */\r
+ SVN_ERR(svn_config_get_bool(cfg, &store_auth_creds_val,\r
+ SVN_CONFIG_SECTION_AUTH,\r
+ SVN_CONFIG_OPTION_STORE_AUTH_CREDS,\r
+ SVN_CONFIG_DEFAULT_OPTION_STORE_AUTH_CREDS));\r
+\r
+ if (no_auth_cache || ! store_auth_creds_val)\r
+ svn_auth_set_parameter(*ab, SVN_AUTH_PARAM_NO_AUTH_CACHE, "");\r
+\r
+#ifdef SVN_HAVE_GNOME_KEYRING\r
+ svn_auth_set_parameter(*ab, SVN_AUTH_PARAM_GNOME_KEYRING_UNLOCK_PROMPT_FUNC,\r
+ &svn_cmdline__auth_gnome_keyring_unlock_prompt);\r
+#endif /* SVN_HAVE_GNOME_KEYRING */\r
+\r
+ return SVN_NO_ERROR;\r
+}\r
+\r
+svn_error_t *\r
+svn_cmdline__getopt_init(apr_getopt_t **os,\r
+ int argc,\r
+ const char *argv[],\r
+ apr_pool_t *pool)\r
+{\r
+ apr_status_t apr_err = apr_getopt_init(os, pool, argc, argv);\r
+ if (apr_err)\r
+ return svn_error_wrap_apr(apr_err,\r
+ _("Error initializing command line arguments"));\r
+ return SVN_NO_ERROR;\r
+}\r
+\r
+\r
+void\r
+svn_cmdline__print_xml_prop(svn_stringbuf_t **outstr,\r
+ const char* propname,\r
+ svn_string_t *propval,\r
+ apr_pool_t *pool)\r
+{\r
+ const char *xml_safe;\r
+ const char *encoding = NULL;\r
+\r
+ if (*outstr == NULL)\r
+ *outstr = svn_stringbuf_create("", pool);\r
+\r
+ if (svn_xml_is_xml_safe(propval->data, propval->len))\r
+ {\r
+ svn_stringbuf_t *xml_esc = NULL;\r
+ svn_xml_escape_cdata_string(&xml_esc, propval, pool);\r
+ xml_safe = xml_esc->data;\r
+ }\r
+ else\r
+ {\r
+ const svn_string_t *base64ed = svn_base64_encode_string2(propval, TRUE,\r
+ pool);\r
+ encoding = "base64";\r
+ xml_safe = base64ed->data;\r
+ }\r
+\r
+ if (encoding)\r
+ svn_xml_make_open_tag(outstr, pool, svn_xml_protect_pcdata,\r
+ "property", "name", propname,\r
+ "encoding", encoding, NULL);\r
+ else\r
+ svn_xml_make_open_tag(outstr, pool, svn_xml_protect_pcdata,\r
+ "property", "name", propname, NULL);\r
+\r
+ svn_stringbuf_appendcstr(*outstr, xml_safe);\r
+\r
+ svn_xml_make_close_tag(outstr, pool, "property");\r
+\r
+ return;\r
+}\r
+\r
+\r
+#endif
\ No newline at end of file
--- /dev/null
+/* compress.c -- compress a memory buffer\r
+ * Copyright (C) 1995-2002 Jean-loup Gailly.\r
+ * For conditions of distribution and use, see copyright notice in zlib.h \r
+ */\r
+\r
+/* @(#) $Id: compress.c,v 1.1 2003/05/23 21:05:30 steveking Exp $ */\r
+\r
+#include "zlib.h"\r
+\r
+/* ===========================================================================\r
+ Compresses the source buffer into the destination buffer. The level\r
+ parameter has the same meaning as in deflateInit. sourceLen is the byte\r
+ length of the source buffer. Upon entry, destLen is the total size of the\r
+ destination buffer, which must be at least 0.1% larger than sourceLen plus\r
+ 12 bytes. Upon exit, destLen is the actual size of the compressed buffer.\r
+\r
+ compress2 returns Z_OK if success, Z_MEM_ERROR if there was not enough\r
+ memory, Z_BUF_ERROR if there was not enough room in the output buffer,\r
+ Z_STREAM_ERROR if the level parameter is invalid.\r
+*/\r
+int ZEXPORT compress2 (dest, destLen, source, sourceLen, level)\r
+ Bytef *dest;\r
+ uLongf *destLen;\r
+ const Bytef *source;\r
+ uLong sourceLen;\r
+ int level;\r
+{\r
+ z_stream stream;\r
+ int err;\r
+\r
+ stream.next_in = (Bytef*)source;\r
+ stream.avail_in = (uInt)sourceLen;\r
+#ifdef MAXSEG_64K\r
+ /* Check for source > 64K on 16-bit machine: */\r
+ if ((uLong)stream.avail_in != sourceLen) return Z_BUF_ERROR;\r
+#endif\r
+ stream.next_out = dest;\r
+ stream.avail_out = (uInt)*destLen;\r
+ if ((uLong)stream.avail_out != *destLen) return Z_BUF_ERROR;\r
+\r
+ stream.zalloc = (alloc_func)0;\r
+ stream.zfree = (free_func)0;\r
+ stream.opaque = (voidpf)0;\r
+\r
+ err = deflateInit(&stream, level);\r
+ if (err != Z_OK) return err;\r
+\r
+ err = deflate(&stream, Z_FINISH);\r
+ if (err != Z_STREAM_END) {\r
+ deflateEnd(&stream);\r
+ return err == Z_OK ? Z_BUF_ERROR : err;\r
+ }\r
+ *destLen = stream.total_out;\r
+\r
+ err = deflateEnd(&stream);\r
+ return err;\r
+}\r
+\r
+/* ===========================================================================\r
+ */\r
+int ZEXPORT compress (dest, destLen, source, sourceLen)\r
+ Bytef *dest;\r
+ uLongf *destLen;\r
+ const Bytef *source;\r
+ uLong sourceLen;\r
+{\r
+ return compress2(dest, destLen, source, sourceLen, Z_DEFAULT_COMPRESSION);\r
+}\r
--- /dev/null
+/* crc32.c -- compute the CRC-32 of a data stream\r
+ * Copyright (C) 1995-2002 Mark Adler\r
+ * For conditions of distribution and use, see copyright notice in zlib.h \r
+ */\r
+\r
+/* @(#) $Id: crc32.c,v 1.1 2003/05/23 21:05:30 steveking Exp $ */\r
+\r
+#include "zlib.h"\r
+\r
+#define local static\r
+\r
+#ifdef DYNAMIC_CRC_TABLE\r
+\r
+local int crc_table_empty = 1;\r
+local uLongf crc_table[256];\r
+local void make_crc_table OF((void));\r
+\r
+/*\r
+ Generate a table for a byte-wise 32-bit CRC calculation on the polynomial:\r
+ x^32+x^26+x^23+x^22+x^16+x^12+x^11+x^10+x^8+x^7+x^5+x^4+x^2+x+1.\r
+\r
+ Polynomials over GF(2) are represented in binary, one bit per coefficient,\r
+ with the lowest powers in the most significant bit. Then adding polynomials\r
+ is just exclusive-or, and multiplying a polynomial by x is a right shift by\r
+ one. If we call the above polynomial p, and represent a byte as the\r
+ polynomial q, also with the lowest power in the most significant bit (so the\r
+ byte 0xb1 is the polynomial x^7+x^3+x+1), then the CRC is (q*x^32) mod p,\r
+ where a mod b means the remainder after dividing a by b.\r
+\r
+ This calculation is done using the shift-register method of multiplying and\r
+ taking the remainder. The register is initialized to zero, and for each\r
+ incoming bit, x^32 is added mod p to the register if the bit is a one (where\r
+ x^32 mod p is p+x^32 = x^26+...+1), and the register is multiplied mod p by\r
+ x (which is shifting right by one and adding x^32 mod p if the bit shifted\r
+ out is a one). We start with the highest power (least significant bit) of\r
+ q and repeat for all eight bits of q.\r
+\r
+ The table is simply the CRC of all possible eight bit values. This is all\r
+ the information needed to generate CRC's on data a byte at a time for all\r
+ combinations of CRC register values and incoming bytes.\r
+*/\r
+local void make_crc_table()\r
+{\r
+ uLong c;\r
+ int n, k;\r
+ uLong poly; /* polynomial exclusive-or pattern */\r
+ /* terms of polynomial defining this crc (except x^32): */\r
+ static const Byte p[] = {0,1,2,4,5,7,8,10,11,12,16,22,23,26};\r
+\r
+ /* make exclusive-or pattern from polynomial (0xedb88320L) */\r
+ poly = 0L;\r
+ for (n = 0; n < sizeof(p)/sizeof(Byte); n++)\r
+ poly |= 1L << (31 - p[n]);\r
+ \r
+ for (n = 0; n < 256; n++)\r
+ {\r
+ c = (uLong)n;\r
+ for (k = 0; k < 8; k++)\r
+ c = c & 1 ? poly ^ (c >> 1) : c >> 1;\r
+ crc_table[n] = c;\r
+ }\r
+ crc_table_empty = 0;\r
+}\r
+#else\r
+/* ========================================================================\r
+ * Table of CRC-32's of all single-byte values (made by make_crc_table)\r
+ */\r
+local const uLongf crc_table[256] = {\r
+ 0x00000000L, 0x77073096L, 0xee0e612cL, 0x990951baL, 0x076dc419L,\r
+ 0x706af48fL, 0xe963a535L, 0x9e6495a3L, 0x0edb8832L, 0x79dcb8a4L,\r
+ 0xe0d5e91eL, 0x97d2d988L, 0x09b64c2bL, 0x7eb17cbdL, 0xe7b82d07L,\r
+ 0x90bf1d91L, 0x1db71064L, 0x6ab020f2L, 0xf3b97148L, 0x84be41deL,\r
+ 0x1adad47dL, 0x6ddde4ebL, 0xf4d4b551L, 0x83d385c7L, 0x136c9856L,\r
+ 0x646ba8c0L, 0xfd62f97aL, 0x8a65c9ecL, 0x14015c4fL, 0x63066cd9L,\r
+ 0xfa0f3d63L, 0x8d080df5L, 0x3b6e20c8L, 0x4c69105eL, 0xd56041e4L,\r
+ 0xa2677172L, 0x3c03e4d1L, 0x4b04d447L, 0xd20d85fdL, 0xa50ab56bL,\r
+ 0x35b5a8faL, 0x42b2986cL, 0xdbbbc9d6L, 0xacbcf940L, 0x32d86ce3L,\r
+ 0x45df5c75L, 0xdcd60dcfL, 0xabd13d59L, 0x26d930acL, 0x51de003aL,\r
+ 0xc8d75180L, 0xbfd06116L, 0x21b4f4b5L, 0x56b3c423L, 0xcfba9599L,\r
+ 0xb8bda50fL, 0x2802b89eL, 0x5f058808L, 0xc60cd9b2L, 0xb10be924L,\r
+ 0x2f6f7c87L, 0x58684c11L, 0xc1611dabL, 0xb6662d3dL, 0x76dc4190L,\r
+ 0x01db7106L, 0x98d220bcL, 0xefd5102aL, 0x71b18589L, 0x06b6b51fL,\r
+ 0x9fbfe4a5L, 0xe8b8d433L, 0x7807c9a2L, 0x0f00f934L, 0x9609a88eL,\r
+ 0xe10e9818L, 0x7f6a0dbbL, 0x086d3d2dL, 0x91646c97L, 0xe6635c01L,\r
+ 0x6b6b51f4L, 0x1c6c6162L, 0x856530d8L, 0xf262004eL, 0x6c0695edL,\r
+ 0x1b01a57bL, 0x8208f4c1L, 0xf50fc457L, 0x65b0d9c6L, 0x12b7e950L,\r
+ 0x8bbeb8eaL, 0xfcb9887cL, 0x62dd1ddfL, 0x15da2d49L, 0x8cd37cf3L,\r
+ 0xfbd44c65L, 0x4db26158L, 0x3ab551ceL, 0xa3bc0074L, 0xd4bb30e2L,\r
+ 0x4adfa541L, 0x3dd895d7L, 0xa4d1c46dL, 0xd3d6f4fbL, 0x4369e96aL,\r
+ 0x346ed9fcL, 0xad678846L, 0xda60b8d0L, 0x44042d73L, 0x33031de5L,\r
+ 0xaa0a4c5fL, 0xdd0d7cc9L, 0x5005713cL, 0x270241aaL, 0xbe0b1010L,\r
+ 0xc90c2086L, 0x5768b525L, 0x206f85b3L, 0xb966d409L, 0xce61e49fL,\r
+ 0x5edef90eL, 0x29d9c998L, 0xb0d09822L, 0xc7d7a8b4L, 0x59b33d17L,\r
+ 0x2eb40d81L, 0xb7bd5c3bL, 0xc0ba6cadL, 0xedb88320L, 0x9abfb3b6L,\r
+ 0x03b6e20cL, 0x74b1d29aL, 0xead54739L, 0x9dd277afL, 0x04db2615L,\r
+ 0x73dc1683L, 0xe3630b12L, 0x94643b84L, 0x0d6d6a3eL, 0x7a6a5aa8L,\r
+ 0xe40ecf0bL, 0x9309ff9dL, 0x0a00ae27L, 0x7d079eb1L, 0xf00f9344L,\r
+ 0x8708a3d2L, 0x1e01f268L, 0x6906c2feL, 0xf762575dL, 0x806567cbL,\r
+ 0x196c3671L, 0x6e6b06e7L, 0xfed41b76L, 0x89d32be0L, 0x10da7a5aL,\r
+ 0x67dd4accL, 0xf9b9df6fL, 0x8ebeeff9L, 0x17b7be43L, 0x60b08ed5L,\r
+ 0xd6d6a3e8L, 0xa1d1937eL, 0x38d8c2c4L, 0x4fdff252L, 0xd1bb67f1L,\r
+ 0xa6bc5767L, 0x3fb506ddL, 0x48b2364bL, 0xd80d2bdaL, 0xaf0a1b4cL,\r
+ 0x36034af6L, 0x41047a60L, 0xdf60efc3L, 0xa867df55L, 0x316e8eefL,\r
+ 0x4669be79L, 0xcb61b38cL, 0xbc66831aL, 0x256fd2a0L, 0x5268e236L,\r
+ 0xcc0c7795L, 0xbb0b4703L, 0x220216b9L, 0x5505262fL, 0xc5ba3bbeL,\r
+ 0xb2bd0b28L, 0x2bb45a92L, 0x5cb36a04L, 0xc2d7ffa7L, 0xb5d0cf31L,\r
+ 0x2cd99e8bL, 0x5bdeae1dL, 0x9b64c2b0L, 0xec63f226L, 0x756aa39cL,\r
+ 0x026d930aL, 0x9c0906a9L, 0xeb0e363fL, 0x72076785L, 0x05005713L,\r
+ 0x95bf4a82L, 0xe2b87a14L, 0x7bb12baeL, 0x0cb61b38L, 0x92d28e9bL,\r
+ 0xe5d5be0dL, 0x7cdcefb7L, 0x0bdbdf21L, 0x86d3d2d4L, 0xf1d4e242L,\r
+ 0x68ddb3f8L, 0x1fda836eL, 0x81be16cdL, 0xf6b9265bL, 0x6fb077e1L,\r
+ 0x18b74777L, 0x88085ae6L, 0xff0f6a70L, 0x66063bcaL, 0x11010b5cL,\r
+ 0x8f659effL, 0xf862ae69L, 0x616bffd3L, 0x166ccf45L, 0xa00ae278L,\r
+ 0xd70dd2eeL, 0x4e048354L, 0x3903b3c2L, 0xa7672661L, 0xd06016f7L,\r
+ 0x4969474dL, 0x3e6e77dbL, 0xaed16a4aL, 0xd9d65adcL, 0x40df0b66L,\r
+ 0x37d83bf0L, 0xa9bcae53L, 0xdebb9ec5L, 0x47b2cf7fL, 0x30b5ffe9L,\r
+ 0xbdbdf21cL, 0xcabac28aL, 0x53b39330L, 0x24b4a3a6L, 0xbad03605L,\r
+ 0xcdd70693L, 0x54de5729L, 0x23d967bfL, 0xb3667a2eL, 0xc4614ab8L,\r
+ 0x5d681b02L, 0x2a6f2b94L, 0xb40bbe37L, 0xc30c8ea1L, 0x5a05df1bL,\r
+ 0x2d02ef8dL\r
+};\r
+#endif\r
+\r
+/* =========================================================================\r
+ * This function can be used by asm versions of crc32()\r
+ */\r
+const uLongf * ZEXPORT get_crc_table()\r
+{\r
+#ifdef DYNAMIC_CRC_TABLE\r
+ if (crc_table_empty) make_crc_table();\r
+#endif\r
+ return (const uLongf *)crc_table;\r
+}\r
+\r
+/* ========================================================================= */\r
+#define DO1(buf) crc = crc_table[((int)crc ^ (*buf++)) & 0xff] ^ (crc >> 8);\r
+#define DO2(buf) DO1(buf); DO1(buf);\r
+#define DO4(buf) DO2(buf); DO2(buf);\r
+#define DO8(buf) DO4(buf); DO4(buf);\r
+\r
+/* ========================================================================= */\r
+uLong ZEXPORT crc32(crc, buf, len)\r
+ uLong crc;\r
+ const Bytef *buf;\r
+ uInt len;\r
+{\r
+ if (buf == Z_NULL) return 0L;\r
+#ifdef DYNAMIC_CRC_TABLE\r
+ if (crc_table_empty)\r
+ make_crc_table();\r
+#endif\r
+ crc = crc ^ 0xffffffffL;\r
+ while (len >= 8)\r
+ {\r
+ DO8(buf);\r
+ len -= 8;\r
+ }\r
+ if (len) do {\r
+ DO1(buf);\r
+ } while (--len);\r
+ return crc ^ 0xffffffffL;\r
+}\r
--- /dev/null
+/*\r
+ * ctype.c: Character classification routines\r
+ *\r
+ * ====================================================================\r
+ * Copyright (c) 2000-2004 CollabNet. All rights reserved.\r
+ *\r
+ * This software is licensed as described in the file COPYING, which\r
+ * you should have received as part of this distribution. The terms\r
+ * are also available at http://subversion.tigris.org/license-1.html.\r
+ * If newer versions of this license are posted there, you may use a\r
+ * newer version instead, at your option.\r
+ *\r
+ * This software consists of voluntary contributions made by many\r
+ * individuals. For exact contribution history, see the revision\r
+ * history and logs, available at http://subversion.tigris.org/.\r
+ * ====================================================================\r
+ */\r
+\r
+\r
+\f\r
+#include "svn_ctype.h"\r
+\r
+const apr_uint32_t svn_ctype_table_internal[256] =\r
+ {\r
+ /* **** DO NOT EDIT! ****\r
+ This table was generated by genctype.py, make changes there. */\r
+ /* nul */ SVN_CTYPE_ASCII | SVN_CTYPE_CNTRL,\r
+ /* soh */ SVN_CTYPE_ASCII | SVN_CTYPE_CNTRL,\r
+ /* stx */ SVN_CTYPE_ASCII | SVN_CTYPE_CNTRL,\r
+ /* etx */ SVN_CTYPE_ASCII | SVN_CTYPE_CNTRL,\r
+ /* eot */ SVN_CTYPE_ASCII | SVN_CTYPE_CNTRL,\r
+ /* enq */ SVN_CTYPE_ASCII | SVN_CTYPE_CNTRL,\r
+ /* ack */ SVN_CTYPE_ASCII | SVN_CTYPE_CNTRL,\r
+ /* bel */ SVN_CTYPE_ASCII | SVN_CTYPE_CNTRL,\r
+ /* bs */ SVN_CTYPE_ASCII | SVN_CTYPE_CNTRL,\r
+ /* ht */ SVN_CTYPE_ASCII | SVN_CTYPE_CNTRL | SVN_CTYPE_SPACE,\r
+ /* nl */ SVN_CTYPE_ASCII | SVN_CTYPE_CNTRL | SVN_CTYPE_SPACE,\r
+ /* vt */ SVN_CTYPE_ASCII | SVN_CTYPE_CNTRL | SVN_CTYPE_SPACE,\r
+ /* np */ SVN_CTYPE_ASCII | SVN_CTYPE_CNTRL | SVN_CTYPE_SPACE,\r
+ /* cr */ SVN_CTYPE_ASCII | SVN_CTYPE_CNTRL | SVN_CTYPE_SPACE,\r
+ /* so */ SVN_CTYPE_ASCII | SVN_CTYPE_CNTRL,\r
+ /* si */ SVN_CTYPE_ASCII | SVN_CTYPE_CNTRL,\r
+ /* dle */ SVN_CTYPE_ASCII | SVN_CTYPE_CNTRL,\r
+ /* dc1 */ SVN_CTYPE_ASCII | SVN_CTYPE_CNTRL,\r
+ /* dc2 */ SVN_CTYPE_ASCII | SVN_CTYPE_CNTRL,\r
+ /* dc3 */ SVN_CTYPE_ASCII | SVN_CTYPE_CNTRL,\r
+ /* dc4 */ SVN_CTYPE_ASCII | SVN_CTYPE_CNTRL,\r
+ /* nak */ SVN_CTYPE_ASCII | SVN_CTYPE_CNTRL,\r
+ /* syn */ SVN_CTYPE_ASCII | SVN_CTYPE_CNTRL,\r
+ /* etb */ SVN_CTYPE_ASCII | SVN_CTYPE_CNTRL,\r
+ /* can */ SVN_CTYPE_ASCII | SVN_CTYPE_CNTRL,\r
+ /* em */ SVN_CTYPE_ASCII | SVN_CTYPE_CNTRL,\r
+ /* sub */ SVN_CTYPE_ASCII | SVN_CTYPE_CNTRL,\r
+ /* esc */ SVN_CTYPE_ASCII | SVN_CTYPE_CNTRL,\r
+ /* fs */ SVN_CTYPE_ASCII | SVN_CTYPE_CNTRL,\r
+ /* gs */ SVN_CTYPE_ASCII | SVN_CTYPE_CNTRL,\r
+ /* rs */ SVN_CTYPE_ASCII | SVN_CTYPE_CNTRL,\r
+ /* us */ SVN_CTYPE_ASCII | SVN_CTYPE_CNTRL,\r
+ /* sp */ SVN_CTYPE_ASCII | SVN_CTYPE_SPACE,\r
+ /* ! */ SVN_CTYPE_ASCII | SVN_CTYPE_PUNCT,\r
+ /* " */ SVN_CTYPE_ASCII | SVN_CTYPE_PUNCT,\r
+ /* # */ SVN_CTYPE_ASCII | SVN_CTYPE_PUNCT,\r
+ /* $ */ SVN_CTYPE_ASCII | SVN_CTYPE_PUNCT,\r
+ /* % */ SVN_CTYPE_ASCII | SVN_CTYPE_PUNCT,\r
+ /* & */ SVN_CTYPE_ASCII | SVN_CTYPE_PUNCT,\r
+ /* ' */ SVN_CTYPE_ASCII | SVN_CTYPE_PUNCT,\r
+ /* ( */ SVN_CTYPE_ASCII | SVN_CTYPE_PUNCT,\r
+ /* ) */ SVN_CTYPE_ASCII | SVN_CTYPE_PUNCT,\r
+ /* * */ SVN_CTYPE_ASCII | SVN_CTYPE_PUNCT,\r
+ /* + */ SVN_CTYPE_ASCII | SVN_CTYPE_PUNCT,\r
+ /* , */ SVN_CTYPE_ASCII | SVN_CTYPE_PUNCT,\r
+ /* - */ SVN_CTYPE_ASCII | SVN_CTYPE_PUNCT,\r
+ /* . */ SVN_CTYPE_ASCII | SVN_CTYPE_PUNCT,\r
+ /* / */ SVN_CTYPE_ASCII | SVN_CTYPE_PUNCT,\r
+ /* 0 */ SVN_CTYPE_ASCII | SVN_CTYPE_DIGIT,\r
+ /* 1 */ SVN_CTYPE_ASCII | SVN_CTYPE_DIGIT,\r
+ /* 2 */ SVN_CTYPE_ASCII | SVN_CTYPE_DIGIT,\r
+ /* 3 */ SVN_CTYPE_ASCII | SVN_CTYPE_DIGIT,\r
+ /* 4 */ SVN_CTYPE_ASCII | SVN_CTYPE_DIGIT,\r
+ /* 5 */ SVN_CTYPE_ASCII | SVN_CTYPE_DIGIT,\r
+ /* 6 */ SVN_CTYPE_ASCII | SVN_CTYPE_DIGIT,\r
+ /* 7 */ SVN_CTYPE_ASCII | SVN_CTYPE_DIGIT,\r
+ /* 8 */ SVN_CTYPE_ASCII | SVN_CTYPE_DIGIT,\r
+ /* 9 */ SVN_CTYPE_ASCII | SVN_CTYPE_DIGIT,\r
+ /* : */ SVN_CTYPE_ASCII | SVN_CTYPE_PUNCT,\r
+ /* ; */ SVN_CTYPE_ASCII | SVN_CTYPE_PUNCT,\r
+ /* < */ SVN_CTYPE_ASCII | SVN_CTYPE_PUNCT,\r
+ /* = */ SVN_CTYPE_ASCII | SVN_CTYPE_PUNCT,\r
+ /* > */ SVN_CTYPE_ASCII | SVN_CTYPE_PUNCT,\r
+ /* ? */ SVN_CTYPE_ASCII | SVN_CTYPE_PUNCT,\r
+ /* @ */ SVN_CTYPE_ASCII | SVN_CTYPE_PUNCT,\r
+ /* A */ SVN_CTYPE_ASCII | SVN_CTYPE_UPPER | SVN_CTYPE_XALPHA,\r
+ /* B */ SVN_CTYPE_ASCII | SVN_CTYPE_UPPER | SVN_CTYPE_XALPHA,\r
+ /* C */ SVN_CTYPE_ASCII | SVN_CTYPE_UPPER | SVN_CTYPE_XALPHA,\r
+ /* D */ SVN_CTYPE_ASCII | SVN_CTYPE_UPPER | SVN_CTYPE_XALPHA,\r
+ /* &n