Hi, Alpha, it looks like the svn command line can accept the pure patch file generated from tortoiseGit.
I just create a dummy patch file from tortoisegit (I create from the c::b git clone), see below:
src/sdk/annoyingdialog.cpp | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/src/sdk/annoyingdialog.cpp b/src/sdk/annoyingdialog.cpp
index c6a5a29..b206647 100644
--- a/src/sdk/annoyingdialog.cpp
+++ b/src/sdk/annoyingdialog.cpp
@@ -62,6 +62,8 @@ AnnoyingDialog::AnnoyingDialog(const wxString& caption, const wxString& message,
wxString bTxt1;
wxString bTxt2;
wxString bTxt3;
+
+ adding many comments here to test the patch utility;
if(style == OK || style == ONE_BUTTON)
{
@@ -91,6 +93,8 @@ AnnoyingDialog::AnnoyingDialog(const wxString& caption, const wxString& message,
cbThrow(wxString(_T("Fatal error:\nUndefined style in dialog ")) << caption);
wxSizer* buttonSizer = 0;
+
+ say hello;
if (style < ONE_BUTTON) // standard buttons? use wxStdDialogButtonSizer
{
wxStdDialogButtonSizer *buttonArea = new wxStdDialogButtonSizer();
Then, I can use the command line:
E:\code\cb\cleantrunk>svn patch test.patch --strip 1
U src\sdk\annoyingdialog.cpp
Look, everything works fine.
BTW:
I test several cases: the file "test.patch" can have either CRLF or LF format, when applied, the result file is CRLF, this is because my local c::b svn repo is all CRLF.
BTW2:
I'm using the svn command tool, which is:
E:\code\cb\cleantrunk>svn --version
svn, version 1.7.1-SlikSvn-1.7.1-WIN32 (SlikSvn/1.7.1) WIN32
compiled Oct 26 2011, 13:38:01
Copyright (C) 2011 The Apache Software Foundation.
This software consists of contributions made by many people; see the NOTICE
file for more information.
Subversion is open source software, see http://subversion.apache.org/
The following repository access (RA) modules are available:
* ra_neon : Module for accessing a repository via WebDAV protocol using Neon.
- handles 'http' scheme
- handles 'https' scheme
* ra_svn : Module for accessing a repository using the svn network protocol.
- with Cyrus SASL authentication
- handles 'svn' scheme
* ra_local : Module for accessing a repository on local disk.
- handles 'file' scheme
* ra_serf : Module for accessing a repository via WebDAV protocol using serf.
- handles 'http' scheme
- handles 'https' scheme
BTW3:
I tried the TortoiseSVN to apply the patch file, then it will shown a failure dialog "rejected patch hunks for XXXXX".
.
As a conclusion: svn command line is better than the patch utility.
, the patch utility is better than tortoisesvn.
EDIT:
If you use tortoiseSVN to apply the patch, after its failure, You will have some dummy folder named "b", "b/src", "b/src/sdk" created.