• R/O
  • SSH
  • HTTPS

tortoisesvn: Commit


Commit MetaInfo

Revision28498 (tree)
Time2019-01-14 04:20:18
Authorstefankueng

Log Message

use the new svn_client_blame6 function and handle utf-16 text files when blaming as well.

Change Summary

Incremental Difference

--- trunk/src/SVN/SVN.cpp (revision 28497)
+++ trunk/src/SVN/SVN.cpp (revision 28498)
@@ -1,6 +1,6 @@
11 // TortoiseSVN - a Windows shell extension for easy version control
22
3-// Copyright (C) 2003-2018 - TortoiseSVN
3+// Copyright (C) 2003-2019 - TortoiseSVN
44
55 // This program is free software; you can redistribute it and/or
66 // modify it under the terms of the GNU General Public License
@@ -54,47 +54,45 @@
5454 #include "Hooks.h"
5555
5656 #ifdef _DEBUG
57-#define new DEBUG_NEW
58-#undef THIS_FILE
57+# define new DEBUG_NEW
58+# undef THIS_FILE
5959 static char THIS_FILE[] = __FILE__;
6060 #endif
6161
62-#define IDYESTOALL 19
62+#define IDYESTOALL 19
6363
64-
65-LCID SVN::s_locale = MAKELCID((DWORD)CRegStdDWORD(L"Software\\TortoiseSVN\\LanguageID", MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT)), SORT_DEFAULT);
64+LCID SVN::s_locale = MAKELCID((DWORD)CRegStdDWORD(L"Software\\TortoiseSVN\\LanguageID", MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT)), SORT_DEFAULT);
6665 bool SVN::s_useSystemLocale = !!(DWORD)CRegStdDWORD(L"Software\\TortoiseSVN\\UseSystemLocaleForDates", TRUE);
6766
6867 /* Number of micro-seconds between the beginning of the Windows epoch
6968 * (Jan. 1, 1601) and the Unix epoch (Jan. 1, 1970)
7069 */
71-#define APR_DELTA_EPOCH_IN_USEC APR_TIME_C(11644473600000000);
70+#define APR_DELTA_EPOCH_IN_USEC APR_TIME_C(11644473600000000);
7271
7372 void AprTimeToFileTime(LPFILETIME pft, apr_time_t t)
7473 {
7574 LONGLONG ll;
7675 t += APR_DELTA_EPOCH_IN_USEC;
77- ll = t * 10;
78- pft->dwLowDateTime = (DWORD)ll;
79- pft->dwHighDateTime = (DWORD) (ll >> 32);
76+ ll = t * 10;
77+ pft->dwLowDateTime = (DWORD)ll;
78+ pft->dwHighDateTime = (DWORD)(ll >> 32);
8079 return;
8180 }
8281
8382 SVN::SVNLock::SVNLock()
84- : creation_date (0)
85- , expiration_date (0)
83+ : creation_date(0)
84+ , expiration_date(0)
8685 {
8786 }
8887
8988 SVN::SVNProgress::SVNProgress()
90- : progress (0)
91- , total (0)
92- , overall_total (0)
93- , BytesPerSecond (0)
89+ : progress(0)
90+ , total(0)
91+ , overall_total(0)
92+ , BytesPerSecond(0)
9493 {
9594 }
9695
97-
9896 SVN::SVN(bool suppressUI)
9997 : SVNBase()
10098 , m_progressWnd(0)
@@ -115,7 +113,7 @@
115113 , m_bAssumeCacheEnabled(false)
116114 {
117115 parentpool = svn_pool_create(NULL);
118- m_pool = svn_pool_create (parentpool);
116+ m_pool = svn_pool_create(parentpool);
119117
120118 SVNInit();
121119 }
@@ -141,21 +139,21 @@
141139 // set up authentication
142140 m_prompt.Init(parentpool, m_pctx);
143141
144- m_pctx->log_msg_func3 = svn_cl__get_log_message;
145- m_pctx->log_msg_baton3 = logMessage(L"");
146- m_pctx->notify_func2 = notify;
147- m_pctx->notify_baton2 = this;
148- m_pctx->notify_func = nullptr;
149- m_pctx->notify_baton = nullptr;
150- m_pctx->conflict_func = nullptr;
151- m_pctx->conflict_baton = nullptr;
152- m_pctx->conflict_func2 = nullptr;
142+ m_pctx->log_msg_func3 = svn_cl__get_log_message;
143+ m_pctx->log_msg_baton3 = logMessage(L"");
144+ m_pctx->notify_func2 = notify;
145+ m_pctx->notify_baton2 = this;
146+ m_pctx->notify_func = nullptr;
147+ m_pctx->notify_baton = nullptr;
148+ m_pctx->conflict_func = nullptr;
149+ m_pctx->conflict_baton = nullptr;
150+ m_pctx->conflict_func2 = nullptr;
153151 m_pctx->conflict_baton2 = this;
154- m_pctx->cancel_func = cancel;
155- m_pctx->cancel_baton = this;
156- m_pctx->progress_func = progress_func;
157- m_pctx->progress_baton = this;
158- m_pctx->client_name = SVNHelper::GetUserAgentString(m_pool);
152+ m_pctx->cancel_func = cancel;
153+ m_pctx->cancel_baton = this;
154+ m_pctx->progress_func = progress_func;
155+ m_pctx->progress_baton = this;
156+ m_pctx->client_name = SVNHelper::GetUserAgentString(m_pool);
159157 }
160158
161159 SVN::~SVN(void)
@@ -163,31 +161,38 @@
163161 ResetLogCachePool();
164162
165163 svn_error_clear(Err);
166- svn_pool_destroy (parentpool);
164+ svn_pool_destroy(parentpool);
167165 }
168166
169167 #pragma warning(push)
170-#pragma warning(disable: 4100) // unreferenced formal parameter
168+#pragma warning(disable : 4100) // unreferenced formal parameter
171169
172-BOOL SVN::Cancel() { if (m_pbCancel) {return *m_pbCancel; } return FALSE;}
170+BOOL SVN::Cancel()
171+{
172+ if (m_pbCancel)
173+ {
174+ return *m_pbCancel;
175+ }
176+ return FALSE;
177+}
173178
174-BOOL SVN::Notify(const CTSVNPath& path, const CTSVNPath& url, svn_wc_notify_action_t action,
175- svn_node_kind_t kind, const CString& mime_type,
176- svn_wc_notify_state_t content_state,
177- svn_wc_notify_state_t prop_state, svn_revnum_t rev,
178- const svn_lock_t * lock, svn_wc_notify_lock_state_t lock_state,
179- const CString& changelistname,
180- const CString& propertyName,
181- svn_merge_range_t * range,
182- svn_error_t * err, apr_pool_t * pool) {return TRUE;};
183-BOOL SVN::Log(svn_revnum_t rev, const std::string& author, const std::string& message, apr_time_t time, const MergeInfo* mergeInfo) {return TRUE;}
184-BOOL SVN::BlameCallback(LONG linenumber, bool localchange, svn_revnum_t revision,
179+BOOL SVN::Notify(const CTSVNPath& path, const CTSVNPath& url, svn_wc_notify_action_t action,
180+ svn_node_kind_t kind, const CString& mime_type,
181+ svn_wc_notify_state_t content_state,
182+ svn_wc_notify_state_t prop_state, svn_revnum_t rev,
183+ const svn_lock_t* lock, svn_wc_notify_lock_state_t lock_state,
184+ const CString& changelistname,
185+ const CString& propertyName,
186+ svn_merge_range_t* range,
187+ svn_error_t* err, apr_pool_t* pool) { return TRUE; };
188+BOOL SVN::Log(svn_revnum_t rev, const std::string& author, const std::string& message, apr_time_t time, const MergeInfo* mergeInfo) { return TRUE; }
189+BOOL SVN::BlameCallback(LONG linenumber, bool localchange, svn_revnum_t revision,
185190 const CString& author, const CString& date, svn_revnum_t merged_revision,
186191 const CString& merged_author, const CString& merged_date,
187192 const CString& merged_path, const CStringA& line,
188- const CStringA& log_msg, const CStringA& merged_log_msg) {return TRUE;}
189-svn_error_t* SVN::DiffSummarizeCallback(const CTSVNPath& path, svn_client_diff_summarize_kind_t kind, bool propchanged, svn_node_kind_t node) {return SVN_NO_ERROR;}
190-BOOL SVN::ReportList(const CString& path, svn_node_kind_t kind,
193+ const CStringA& log_msg, const CStringA& merged_log_msg) { return TRUE; }
194+svn_error_t* SVN::DiffSummarizeCallback(const CTSVNPath& path, svn_client_diff_summarize_kind_t kind, bool propchanged, svn_node_kind_t node) { return SVN_NO_ERROR; }
195+BOOL SVN::ReportList(const CString& path, svn_node_kind_t kind,
191196 svn_filesize_t size, bool has_props,
192197 svn_revnum_t created_rev, apr_time_t time,
193198 const CString& author, const CString& locktoken,
@@ -194,17 +199,17 @@
194199 const CString& lockowner, const CString& lockcomment,
195200 bool is_dav_comment, apr_time_t lock_creationdate,
196201 apr_time_t lock_expirationdate, const CString& absolutepath,
197- const CString& externalParentUrl, const CString& externalTarget) {return TRUE;}
202+ const CString& externalParentUrl, const CString& externalTarget) { return TRUE; }
198203
199204 #pragma warning(pop)
200205
201206 struct log_msg_baton3
202207 {
203- const char *message; /* the message. */
204- const char *message_encoding; /* the locale/encoding of the message. */
205- const char *base_dir; /* the base directory for an external edit. UTF-8! */
206- const char *tmpfile_left; /* the tmpfile left by an external edit. UTF-8! */
207- apr_pool_t *pool; /* a pool. */
208+ const char* message; /* the message. */
209+ const char* message_encoding; /* the locale/encoding of the message. */
210+ const char* base_dir; /* the base directory for an external edit. UTF-8! */
211+ const char* tmpfile_left; /* the tmpfile left by an external edit. UTF-8! */
212+ apr_pool_t* pool; /* a pool. */
208213 };
209214
210215 struct shelf_status_baton
@@ -488,18 +493,17 @@
488493 CHooks::Instance().PreConnect(CTSVNPathList(moduleName));
489494 const char* svnPath = moduleName.GetSVNApiPath(subpool);
490495 SVNTRACE(
491- Err = svn_client_checkout3 (NULL, // we don't need the resulting revision
492- svnPath,
493- destPath.GetSVNApiPath(subpool),
494- pegrev,
495- revision,
496- depth,
497- bIgnoreExternals,
498- bAllow_unver_obstructions,
499- m_pctx,
500- subpool ),
501- svnPath
502- );
496+ Err = svn_client_checkout3(NULL, // we don't need the resulting revision
497+ svnPath,
498+ destPath.GetSVNApiPath(subpool),
499+ pegrev,
500+ revision,
501+ depth,
502+ bIgnoreExternals,
503+ bAllow_unver_obstructions,
504+ m_pctx,
505+ subpool),
506+ svnPath);
503507 ClearCAPIAuthCacheOnError();
504508
505509 return (Err == NULL);
@@ -514,32 +518,31 @@
514518 Prepare();
515519 m_pctx->log_msg_baton3 = logMessage(message);
516520
517- apr_hash_t * revPropHash = MakeRevPropHash(revProps, subPool);
521+ apr_hash_t* revPropHash = MakeRevPropHash(revProps, subPool);
518522
519523 CallPreConnectHookIfUrl(pathlist);
520524
521525 SVNTRACE(
522- Err = svn_client_delete4 (pathlist.MakePathArray(subPool),
523- force,
524- keeplocal,
525- revPropHash,
526- commitcallback2,
527- this,
528- m_pctx,
529- subPool) ,
530- NULL
531- );
526+ Err = svn_client_delete4(pathlist.MakePathArray(subPool),
527+ force,
528+ keeplocal,
529+ revPropHash,
530+ commitcallback2,
531+ this,
532+ m_pctx,
533+ subPool),
534+ NULL);
532535
533536 ClearCAPIAuthCacheOnError();
534537
535- if(Err != NULL)
538+ if (Err != NULL)
536539 {
537540 return FALSE;
538541 }
539542
540- for(int nPath = 0; nPath < pathlist.GetCount(); nPath++)
543+ for (int nPath = 0; nPath < pathlist.GetCount(); nPath++)
541544 {
542- if ((!keeplocal)&&(!pathlist[nPath].IsDirectory()))
545+ if ((!keeplocal) && (!pathlist[nPath].IsDirectory()))
543546 {
544547 SHChangeNotify(SHCNE_DELETE, SHCNF_PATH | SHCNF_FLUSHNOWAIT, pathlist[nPath].GetWinPath(), NULL);
545548 }
@@ -555,48 +558,46 @@
555558 bool SVN::Revert(const CTSVNPathList& pathlist, const CStringArray& changelists, bool recurse, bool clearchangelists, bool metadataonly)
556559 {
557560 TRACE("Reverting list of %d files\n", pathlist.GetCount());
558- SVNPool subpool(m_pool);
559- apr_array_header_t * clists = MakeChangeListArray(changelists, subpool);
561+ SVNPool subpool(m_pool);
562+ apr_array_header_t* clists = MakeChangeListArray(changelists, subpool);
560563
561564 Prepare();
562565
563566 SVNTRACE(
564567 Err = svn_client_revert4(pathlist.MakePathArray(subpool),
565- recurse ? svn_depth_infinity : svn_depth_empty,
566- clists,
567- clearchangelists,
568- metadataonly,
569- TRUE,
570- m_pctx,
571- subpool) ,
572- NULL
573- );
568+ recurse ? svn_depth_infinity : svn_depth_empty,
569+ clists,
570+ clearchangelists,
571+ metadataonly,
572+ TRUE,
573+ m_pctx,
574+ subpool),
575+ NULL);
574576
575577 return (Err == NULL);
576578 }
577579
578-
579-bool SVN::Add(const CTSVNPathList& pathList, ProjectProperties * props, svn_depth_t depth, bool force, bool bUseAutoprops, bool no_ignore, bool addparents)
580+bool SVN::Add(const CTSVNPathList& pathList, ProjectProperties* props, svn_depth_t depth, bool force, bool bUseAutoprops, bool no_ignore, bool addparents)
580581 {
581582 SVNTRACE_BLOCK
582583
583584 // the add command should use the mime-type file
584- const char *mimetypes_file;
585+ const char* mimetypes_file;
585586 Prepare();
586587
587- svn_config_t * opt = (svn_config_t *)apr_hash_get (m_pctx->config, SVN_CONFIG_CATEGORY_CONFIG,
588- APR_HASH_KEY_STRING);
588+ svn_config_t* opt = (svn_config_t*)apr_hash_get(m_pctx->config, SVN_CONFIG_CATEGORY_CONFIG,
589+ APR_HASH_KEY_STRING);
589590 if (opt)
590591 {
591592 if (bUseAutoprops)
592593 {
593594 svn_config_get(opt, &mimetypes_file,
594- SVN_CONFIG_SECTION_MISCELLANY,
595- SVN_CONFIG_OPTION_MIMETYPES_FILE, FALSE);
595+ SVN_CONFIG_SECTION_MISCELLANY,
596+ SVN_CONFIG_OPTION_MIMETYPES_FILE, FALSE);
596597 if (mimetypes_file && *mimetypes_file)
597598 {
598599 Err = svn_io_parse_mimetypes_file(&(m_pctx->mimetypes_map),
599- mimetypes_file, m_pool);
600+ mimetypes_file, m_pool);
600601 if (Err)
601602 return false;
602603 }
@@ -605,7 +606,7 @@
605606 }
606607 }
607608
608- for(int nItem = 0; nItem < pathList.GetCount(); nItem++)
609+ for (int nItem = 0; nItem < pathList.GetCount(); nItem++)
609610 {
610611 CTraceToOutputDebugString::Instance()(_T(__FUNCTION__) L": add file %s\n", pathList[nItem].GetWinPath());
611612 if (Cancel())
@@ -614,8 +615,8 @@
614615 return false;
615616 }
616617 SVNPool subpool(m_pool);
617- Err = svn_client_add5 (pathList[nItem].GetSVNApiPath(subpool), depth, force, no_ignore, !bUseAutoprops, addparents, m_pctx, subpool);
618- if(Err != NULL)
618+ Err = svn_client_add5(pathList[nItem].GetSVNApiPath(subpool), depth, force, no_ignore, !bUseAutoprops, addparents, m_pctx, subpool);
619+ if (Err != NULL)
619620 {
620621 return false;
621622 }
@@ -632,14 +633,14 @@
632633 if (changelist.IsEmpty())
633634 return RemoveFromChangeList(pathList, CStringArray(), depth);
634635
635- apr_array_header_t *clists = MakeChangeListArray(changelists, subpool);
636+ apr_array_header_t* clists = MakeChangeListArray(changelists, subpool);
636637
637638 Err = svn_client_add_to_changelist(pathList.MakePathArray(subpool),
638- (LPCSTR)CUnicodeUtils::GetUTF8(changelist),
639- depth,
640- clists,
641- m_pctx,
642- subpool);
639+ (LPCSTR)CUnicodeUtils::GetUTF8(changelist),
640+ depth,
641+ clists,
642+ m_pctx,
643+ subpool);
643644
644645 return (Err == NULL);
645646 }
@@ -648,13 +649,13 @@
648649 {
649650 SVNPool subpool(m_pool);
650651 Prepare();
651- apr_array_header_t * clists = MakeChangeListArray(changelists, subpool);
652+ apr_array_header_t* clists = MakeChangeListArray(changelists, subpool);
652653
653654 Err = svn_client_remove_from_changelists(pathList.MakePathArray(subpool),
654- depth,
655- clists,
656- m_pctx,
657- subpool);
655+ depth,
656+ clists,
657+ m_pctx,
658+ subpool);
658659
659660 return (Err == NULL);
660661 }
@@ -669,18 +670,17 @@
669670 CHooks::Instance().PreConnect(pathList);
670671 SVNTRACE(
671672 Err = svn_client_update4(NULL,
672- pathList.MakePathArray(localpool),
673- revision,
674- depth,
675- depthIsSticky,
676- ignoreexternals,
677- bAllow_unver_obstructions,
678- true, // adds_as_modifications (why would anyone want a tree conflict? Set to true unconditionally)
679- makeParents,
680- m_pctx,
681- localpool),
682- NULL
683- );
673+ pathList.MakePathArray(localpool),
674+ revision,
675+ depth,
676+ depthIsSticky,
677+ ignoreexternals,
678+ bAllow_unver_obstructions,
679+ true, // adds_as_modifications (why would anyone want a tree conflict? Set to true unconditionally)
680+ makeParents,
681+ m_pctx,
682+ localpool),
683+ NULL);
684684 ClearCAPIAuthCacheOnError();
685685 return (Err == NULL);
686686 }
@@ -692,9 +692,9 @@
692692
693693 Prepare();
694694
695- apr_array_header_t *clists = MakeChangeListArray(changelists, localpool);
695+ apr_array_header_t* clists = MakeChangeListArray(changelists, localpool);
696696
697- apr_hash_t * revprop_table = MakeRevPropHash(revProps, localpool);
697+ apr_hash_t* revprop_table = MakeRevPropHash(revProps, localpool);
698698
699699 m_pctx->log_msg_baton3 = logMessage(message);
700700
@@ -701,25 +701,24 @@
701701 CHooks::Instance().PreConnect(pathlist);
702702
703703 SVNTRACE(
704- Err = svn_client_commit6 (
705- pathlist.MakePathArray(localpool),
706- depth,
707- keep_locks,
708- keepchangelist,
709- true, // commit_as_operations
710- true, // include file externals
711- false, // include dir externals
712- clists,
713- revprop_table,
714- commitcallback2,
715- this,
716- m_pctx,
717- localpool),
718- NULL
719- );
704+ Err = svn_client_commit6(
705+ pathlist.MakePathArray(localpool),
706+ depth,
707+ keep_locks,
708+ keepchangelist,
709+ true, // commit_as_operations
710+ true, // include file externals
711+ false, // include dir externals
712+ clists,
713+ revprop_table,
714+ commitcallback2,
715+ this,
716+ m_pctx,
717+ localpool),
718+ NULL);
720719 m_pctx->log_msg_baton3 = logMessage(L"");
721720 ClearCAPIAuthCacheOnError();
722- if(Err != NULL)
721+ if (Err != NULL)
723722 {
724723 return 0;
725724 }
@@ -738,10 +737,10 @@
738737
739738 Prepare();
740739
741- m_pctx->log_msg_baton3 = logMessage(logmsg);
742- apr_hash_t * revPropHash = MakeRevPropHash(revProps, subpool);
740+ m_pctx->log_msg_baton3 = logMessage(logmsg);
741+ apr_hash_t* revPropHash = MakeRevPropHash(revProps, subpool);
743742
744- apr_hash_t * externals_to_pin = nullptr;
743+ apr_hash_t* externals_to_pin = nullptr;
745744 if (!externalsToTag.empty())
746745 {
747746 externals_to_pin = externalsToTag.GetHash(revision.IsWorking() || revision.IsBase(), subpool);
@@ -750,23 +749,22 @@
750749 CallPreConnectHookIfUrl(srcPathList, destPath);
751750
752751 SVNTRACE(
753- Err = svn_client_copy7 (MakeCopyArray(srcPathList, revision, pegrev),
754- destPath.GetSVNApiPath(subpool),
755- copy_as_child,
756- make_parents,
757- ignoreExternals,
758- false, // metadata only
759- pin_externals,
760- externals_to_pin,
761- revPropHash,
762- commitcallback2,
763- this,
764- m_pctx,
765- subpool),
766- NULL
767- );
752+ Err = svn_client_copy7(MakeCopyArray(srcPathList, revision, pegrev),
753+ destPath.GetSVNApiPath(subpool),
754+ copy_as_child,
755+ make_parents,
756+ ignoreExternals,
757+ false, // metadata only
758+ pin_externals,
759+ externals_to_pin,
760+ revPropHash,
761+ commitcallback2,
762+ this,
763+ m_pctx,
764+ subpool),
765+ NULL);
768766 ClearCAPIAuthCacheOnError();
769- if(Err != NULL)
767+ if (Err != NULL)
770768 {
771769 return false;
772770 }
@@ -777,33 +775,32 @@
777775 bool SVN::Move(const CTSVNPathList& srcPathList, const CTSVNPath& destPath,
778776 const CString& message /* = L""*/,
779777 bool move_as_child /* = false*/, bool make_parents /* = false */,
780- bool allow_mixed /* = false */,
781- bool metadata_only /* = false */,
782- const RevPropHash& revProps /* = RevPropHash() */ )
778+ bool allow_mixed /* = false */,
779+ bool metadata_only /* = false */,
780+ const RevPropHash& revProps /* = RevPropHash() */)
783781 {
784782 SVNPool subpool(m_pool);
785783
786784 Prepare();
787- m_pctx->log_msg_baton3 = logMessage(message);
788- apr_hash_t * revPropHash = MakeRevPropHash(revProps, subpool);
785+ m_pctx->log_msg_baton3 = logMessage(message);
786+ apr_hash_t* revPropHash = MakeRevPropHash(revProps, subpool);
789787 CallPreConnectHookIfUrl(srcPathList, destPath);
790- SVNTRACE (
791- Err = svn_client_move7 (srcPathList.MakePathArray(subpool),
792- destPath.GetSVNApiPath(subpool),
793- move_as_child,
794- make_parents,
795- allow_mixed,
796- metadata_only,
797- revPropHash,
798- commitcallback2,
799- this,
800- m_pctx,
801- subpool),
802- NULL
803- );
788+ SVNTRACE(
789+ Err = svn_client_move7(srcPathList.MakePathArray(subpool),
790+ destPath.GetSVNApiPath(subpool),
791+ move_as_child,
792+ make_parents,
793+ allow_mixed,
794+ metadata_only,
795+ revPropHash,
796+ commitcallback2,
797+ this,
798+ m_pctx,
799+ subpool),
800+ NULL);
804801
805802 ClearCAPIAuthCacheOnError();
806- if(Err != NULL)
803+ if (Err != NULL)
807804 {
808805 return false;
809806 }
@@ -815,23 +812,22 @@
815812 {
816813 Prepare();
817814 SVNPool subpool(m_pool);
818- m_pctx->log_msg_baton3 = logMessage(message);
819- apr_hash_t * revPropHash = MakeRevPropHash(revProps, subpool);
815+ m_pctx->log_msg_baton3 = logMessage(message);
816+ apr_hash_t* revPropHash = MakeRevPropHash(revProps, subpool);
820817
821818 CallPreConnectHookIfUrl(pathlist);
822819
823- SVNTRACE (
824- Err = svn_client_mkdir4 (pathlist.MakePathArray(subpool),
825- makeParents,
826- revPropHash,
827- commitcallback2,
828- this,
829- m_pctx,
830- subpool) ,
831- NULL
832- );
820+ SVNTRACE(
821+ Err = svn_client_mkdir4(pathlist.MakePathArray(subpool),
822+ makeParents,
823+ revPropHash,
824+ commitcallback2,
825+ this,
826+ m_pctx,
827+ subpool),
828+ NULL);
833829 ClearCAPIAuthCacheOnError();
834- if(Err != NULL)
830+ if (Err != NULL)
835831 {
836832 return false;
837833 }
@@ -842,12 +838,11 @@
842838 bool SVN::CleanUp(const CTSVNPath& path, bool breaklocks, bool fixtimestamps, bool cleardavcache, bool vacuumpristines, bool includeexternals)
843839 {
844840 Prepare();
845- SVNPool subpool(m_pool);
841+ SVNPool subpool(m_pool);
846842 const char* svnPath = path.GetSVNApiPath(subpool);
847- SVNTRACE (
848- Err = svn_client_cleanup2 (svnPath, breaklocks, fixtimestamps, cleardavcache, vacuumpristines, includeexternals, m_pctx, subpool),
849- svnPath
850- )
843+ SVNTRACE(
844+ Err = svn_client_cleanup2(svnPath, breaklocks, fixtimestamps, cleardavcache, vacuumpristines, includeexternals, m_pctx, subpool),
845+ svnPath)
851846
852847 return (Err == NULL);
853848 }
@@ -855,14 +850,13 @@
855850 bool SVN::Vacuum(const CTSVNPath& path, bool unversioned, bool ignored, bool fixtimestamps, bool pristines, bool includeExternals)
856851 {
857852 Prepare();
858- SVNPool subpool(m_pool);
853+ SVNPool subpool(m_pool);
859854 const char* svnPath = path.GetSVNApiPath(subpool);
860855 SVNTRACE(
861856 Err = svn_client_vacuum(svnPath, unversioned, ignored, fixtimestamps, pristines, includeExternals, m_pctx, subpool),
862- svnPath
863- )
857+ svnPath)
864858
865- return (Err == NULL);
859+ return (Err == NULL);
866860 }
867861
868862 bool SVN::Resolve(const CTSVNPath& path, svn_wc_conflict_choice_t result, bool recurse, bool typeonly, svn_wc_conflict_kind_t kind)
@@ -872,7 +866,7 @@
872866
873867 if (typeonly)
874868 {
875- m_resolvekind = kind;
869+ m_resolvekind = kind;
876870 m_resolveresult = result;
877871 // change result to unspecified so the conflict resolve callback is invoked
878872 result = svn_wc_conflict_choose_unspecified;
@@ -880,17 +874,17 @@
880874
881875 switch (kind)
882876 {
883- case svn_wc_conflict_kind_property:
884- case svn_wc_conflict_kind_tree:
885- break;
886- case svn_wc_conflict_kind_text:
887- default:
877+ case svn_wc_conflict_kind_property:
878+ case svn_wc_conflict_kind_tree:
879+ break;
880+ case svn_wc_conflict_kind_text:
881+ default:
888882 {
889883 // before marking a file as resolved, we move the conflicted parts
890884 // to the trash bin: just in case the user later wants to get those
891885 // files back anyway
892- SVNInfo info;
893- const SVNInfoData * infodata = info.GetFirstFileInfo(path, SVNRev(), SVNRev());
886+ SVNInfo info;
887+ const SVNInfoData* infodata = info.GetFirstFileInfo(path, SVNRev(), SVNRev());
894888 if (infodata)
895889 {
896890 CTSVNPathList conflictedEntries;
@@ -897,15 +891,15 @@
897891
898892 for (auto it = infodata->conflicts.cbegin(); it != infodata->conflicts.cend(); ++it)
899893 {
900- if ((it->conflict_new.GetLength())&&(result != svn_wc_conflict_choose_theirs_full))
894+ if ((it->conflict_new.GetLength()) && (result != svn_wc_conflict_choose_theirs_full))
901895 {
902896 conflictedEntries.AddPath(CTSVNPath(it->conflict_new));
903897 }
904- if ((it->conflict_old.GetLength())&&(result != svn_wc_conflict_choose_merged))
898+ if ((it->conflict_old.GetLength()) && (result != svn_wc_conflict_choose_merged))
905899 {
906900 conflictedEntries.AddPath(CTSVNPath(it->conflict_old));
907901 }
908- if ((it->conflict_wrk.GetLength())&&(result != svn_wc_conflict_choose_mine_full))
902+ if ((it->conflict_wrk.GetLength()) && (result != svn_wc_conflict_choose_mine_full))
909903 {
910904 conflictedEntries.AddPath(CTSVNPath(it->conflict_wrk));
911905 }
@@ -917,22 +911,21 @@
917911 }
918912
919913 const char* svnPath = path.GetSVNApiPath(subpool);
920- SVNTRACE (
914+ SVNTRACE(
921915 Err = svn_client_resolve(svnPath,
922916 recurse ? svn_depth_infinity : svn_depth_empty,
923917 result,
924918 m_pctx,
925919 subpool),
926- svnPath
927- );
920+ svnPath);
928921
929922 // reset the conflict resolve callback data
930- m_resolvekind = (svn_wc_conflict_kind_t)-1;
923+ m_resolvekind = (svn_wc_conflict_kind_t)-1;
931924 m_resolveresult = svn_wc_conflict_choose_postpone;
932925 return (Err == NULL);
933926 }
934927
935-bool SVN::ResolveTreeConflict(svn_client_conflict_t *conflict, svn_client_conflict_option_t *option, int preferred_moved_target_idx, int preferred_moved_reltarget_idx)
928+bool SVN::ResolveTreeConflict(svn_client_conflict_t* conflict, svn_client_conflict_option_t* option, int preferred_moved_target_idx, int preferred_moved_reltarget_idx)
936929 {
937930 SVNPool scratchpool(m_pool);
938931 Prepare();
@@ -950,13 +943,12 @@
950943
951944 SVNTRACE(
952945 Err = svn_client_conflict_tree_resolve(conflict, option, m_pctx, scratchpool),
953- svnPath
954- );
946+ svnPath);
955947
956948 return (Err == NULL);
957949 }
958950
959-bool SVN::ResolveTextConflict(svn_client_conflict_t *conflict, svn_client_conflict_option_t *option)
951+bool SVN::ResolveTextConflict(svn_client_conflict_t* conflict, svn_client_conflict_option_t* option)
960952 {
961953 SVNPool scratchpool(m_pool);
962954 Prepare();
@@ -965,13 +957,12 @@
965957
966958 SVNTRACE(
967959 Err = svn_client_conflict_text_resolve(conflict, option, m_pctx, scratchpool),
968- svnPath
969- );
960+ svnPath);
970961
971962 return (Err == NULL);
972963 }
973964
974-bool SVN::ResolvePropConflict(svn_client_conflict_t *conflict, const CString & propName, svn_client_conflict_option_t *option)
965+bool SVN::ResolvePropConflict(svn_client_conflict_t* conflict, const CString& propName, svn_client_conflict_option_t* option)
975966 {
976967 SVNPool scratchpool(m_pool);
977968 Prepare();
@@ -980,8 +971,7 @@
980971
981972 SVNTRACE(
982973 Err = svn_client_conflict_prop_resolve(conflict, CUnicodeUtils::GetUTF8(propName), option, m_pctx, scratchpool),
983- svnPath
984- );
974+ svnPath);
985975
986976 return (Err == NULL);
987977 }
@@ -1018,30 +1008,30 @@
10181008 std::map<CTSVNPath, CTSVNPath> copyMap;
10191009 switch (extended)
10201010 {
1021- case SVNExportNormal:
1022- case SVNExportOnlyLocalChanges:
1011+ case SVNExportNormal:
1012+ case SVNExportOnlyLocalChanges:
10231013 {
1024- CTSVNPath statusPath;
1025- svn_client_status_t * s;
1026- SVNStatus status;
1027- if ((s = status.GetFirstFileStatus(srcPath, statusPath, false, svn_depth_infinity, true, !!bIgnoreExternals))!=0)
1014+ CTSVNPath statusPath;
1015+ svn_client_status_t* s;
1016+ SVNStatus status;
1017+ if ((s = status.GetFirstFileStatus(srcPath, statusPath, false, svn_depth_infinity, true, !!bIgnoreExternals)) != 0)
10281018 {
1029- if (SVNStatus::GetMoreImportant(s->node_status, svn_wc_status_unversioned)!=svn_wc_status_unversioned)
1019+ if (SVNStatus::GetMoreImportant(s->node_status, svn_wc_status_unversioned) != svn_wc_status_unversioned)
10301020 {
10311021 CTSVNPath destination = destPath;
10321022 destination.AppendPathString(statusPath.GetWinPathString().Mid(srcPath.GetWinPathString().GetLength()));
10331023 copyMap[statusPath] = destination;
10341024 }
1035- while ((s = status.GetNextFileStatus(statusPath))!=0)
1025+ while ((s = status.GetNextFileStatus(statusPath)) != 0)
10361026 {
1037- if ((s->node_status == svn_wc_status_unversioned)||
1038- (s->node_status == svn_wc_status_ignored)||
1039- (s->node_status == svn_wc_status_none)||
1040- (s->node_status == svn_wc_status_missing)||
1027+ if ((s->node_status == svn_wc_status_unversioned) ||
1028+ (s->node_status == svn_wc_status_ignored) ||
1029+ (s->node_status == svn_wc_status_none) ||
1030+ (s->node_status == svn_wc_status_missing) ||
10411031 (s->node_status == svn_wc_status_deleted))
10421032 continue;
10431033 if ((extended == SVNExportOnlyLocalChanges) &&
1044- (s->node_status == svn_wc_status_normal) )
1034+ (s->node_status == svn_wc_status_normal))
10451035 continue;
10461036 CTSVNPath destination = destPath;
10471037 destination.AppendPathString(statusPath.GetWinPathString().Mid(srcPath.GetWinPathString().GetLength()));
@@ -1050,14 +1040,14 @@
10501040 }
10511041 else
10521042 {
1053- Err = svn_error_create(status.GetSVNError()->apr_err, const_cast<svn_error_t *>(status.GetSVNError()), NULL);
1043+ Err = svn_error_create(status.GetSVNError()->apr_err, const_cast<svn_error_t*>(status.GetSVNError()), NULL);
10541044 return false;
10551045 }
10561046 }
10571047 break;
1058- case SVNExportIncludeUnversioned:
1048+ case SVNExportIncludeUnversioned:
10591049 {
1060- CString srcfile;
1050+ CString srcfile;
10611051 CDirFileEnum lister(srcPath.GetWinPathString());
10621052 copyMap[srcPath] = destPath;
10631053 while (lister.NextFile(srcfile, NULL))
@@ -1095,11 +1085,11 @@
10951085 else
10961086 lastError = 0;
10971087 }
1098- if ((lastError == ERROR_ALREADY_EXISTS)||(lastError == ERROR_FILE_EXISTS))
1088+ if ((lastError == ERROR_ALREADY_EXISTS) || (lastError == ERROR_FILE_EXISTS))
10991089 {
11001090 lastError = 0;
11011091
1102- UINT ret = 0;
1092+ UINT ret = 0;
11031093 CString strMessage;
11041094 strMessage.Format(IDS_PROC_OVERWRITE_CONFIRM, dst.GetWinPath());
11051095 CTaskDialog taskdlg(strMessage,
@@ -1117,7 +1107,7 @@
11171107 if (taskdlg.GetVerificationCheckboxState())
11181108 force = true;
11191109
1120- if ((ret == IDYESTOALL)||(ret == IDYES))
1110+ if ((ret == IDYESTOALL) || (ret == IDYES))
11211111 {
11221112 if (!CopyFile(src.GetWinPath(), dst.GetWinPath(), FALSE))
11231113 {
@@ -1129,7 +1119,7 @@
11291119 if (lastError)
11301120 {
11311121 CFormatMessageWrapper errorDetails(lastError);
1132- if(!errorDetails)
1122+ if (!errorDetails)
11331123 return false;
11341124 Err = svn_error_create(NULL, NULL, CUnicodeUtils::GetUTF8(CString(errorDetails)));
11351125 return false;
@@ -1148,26 +1138,25 @@
11481138 }
11491139 else
11501140 {
1151- SVNPool subpool(m_pool);
1141+ SVNPool subpool(m_pool);
11521142 const char* source = srcPath.GetSVNApiPath(subpool);
11531143 CHooks::Instance().PreConnect(CTSVNPathList(srcPath));
1154- SVNTRACE (
1155- Err = svn_client_export5(NULL, //no resulting revision needed
1156- source,
1157- destPath.GetSVNApiPath(subpool),
1158- pegrev,
1159- revision,
1160- force,
1161- bIgnoreExternals,
1162- bIgnoreKeywords,
1163- depth,
1164- eol.IsEmpty() ? NULL : (LPCSTR)CStringA(eol),
1165- m_pctx,
1166- subpool),
1167- source
1168- );
1144+ SVNTRACE(
1145+ Err = svn_client_export5(NULL, //no resulting revision needed
1146+ source,
1147+ destPath.GetSVNApiPath(subpool),
1148+ pegrev,
1149+ revision,
1150+ force,
1151+ bIgnoreExternals,
1152+ bIgnoreKeywords,
1153+ depth,
1154+ eol.IsEmpty() ? NULL : (LPCSTR)CStringA(eol),
1155+ m_pctx,
1156+ subpool),
1157+ source);
11691158 ClearCAPIAuthCacheOnError();
1170- if(Err != NULL)
1159+ if (Err != NULL)
11711160 {
11721161 return false;
11731162 }
@@ -1182,7 +1171,7 @@
11821171
11831172 const char* svnPath = path.GetSVNApiPath(subpool);
11841173 CHooks::Instance().PreConnect(CTSVNPathList(path));
1185- SVNTRACE (
1174+ SVNTRACE(
11861175 Err = svn_client_switch3(NULL,
11871176 svnPath,
11881177 url.GetSVNApiPath(subpool),
@@ -1195,18 +1184,17 @@
11951184 ignore_ancestry,
11961185 m_pctx,
11971186 subpool),
1198- svnPath
1199- );
1187+ svnPath);
12001188
12011189 ClearCAPIAuthCacheOnError();
12021190 return (Err == NULL);
12031191 }
12041192
1205-svn_error_t * SVN::import_filter(void * baton,
1206- svn_boolean_t * filtered,
1207- const char * local_abspath,
1208- const svn_io_dirent2_t * dirent,
1209- apr_pool_t * scratch_pool)
1193+svn_error_t* SVN::import_filter(void* baton,
1194+ svn_boolean_t* filtered,
1195+ const char* local_abspath,
1196+ const svn_io_dirent2_t* dirent,
1197+ apr_pool_t* scratch_pool)
12101198 {
12111199 // TODO: we could use this when importing files in the repo browser
12121200 // via drag/drop maybe.
@@ -1220,24 +1208,24 @@
12201208 }
12211209
12221210 bool SVN::Import(const CTSVNPath& path, const CTSVNPath& url, const CString& message,
1223- ProjectProperties * props, svn_depth_t depth, bool bUseAutoprops,
1211+ ProjectProperties* props, svn_depth_t depth, bool bUseAutoprops,
12241212 bool no_ignore, bool ignore_unknown,
12251213 const RevPropHash& revProps)
12261214 {
12271215 // the import command should use the mime-type file
1228- const char *mimetypes_file = NULL;
1216+ const char* mimetypes_file = NULL;
12291217 Prepare();
1230- svn_config_t * opt = (svn_config_t *)apr_hash_get (m_pctx->config, SVN_CONFIG_CATEGORY_CONFIG,
1231- APR_HASH_KEY_STRING);
1218+ svn_config_t* opt = (svn_config_t*)apr_hash_get(m_pctx->config, SVN_CONFIG_CATEGORY_CONFIG,
1219+ APR_HASH_KEY_STRING);
12321220 if (bUseAutoprops)
12331221 {
12341222 svn_config_get(opt, &mimetypes_file,
1235- SVN_CONFIG_SECTION_MISCELLANY,
1236- SVN_CONFIG_OPTION_MIMETYPES_FILE, FALSE);
1223+ SVN_CONFIG_SECTION_MISCELLANY,
1224+ SVN_CONFIG_OPTION_MIMETYPES_FILE, FALSE);
12371225 if (mimetypes_file && *mimetypes_file)
12381226 {
12391227 Err = svn_io_parse_mimetypes_file(&(m_pctx->mimetypes_map),
1240- mimetypes_file, m_pool);
1228+ mimetypes_file, m_pool);
12411229 if (Err)
12421230 return FALSE;
12431231 }
@@ -1246,12 +1234,12 @@
12461234 }
12471235
12481236 SVNPool subpool(m_pool);
1249- m_pctx->log_msg_baton3 = logMessage(message);
1250- apr_hash_t * revPropHash = MakeRevPropHash(revProps, subpool);
1237+ m_pctx->log_msg_baton3 = logMessage(message);
1238+ apr_hash_t* revPropHash = MakeRevPropHash(revProps, subpool);
12511239
12521240 const char* svnPath = path.GetSVNApiPath(subpool);
12531241 CHooks::Instance().PreConnect(CTSVNPathList(path));
1254- SVNTRACE (
1242+ SVNTRACE(
12551243 Err = svn_client_import5(svnPath,
12561244 url.GetSVNApiPath(subpool),
12571245 depth,
@@ -1265,11 +1253,10 @@
12651253 this,
12661254 m_pctx,
12671255 subpool),
1268- svnPath
1269- );
1256+ svnPath);
12701257 m_pctx->log_msg_baton3 = logMessage(L"");
12711258 ClearCAPIAuthCacheOnError();
1272- if(Err != NULL)
1259+ if (Err != NULL)
12731260 {
12741261 return false;
12751262 }
@@ -1281,16 +1268,16 @@
12811268 const CTSVNPath& localPath, bool force, svn_depth_t depth, const CString& options,
12821269 bool ignoreanchestry, bool dryrun, bool record_only)
12831270 {
1284- SVNPool subpool(m_pool);
1285- apr_array_header_t *opts;
1271+ SVNPool subpool(m_pool);
1272+ apr_array_header_t* opts;
12861273
1287- opts = svn_cstring_split (CUnicodeUtils::GetUTF8(options), " \t\n\r", TRUE, subpool);
1274+ opts = svn_cstring_split(CUnicodeUtils::GetUTF8(options), " \t\n\r", TRUE, subpool);
12881275
12891276 Prepare();
12901277
12911278 const char* svnPath = path1.GetSVNApiPath(subpool);
12921279 CHooks::Instance().PreConnect(CTSVNPathList(path1));
1293- SVNTRACE (
1280+ SVNTRACE(
12941281 Err = svn_client_merge5(svnPath,
12951282 revision1,
12961283 path2.GetSVNApiPath(subpool),
@@ -1306,8 +1293,7 @@
13061293 opts,
13071294 m_pctx,
13081295 subpool),
1309- svnPath
1310- );
1296+ svnPath);
13111297 ClearCAPIAuthCacheOnError();
13121298
13131299 return (Err == NULL);
@@ -1317,32 +1303,31 @@
13171303 const CTSVNPath& destpath, bool force, svn_depth_t depth, const CString& options,
13181304 bool ignoreancestry, bool dryrun, bool record_only)
13191305 {
1320- SVNPool subpool(m_pool);
1321- apr_array_header_t *opts;
1306+ SVNPool subpool(m_pool);
1307+ apr_array_header_t* opts;
13221308
1323- opts = svn_cstring_split (CUnicodeUtils::GetUTF8(options), " \t\n\r", TRUE, subpool);
1309+ opts = svn_cstring_split(CUnicodeUtils::GetUTF8(options), " \t\n\r", TRUE, subpool);
13241310
13251311 Prepare();
13261312
13271313 const char* svnPath = source.GetSVNApiPath(subpool);
13281314 CHooks::Instance().PreConnect(CTSVNPathList(source));
1329- SVNTRACE (
1330- Err = svn_client_merge_peg5 (svnPath,
1331- revrangearray.GetCount() ? revrangearray.GetAprArray(subpool) : NULL,
1332- pegrevision,
1333- destpath.GetSVNApiPath(subpool),
1334- depth,
1335- ignoreancestry,
1336- ignoreancestry,
1337- force,
1338- record_only,
1339- dryrun,
1340- true,
1341- opts,
1342- m_pctx,
1343- subpool),
1344- svnPath
1345- );
1315+ SVNTRACE(
1316+ Err = svn_client_merge_peg5(svnPath,
1317+ revrangearray.GetCount() ? revrangearray.GetAprArray(subpool) : NULL,
1318+ pegrevision,
1319+ destpath.GetSVNApiPath(subpool),
1320+ depth,
1321+ ignoreancestry,
1322+ ignoreancestry,
1323+ force,
1324+ record_only,
1325+ dryrun,
1326+ true,
1327+ opts,
1328+ m_pctx,
1329+ subpool),
1330+ svnPath);
13461331 ClearCAPIAuthCacheOnError();
13471332
13481333 return (Err == NULL);
@@ -1350,10 +1335,10 @@
13501335
13511336 bool SVN::MergeReintegrate(const CTSVNPath& source, const SVNRev& pegrevision, const CTSVNPath& wcpath, bool dryrun, const CString& options)
13521337 {
1353- SVNPool subpool(m_pool);
1354- apr_array_header_t *opts;
1338+ SVNPool subpool(m_pool);
1339+ apr_array_header_t* opts;
13551340
1356- opts = svn_cstring_split (CUnicodeUtils::GetUTF8(options), " \t\n\r", TRUE, subpool);
1341+ opts = svn_cstring_split(CUnicodeUtils::GetUTF8(options), " \t\n\r", TRUE, subpool);
13571342
13581343 Prepare();
13591344 const char* svnPath = source.GetSVNApiPath(subpool);
@@ -1360,17 +1345,16 @@
13601345 CHooks::Instance().PreConnect(CTSVNPathList(source));
13611346
13621347 #pragma warning(push)
1363-#pragma warning(disable:4996) // disable deprecated warning: we use svn_client_merge_reintegrate specifically for 'old style' merges
1364- SVNTRACE (
1348+#pragma warning(disable : 4996) // disable deprecated warning: we use svn_client_merge_reintegrate specifically for 'old style' merges
1349+ SVNTRACE(
13651350 Err = svn_client_merge_reintegrate(svnPath,
1366- pegrevision,
1367- wcpath.GetSVNApiPath(subpool),
1368- dryrun,
1369- opts,
1370- m_pctx,
1371- subpool),
1372- svnPath
1373- );
1351+ pegrevision,
1352+ wcpath.GetSVNApiPath(subpool),
1353+ dryrun,
1354+ opts,
1355+ m_pctx,
1356+ subpool),
1357+ svnPath);
13741358 #pragma warning(pop)
13751359
13761360 ClearCAPIAuthCacheOnError();
@@ -1379,21 +1363,20 @@
13791363
13801364 bool SVN::SuggestMergeSources(const CTSVNPath& targetpath, const SVNRev& revision, CTSVNPathList& sourceURLs)
13811365 {
1382- SVNPool subpool(m_pool);
1383- apr_array_header_t * sourceurls;
1366+ SVNPool subpool(m_pool);
1367+ apr_array_header_t* sourceurls;
13841368
13851369 Prepare();
13861370 sourceURLs.Clear();
13871371 const char* svnPath = targetpath.GetSVNApiPath(subpool);
13881372 CHooks::Instance().PreConnect(sourceURLs);
1389- SVNTRACE (
1373+ SVNTRACE(
13901374 Err = svn_client_suggest_merge_sources(&sourceurls,
1391- svnPath,
1392- revision,
1393- m_pctx,
1394- subpool),
1395- svnPath
1396- );
1375+ svnPath,
1376+ revision,
1377+ m_pctx,
1378+ subpool),
1379+ svnPath);
13971380
13981381 ClearCAPIAuthCacheOnError();
13991382 if (Err != NULL)
@@ -1403,7 +1386,7 @@
14031386
14041387 for (int i = 0; i < sourceurls->nelts; i++)
14051388 {
1406- const char *path = (APR_ARRAY_IDX (sourceurls, i, const char*));
1389+ const char* path = (APR_ARRAY_IDX(sourceurls, i, const char*));
14071390 sourceURLs.AddPath(CTSVNPath(CUnicodeUtils::GetUnicode(path)));
14081391 }
14091392
@@ -1417,12 +1400,12 @@
14171400 bool useGitFormat, bool ignoreproperties, bool propertiesonly, bool prettyprint, const CString& options, bool bAppend, const CTSVNPath& outputfile)
14181401 {
14191402 // to create a patch, we need to remove any custom diff tools which might be set in the config file
1420- svn_config_t * cfg = (svn_config_t *)apr_hash_get (m_pctx->config, SVN_CONFIG_CATEGORY_CONFIG, APR_HASH_KEY_STRING);
1421- CStringA diffCmd;
1422- CStringA diff3Cmd;
1403+ svn_config_t* cfg = (svn_config_t*)apr_hash_get(m_pctx->config, SVN_CONFIG_CATEGORY_CONFIG, APR_HASH_KEY_STRING);
1404+ CStringA diffCmd;
1405+ CStringA diff3Cmd;
14231406 if (cfg)
14241407 {
1425- const char * value;
1408+ const char* value;
14261409 svn_config_get(cfg, &value, SVN_CONFIG_SECTION_HELPERS, SVN_CONFIG_OPTION_DIFF_CMD, NULL);
14271410 diffCmd = CStringA(value);
14281411 svn_config_get(cfg, &value, SVN_CONFIG_SECTION_HELPERS, SVN_CONFIG_OPTION_DIFF3_CMD, NULL);
@@ -1456,15 +1439,15 @@
14561439 bool ignoreancestry, bool nodiffadded, bool nodiffdeleted, bool showCopiesAsAdds, bool ignorecontenttype,
14571440 bool useGitFormat, bool ignoreproperties, bool propertiesonly, bool prettyprint, const CString& options, bool bAppend, const CTSVNPath& outputfile, const CTSVNPath& errorfile)
14581441 {
1459- bool del = false;
1460- apr_file_t * outfile = nullptr;
1461- apr_file_t * errfile = nullptr;
1462- apr_array_header_t *opts;
1442+ bool del = false;
1443+ apr_file_t* outfile = nullptr;
1444+ apr_file_t* errfile = nullptr;
1445+ apr_array_header_t* opts;
14631446
14641447 SVNPool localpool(m_pool);
14651448 Prepare();
14661449
1467- opts = svn_cstring_split (CUnicodeUtils::GetUTF8(options), " \t\n\r", TRUE, localpool);
1450+ opts = svn_cstring_split(CUnicodeUtils::GetUTF8(options), " \t\n\r", TRUE, localpool);
14681451
14691452 apr_int32_t flags = APR_WRITE | APR_CREATE | APR_BINARY;
14701453 if (bAppend)
@@ -1471,20 +1454,20 @@
14711454 flags |= APR_APPEND;
14721455 else
14731456 flags |= APR_TRUNCATE;
1474- Err = svn_io_file_open (&outfile, outputfile.GetSVNApiPath(localpool),
1475- flags,
1476- APR_OS_DEFAULT, localpool);
1457+ Err = svn_io_file_open(&outfile, outputfile.GetSVNApiPath(localpool),
1458+ flags,
1459+ APR_OS_DEFAULT, localpool);
14771460 if (Err)
14781461 return false;
14791462
1480- svn_stream_t * outstream = svn_stream_from_aprfile2(outfile, false, localpool);
1481- svn_stream_t * errstream = svn_stream_from_aprfile2(errfile, false, localpool);
1463+ svn_stream_t* outstream = svn_stream_from_aprfile2(outfile, false, localpool);
1464+ svn_stream_t* errstream = svn_stream_from_aprfile2(errfile, false, localpool);
14821465
14831466 CTSVNPath workingErrorFile;
14841467 if (errorfile.IsEmpty())
14851468 {
14861469 workingErrorFile = CTempFiles::Instance().GetTempFilePath(true);
1487- del = true;
1470+ del = true;
14881471 }
14891472 else
14901473 {
@@ -1491,9 +1474,9 @@
14911474 workingErrorFile = errorfile;
14921475 }
14931476
1494- Err = svn_io_file_open (&errfile, workingErrorFile.GetSVNApiPath(localpool),
1495- APR_WRITE | APR_CREATE | APR_TRUNCATE | APR_BINARY,
1496- APR_OS_DEFAULT, localpool);
1477+ Err = svn_io_file_open(&errfile, workingErrorFile.GetSVNApiPath(localpool),
1478+ APR_WRITE | APR_CREATE | APR_TRUNCATE | APR_BINARY,
1479+ APR_OS_DEFAULT, localpool);
14971480 if (Err)
14981481 return false;
14991482
@@ -1500,8 +1483,8 @@
15001483 const char* svnPath = path1.GetSVNApiPath(localpool);
15011484 if (path1.IsUrl() || path2.IsUrl() || !revision1.IsWorking() || !revision2.IsWorking())
15021485 CHooks::Instance().PreConnect(CTSVNPathList(path1));
1503- SVNTRACE (
1504- Err = svn_client_diff7 (opts,
1486+ SVNTRACE(
1487+ Err = svn_client_diff7(opts,
15051488 svnPath,
15061489 revision1,
15071490 path2.GetSVNApiPath(localpool),
@@ -1520,11 +1503,10 @@
15201503 APR_LOCALE_CHARSET,
15211504 outstream,
15221505 errstream,
1523- NULL, // we don't deal with change lists when diffing
1506+ NULL, // we don't deal with change lists when diffing
15241507 m_pctx,
15251508 localpool),
1526- svnPath
1527- );
1509+ svnPath);
15281510 ClearCAPIAuthCacheOnError();
15291511 if (Err)
15301512 {
@@ -1532,7 +1514,7 @@
15321514 }
15331515 if (del)
15341516 {
1535- svn_io_remove_file2 (workingErrorFile.GetSVNApiPath(localpool), true, localpool);
1517+ svn_io_remove_file2(workingErrorFile.GetSVNApiPath(localpool), true, localpool);
15361518 }
15371519 return true;
15381520 }
@@ -1541,7 +1523,7 @@
15411523 const SVNRev& startrev, const SVNRev& endrev,
15421524 const CTSVNPath& relativeToDir, svn_depth_t depth,
15431525 bool ignoreancestry, bool nodiffadded, bool nodiffdeleted, bool showCopiesAsAdds, bool ignorecontenttype,
1544- bool useGitFormat, bool ignoreproperties, bool propertiesonly, bool prettyprint, const CString& options, bool bAppend, const CTSVNPath& outputfile)
1526+ bool useGitFormat, bool ignoreproperties, bool propertiesonly, bool prettyprint, const CString& options, bool bAppend, const CTSVNPath& outputfile)
15451527 {
15461528 return PegDiff(path, pegrevision, startrev, endrev, relativeToDir, depth, ignoreancestry, nodiffadded, nodiffdeleted, showCopiesAsAdds, ignorecontenttype, useGitFormat, ignoreproperties, propertiesonly, prettyprint, options, bAppend, outputfile, CTSVNPath());
15471529 }
@@ -1552,15 +1534,15 @@
15521534 bool ignoreancestry, bool nodiffadded, bool nodiffdeleted, bool showCopiesAsAdds, bool ignorecontenttype,
15531535 bool useGitFormat, bool ignoreproperties, bool propertiesonly, bool prettyprint, const CString& options, bool bAppend, const CTSVNPath& outputfile, const CTSVNPath& errorfile)
15541536 {
1555- bool del = false;
1556- apr_file_t * outfile;
1557- apr_file_t * errfile;
1558- apr_array_header_t *opts;
1537+ bool del = false;
1538+ apr_file_t* outfile;
1539+ apr_file_t* errfile;
1540+ apr_array_header_t* opts;
15591541
15601542 SVNPool localpool(m_pool);
15611543 Prepare();
15621544
1563- opts = svn_cstring_split (CUnicodeUtils::GetUTF8(options), " \t\n\r", TRUE, localpool);
1545+ opts = svn_cstring_split(CUnicodeUtils::GetUTF8(options), " \t\n\r", TRUE, localpool);
15641546
15651547 apr_int32_t flags = APR_WRITE | APR_CREATE | APR_BINARY;
15661548 if (bAppend)
@@ -1567,9 +1549,9 @@
15671549 flags |= APR_APPEND;
15681550 else
15691551 flags |= APR_TRUNCATE;
1570- Err = svn_io_file_open (&outfile, outputfile.GetSVNApiPath(localpool),
1571- flags,
1572- APR_OS_DEFAULT, localpool);
1552+ Err = svn_io_file_open(&outfile, outputfile.GetSVNApiPath(localpool),
1553+ flags,
1554+ APR_OS_DEFAULT, localpool);
15731555
15741556 if (Err)
15751557 return false;
@@ -1578,7 +1560,7 @@
15781560 if (errorfile.IsEmpty())
15791561 {
15801562 workingErrorFile = CTempFiles::Instance().GetTempFilePath(true);
1581- del = true;
1563+ del = true;
15821564 }
15831565 else
15841566 {
@@ -1585,42 +1567,41 @@
15851567 workingErrorFile = errorfile;
15861568 }
15871569
1588- Err = svn_io_file_open (&errfile, workingErrorFile.GetSVNApiPath(localpool),
1589- APR_WRITE | APR_CREATE | APR_TRUNCATE | APR_BINARY,
1590- APR_OS_DEFAULT, localpool);
1570+ Err = svn_io_file_open(&errfile, workingErrorFile.GetSVNApiPath(localpool),
1571+ APR_WRITE | APR_CREATE | APR_TRUNCATE | APR_BINARY,
1572+ APR_OS_DEFAULT, localpool);
15911573 if (Err)
15921574 return false;
15931575
1594- svn_stream_t * outstream = svn_stream_from_aprfile2(outfile, false, localpool);
1595- svn_stream_t * errstream = svn_stream_from_aprfile2(errfile, false, localpool);
1576+ svn_stream_t* outstream = svn_stream_from_aprfile2(outfile, false, localpool);
1577+ svn_stream_t* errstream = svn_stream_from_aprfile2(errfile, false, localpool);
15961578
15971579 const char* svnPath = path.GetSVNApiPath(localpool);
15981580 CHooks::Instance().PreConnect(CTSVNPathList(path));
1599- SVNTRACE (
1600- Err = svn_client_diff_peg7 (opts,
1601- svnPath,
1602- pegrevision,
1603- startrev,
1604- endrev,
1605- relativeToDir.IsEmpty() ? NULL : relativeToDir.GetSVNApiPath(localpool),
1606- depth,
1607- ignoreancestry,
1608- nodiffadded,
1609- nodiffdeleted,
1610- showCopiesAsAdds,
1611- ignorecontenttype,
1612- ignoreproperties,
1613- propertiesonly,
1614- useGitFormat,
1615- prettyprint,
1616- APR_LOCALE_CHARSET,
1617- outstream,
1618- errstream,
1619- NULL, // we don't deal with change lists when diffing
1620- m_pctx,
1621- localpool),
1622- svnPath
1623- );
1581+ SVNTRACE(
1582+ Err = svn_client_diff_peg7(opts,
1583+ svnPath,
1584+ pegrevision,
1585+ startrev,
1586+ endrev,
1587+ relativeToDir.IsEmpty() ? NULL : relativeToDir.GetSVNApiPath(localpool),
1588+ depth,
1589+ ignoreancestry,
1590+ nodiffadded,
1591+ nodiffdeleted,
1592+ showCopiesAsAdds,
1593+ ignorecontenttype,
1594+ ignoreproperties,
1595+ propertiesonly,
1596+ useGitFormat,
1597+ prettyprint,
1598+ APR_LOCALE_CHARSET,
1599+ outstream,
1600+ errstream,
1601+ NULL, // we don't deal with change lists when diffing
1602+ m_pctx,
1603+ localpool),
1604+ svnPath);
16241605 ClearCAPIAuthCacheOnError();
16251606 if (Err)
16261607 {
@@ -1628,7 +1609,7 @@
16281609 }
16291610 if (del)
16301611 {
1631- svn_io_remove_file2 (workingErrorFile.GetSVNApiPath(localpool), true, localpool);
1612+ svn_io_remove_file2(workingErrorFile.GetSVNApiPath(localpool), true, localpool);
16321613 }
16331614 return true;
16341615 }
@@ -1641,14 +1622,13 @@
16411622 const char* svnPath = path1.GetSVNApiPath(localpool);
16421623 if (path1.IsUrl() || path2.IsUrl() || !rev1.IsWorking() || !rev2.IsWorking())
16431624 CHooks::Instance().PreConnect(CTSVNPathList(path1));
1644- SVNTRACE (
1625+ SVNTRACE(
16451626 Err = svn_client_diff_summarize2(svnPath, rev1,
1646- path2.GetSVNApiPath(localpool), rev2,
1647- depth, ignoreancestry, NULL,
1648- summarize_func, this,
1649- m_pctx, localpool),
1650- svnPath
1651- );
1627+ path2.GetSVNApiPath(localpool), rev2,
1628+ depth, ignoreancestry, NULL,
1629+ summarize_func, this,
1630+ m_pctx, localpool),
1631+ svnPath);
16521632 ClearCAPIAuthCacheOnError();
16531633
16541634 return (Err == NULL);
@@ -1661,32 +1641,31 @@
16611641
16621642 const char* svnPath = path.GetSVNApiPath(localpool);
16631643 CHooks::Instance().PreConnect(CTSVNPathList(path));
1664- SVNTRACE (
1644+ SVNTRACE(
16651645 Err = svn_client_diff_summarize_peg2(svnPath, peg, rev1, rev2,
1666- depth, ignoreancestry, NULL,
1667- summarize_func, this,
1668- m_pctx, localpool),
1669- svnPath
1670- );
1646+ depth, ignoreancestry, NULL,
1647+ summarize_func, this,
1648+ m_pctx, localpool),
1649+ svnPath);
16711650 ClearCAPIAuthCacheOnError();
16721651
16731652 return (Err == NULL);
16741653 }
16751654
1676-LogCache::CCachedLogInfo* SVN::GetLogCache (const CTSVNPath& path)
1655+LogCache::CCachedLogInfo* SVN::GetLogCache(const CTSVNPath& path)
16771656 {
16781657 if (!LogCache::CSettings::GetEnabled())
16791658 return NULL;
16801659
16811660 CString uuid;
1682- CString root = GetLogCachePool()->GetRepositoryInfo().GetRepositoryRootAndUUID (path, uuid);
1683- return GetLogCachePool()->GetCache (uuid, root);
1661+ CString root = GetLogCachePool()->GetRepositoryInfo().GetRepositoryRootAndUUID(path, uuid);
1662+ return GetLogCachePool()->GetCache(uuid, root);
16841663 }
16851664
16861665 std::unique_ptr<const CCacheLogQuery>
1687-SVN::ReceiveLog (const CTSVNPathList& pathlist, const SVNRev& revisionPeg,
1688- const SVNRev& revisionStart, const SVNRev& revisionEnd,
1689- int limit, bool strict, bool withMerges, bool refresh)
1666+ SVN::ReceiveLog(const CTSVNPathList& pathlist, const SVNRev& revisionPeg,
1667+ const SVNRev& revisionStart, const SVNRev& revisionEnd,
1668+ int limit, bool strict, bool withMerges, bool refresh)
16901669 {
16911670 Prepare();
16921671 try
@@ -1695,39 +1674,28 @@
16951674
16961675 // query used internally to contact the repository if necessary
16971676
1698- CSVNLogQuery svnQuery (m_pctx, localpool);
1677+ CSVNLogQuery svnQuery(m_pctx, localpool);
16991678
17001679 // cached-based queries.
17011680 // Use & update existing cache
17021681
1703- std::unique_ptr<CCacheLogQuery> cacheQuery
1704- (new CCacheLogQuery (GetLogCachePool(), &svnQuery));
1682+ std::unique_ptr<CCacheLogQuery> cacheQuery(new CCacheLogQuery(GetLogCachePool(), &svnQuery));
17051683
17061684 // run query through SVN but collect results in a temporary cache
17071685
1708- std::unique_ptr<CCacheLogQuery> tempQuery
1709- (new CCacheLogQuery (*this, &svnQuery));
1686+ std::unique_ptr<CCacheLogQuery> tempQuery(new CCacheLogQuery(*this, &svnQuery));
17101687
17111688 // select query and run it
17121689
17131690 ILogQuery* query = !IsLogCacheEnabled() || refresh
1714- ? tempQuery.get()
1715- : cacheQuery.get();
1691+ ? tempQuery.get()
1692+ : cacheQuery.get();
17161693
17171694 try
17181695 {
1719- query->Log ( pathlist
1720- , revisionPeg
1721- , revisionStart
1722- , revisionEnd
1723- , limit
1724- , strict != FALSE
1725- , this
1726- , false // changes will be fetched but not forwarded to receiver
1727- , withMerges != FALSE
1728- , true
1729- , false
1730- , TRevPropNames());
1696+ query->Log(pathlist, revisionPeg, revisionStart, revisionEnd, limit, strict != FALSE, this, false // changes will be fetched but not forwarded to receiver
1697+ ,
1698+ withMerges != FALSE, true, false, TRevPropNames());
17311699 }
17321700 catch (SVNError& e)
17331701 {
@@ -1738,7 +1706,7 @@
17381706
17391707 // caller shall be able to detect the cancellation, though
17401708
1741- Err = svn_error_create (e.GetCode(), NULL, e.GetMessage());
1709+ Err = svn_error_create(e.GetCode(), NULL, e.GetMessage());
17421710 }
17431711
17441712 // merge temp results with permanent cache, if applicable
@@ -1749,7 +1717,7 @@
17491717
17501718 if (tempQuery->GotAnyData())
17511719 {
1752- tempQuery->UpdateCache (cacheQuery.get());
1720+ tempQuery->UpdateCache(cacheQuery.get());
17531721 }
17541722 else
17551723 {
@@ -1756,23 +1724,19 @@
17561724 // no connection to the repository but also not canceled
17571725 // (no exception thrown) -> re-run from cache
17581726
1759- return ReceiveLog ( pathlist
1760- , revisionPeg, revisionStart, revisionEnd
1761- , limit, strict, withMerges
1762- , false);
1727+ return ReceiveLog(pathlist, revisionPeg, revisionStart, revisionEnd, limit, strict, withMerges, false);
17631728 }
17641729 }
17651730
17661731 // return the cache that contains the log info
17671732
1768- return std::unique_ptr<const CCacheLogQuery>
1769- (IsLogCacheEnabled()
1770- ? cacheQuery.release()
1771- : tempQuery.release() );
1733+ return std::unique_ptr<const CCacheLogQuery>(IsLogCacheEnabled()
1734+ ? cacheQuery.release()
1735+ : tempQuery.release());
17721736 }
17731737 catch (SVNError& e)
17741738 {
1775- Err = svn_error_create (e.GetCode(), NULL, e.GetMessage());
1739+ Err = svn_error_create(e.GetCode(), NULL, e.GetMessage());
17761740 return std::unique_ptr<const CCacheLogQuery>();
17771741 }
17781742 }
@@ -1779,10 +1743,10 @@
17791743
17801744 bool SVN::Cat(const CTSVNPath& url, const SVNRev& pegrevision, const SVNRev& revision, const CTSVNPath& localpath)
17811745 {
1782- apr_file_t * file;
1783- svn_stream_t * stream;
1784- apr_status_t status;
1785- SVNPool localpool(m_pool);
1746+ apr_file_t* file;
1747+ svn_stream_t* stream;
1748+ apr_status_t status;
1749+ SVNPool localpool(m_pool);
17861750 Prepare();
17871751
17881752 CTSVNPath fullLocalPath(localpath);
@@ -1803,10 +1767,9 @@
18031767 const char* svnPath = url.GetSVNApiPath(localpool);
18041768 if (url.IsUrl() || (!pegrevision.IsWorking() && !pegrevision.IsValid()) || (!revision.IsWorking() && !revision.IsValid()))
18051769 CHooks::Instance().PreConnect(CTSVNPathList(url));
1806- SVNTRACE (
1770+ SVNTRACE(
18071771 Err = svn_client_cat3(NULL, stream, svnPath, pegrevision, revision, true, m_pctx, localpool, localpool),
1808- svnPath
1809- );
1772+ svnPath);
18101773
18111774 apr_file_close(file);
18121775 ClearCAPIAuthCacheOnError();
@@ -1816,26 +1779,26 @@
18161779
18171780 bool SVN::CreateRepository(const CTSVNPath& path, const CString& fstype)
18181781 {
1819- svn_repos_t * repo;
1820- svn_error_t * err;
1821- apr_hash_t *config;
1782+ svn_repos_t* repo;
1783+ svn_error_t* err;
1784+ apr_hash_t* config;
18221785
18231786 SVNPool localpool;
18241787
1825- apr_hash_t *fs_config = apr_hash_make (localpool);
1788+ apr_hash_t* fs_config = apr_hash_make(localpool);
18261789
1827- apr_hash_set (fs_config, SVN_FS_CONFIG_BDB_TXN_NOSYNC,
1828- APR_HASH_KEY_STRING, "0");
1790+ apr_hash_set(fs_config, SVN_FS_CONFIG_BDB_TXN_NOSYNC,
1791+ APR_HASH_KEY_STRING, "0");
18291792
1830- apr_hash_set (fs_config, SVN_FS_CONFIG_BDB_LOG_AUTOREMOVE,
1831- APR_HASH_KEY_STRING, "1");
1793+ apr_hash_set(fs_config, SVN_FS_CONFIG_BDB_LOG_AUTOREMOVE,
1794+ APR_HASH_KEY_STRING, "1");
18321795
18331796 config = SVNConfig::Instance().GetConfig(localpool);
18341797
1835- const char * fs_type = apr_pstrdup(localpool, CStringA(fstype));
1836- apr_hash_set (fs_config, SVN_FS_CONFIG_FS_TYPE,
1837- APR_HASH_KEY_STRING,
1838- fs_type);
1798+ const char* fs_type = apr_pstrdup(localpool, CStringA(fstype));
1799+ apr_hash_set(fs_config, SVN_FS_CONFIG_FS_TYPE,
1800+ APR_HASH_KEY_STRING,
1801+ fs_type);
18391802 err = svn_repos_create(&repo, path.GetSVNApiPath(localpool), NULL, NULL, config, fs_config, localpool);
18401803
18411804 bool ret = (err == NULL);
@@ -1846,10 +1809,10 @@
18461809 bool SVN::Blame(const CTSVNPath& path, const SVNRev& startrev, const SVNRev& endrev, const SVNRev& peg, const CString& diffoptions, bool ignoremimetype, bool includemerge)
18471810 {
18481811 Prepare();
1849- SVNPool subpool(m_pool);
1850- apr_array_header_t *opts;
1851- svn_diff_file_options_t * options = svn_diff_file_options_create(subpool);
1852- opts = svn_cstring_split (CUnicodeUtils::GetUTF8(diffoptions), " \t\n\r", TRUE, subpool);
1812+ SVNPool subpool(m_pool);
1813+ apr_array_header_t* opts;
1814+ svn_diff_file_options_t* options = svn_diff_file_options_create(subpool);
1815+ opts = svn_cstring_split(CUnicodeUtils::GetUTF8(diffoptions), " \t\n\r", TRUE, subpool);
18531816 svn_error_clear(svn_diff_file_options_parse(options, opts, subpool));
18541817
18551818 // Subversion < 1.4 silently changed a revision WC to BASE. Due to a bug
@@ -1866,39 +1829,37 @@
18661829
18671830 const char* svnPath = path.GetSVNApiPath(subpool);
18681831 CHooks::Instance().PreConnect(CTSVNPathList(path));
1869- SVNTRACE (
1870- Err = svn_client_blame5 ( svnPath,
1871- peg,
1872- rev1,
1873- rev2,
1874- options,
1875- ignoremimetype,
1876- includemerge,
1877- blameReceiver,
1878- (void *)this,
1879- m_pctx,
1880- subpool),
1881- svnPath
1882- );
1832+ SVNTRACE(
1833+ Err = svn_client_blame6(svnPath,
1834+ peg,
1835+ rev1,
1836+ rev2,
1837+ options,
1838+ ignoremimetype,
1839+ includemerge,
1840+ blameReceiver,
1841+ (void*)this,
1842+ m_pctx,
1843+ subpool),
1844+ svnPath);
18831845 ClearCAPIAuthCacheOnError();
18841846
1885- if ((Err != 0)&&((Err->apr_err == SVN_ERR_UNSUPPORTED_FEATURE)||(Err->apr_err == SVN_ERR_FS_NOT_FOUND)||(Err->apr_err == SVN_ERR_CLIENT_UNRELATED_RESOURCES))&&(includemerge))
1847+ if ((Err != 0) && ((Err->apr_err == SVN_ERR_UNSUPPORTED_FEATURE) || (Err->apr_err == SVN_ERR_FS_NOT_FOUND) || (Err->apr_err == SVN_ERR_CLIENT_UNRELATED_RESOURCES)) && (includemerge))
18861848 {
18871849 Prepare();
1888- SVNTRACE (
1889- Err = svn_client_blame5 ( svnPath,
1890- peg,
1891- rev1,
1892- rev2,
1893- options,
1894- ignoremimetype,
1895- false,
1896- blameReceiver,
1897- (void *)this,
1898- m_pctx,
1899- subpool),
1900- svnPath
1901- )
1850+ SVNTRACE(
1851+ Err = svn_client_blame6(svnPath,
1852+ peg,
1853+ rev1,
1854+ rev2,
1855+ options,
1856+ ignoremimetype,
1857+ false,
1858+ blameReceiver,
1859+ (void*)this,
1860+ m_pctx,
1861+ subpool),
1862+ svnPath)
19021863 }
19031864 ClearCAPIAuthCacheOnError();
19041865
@@ -1905,31 +1866,31 @@
19051866 return (Err == NULL);
19061867 }
19071868
1908-svn_error_t* SVN::blameReceiver(void *baton,
1869+svn_error_t* SVN::blameReceiver(void* baton,
19091870 svn_revnum_t /*start_revnum*/,
19101871 svn_revnum_t /*end_revnum*/,
1911- apr_int64_t line_no,
1912- svn_revnum_t revision,
1913- apr_hash_t *rev_props,
1914- svn_revnum_t merged_revision,
1915- apr_hash_t *merged_rev_props,
1916- const char *merged_path,
1917- const char *line,
1872+ apr_int64_t line_no,
1873+ svn_revnum_t revision,
1874+ apr_hash_t* rev_props,
1875+ svn_revnum_t merged_revision,
1876+ apr_hash_t* merged_rev_props,
1877+ const char* merged_path,
1878+ const svn_string_t* line,
19181879 svn_boolean_t local_change,
1919- apr_pool_t *pool)
1880+ apr_pool_t* pool)
19201881 {
1921- svn_error_t * error = NULL;
1922- CString author_native, merged_author_native;
1923- CString merged_path_native;
1924- CStringA log_msg;
1925- CStringA merged_log_msg;
1926- CStringA line_native;
1927- TCHAR date_native[SVN_DATE_BUFFER] = {0};
1928- TCHAR merged_date_native[SVN_DATE_BUFFER] = {0};
1882+ svn_error_t* error = NULL;
1883+ CString author_native, merged_author_native;
1884+ CString merged_path_native;
1885+ CStringA log_msg;
1886+ CStringA merged_log_msg;
1887+ CStringA line_native;
1888+ TCHAR date_native[SVN_DATE_BUFFER] = {0};
1889+ TCHAR merged_date_native[SVN_DATE_BUFFER] = {0};
19291890
1930- SVN * svn = (SVN *)baton;
1891+ SVN* svn = (SVN*)baton;
19311892
1932- const char * prop = svn_prop_get_value(rev_props, SVN_PROP_REVISION_AUTHOR);
1893+ const char* prop = svn_prop_get_value(rev_props, SVN_PROP_REVISION_AUTHOR);
19331894 if (prop)
19341895 author_native = CUnicodeUtils::GetUnicode(prop);
19351896 prop = svn_prop_get_value(merged_rev_props, SVN_PROP_REVISION_AUTHOR);
@@ -1943,14 +1904,66 @@
19431904 if (prop)
19441905 merged_log_msg = prop;
19451906
1946-
19471907 if (merged_path)
19481908 merged_path_native = CUnicodeUtils::GetUnicode(merged_path);
19491909
1910+ bool utf16 = ((line->len==1) && svn->ignoredLastLine);
1911+ svn->ignoredLastLine = false;
19501912 if (line)
1951- line_native = line;
1952-
1953-
1913+ {
1914+ if (svn->unicodeType == SVN::UnicodeType::AUTOTYPE)
1915+ {
1916+ // encoding not yet determined. First check for BOM
1917+ if (line->len >= 2)
1918+ {
1919+ if ((line->data[0] == 0xFE) && (line->data[1] == 0xFF))
1920+ svn->unicodeType = SVN::UnicodeType::UTF16_BEBOM;
1921+ if ((line->data[0] == 0xFF) && (line->data[1] == 0xFE))
1922+ svn->unicodeType = SVN::UnicodeType::UTF16_LEBOM;
1923+ if ((line->len >= 3)&&(line->data[0] == 0xEF) && (line->data[1] == 0xBB) && (line->data[1] == 0xBF))
1924+ svn->unicodeType = SVN::UnicodeType::UTF8BOM;
1925+ }
1926+
1927+ if ((line->len > 10) && (svn->unicodeType == SVN::UnicodeType::AUTOTYPE))
1928+ {
1929+ // we don't have a BOM, so we have to try to figure out
1930+ // the encoding using heuristics. But only if the line is long enough
1931+ int nullcount = 0;
1932+ for (int i = 0; i < line->len; ++i)
1933+ {
1934+ if (line->data[i] == 0)
1935+ ++nullcount;
1936+ }
1937+ if (nullcount > (line->len / 10))
1938+ {
1939+ // assume UTF16_LE
1940+ svn->unicodeType = SVN::UnicodeType::UTF16_LE;
1941+ }
1942+ }
1943+ }
1944+ line_native = line->data;
1945+ int wlen = int(line->len / sizeof(wchar_t));
1946+ if ((svn->unicodeType == SVN::UnicodeType::UTF16_LE) ||
1947+ (line_native.GetLength() < (wlen - 1)))
1948+ {
1949+ // assume utf16
1950+ if ((line->len % 2) == 0)
1951+ {
1952+ std::wstring ws = std::wstring((wchar_t*)line->data, wlen);
1953+ line_native = CUnicodeUtils::StdGetUTF8(ws).c_str();
1954+ utf16 = true;
1955+ }
1956+ // subsequent uf16 lines are off by one zero byte
1957+ else if (line->data[0] == 0)
1958+ {
1959+ auto adjustedLine = line->data;
1960+ ++adjustedLine;
1961+ std::wstring ws = std::wstring((wchar_t*)adjustedLine, wlen);
1962+ line_native = CUnicodeUtils::StdGetUTF8(ws).c_str();
1963+ utf16 = true;
1964+ }
1965+ }
1966+ }
19541967 prop = svn_prop_get_value(rev_props, SVN_PROP_REVISION_DATE);
19551968 if (prop)
19561969 {
@@ -1957,7 +1970,7 @@
19571970 // Convert date to a format for humans.
19581971 apr_time_t time_temp;
19591972
1960- error = svn_time_from_cstring (&time_temp, prop, pool);
1973+ error = svn_time_from_cstring(&time_temp, prop, pool);
19611974 if (error)
19621975 return error;
19631976
@@ -1972,7 +1985,7 @@
19721985 // Convert date to a format for humans.
19731986 apr_time_t time_temp;
19741987
1975- error = svn_time_from_cstring (&time_temp, prop, pool);
1988+ error = svn_time_from_cstring(&time_temp, prop, pool);
19761989 if (error)
19771990 return error;
19781991
@@ -1981,11 +1994,16 @@
19811994 else
19821995 wcscat_s(merged_date_native, L"(no date)");
19831996
1984-
1985- if (!svn->BlameCallback((LONG)line_no, !!local_change, revision, author_native, date_native, merged_revision, merged_author_native, merged_date_native, merged_path_native, line_native, log_msg, merged_log_msg))
1997+ if (!svn->ignoreNextLine)
19861998 {
1987- return svn_error_create(SVN_ERR_CANCELLED, NULL, "error in blame callback");
1999+ if (!svn->BlameCallback((LONG)line_no, !!local_change, revision, author_native, date_native, merged_revision, merged_author_native, merged_date_native, merged_path_native, line_native, log_msg, merged_log_msg))
2000+ {
2001+ return svn_error_create(SVN_ERR_CANCELLED, NULL, "error in blame callback");
2002+ }
19882003 }
2004+ else
2005+ svn->ignoredLastLine = true;
2006+ svn->ignoreNextLine = utf16;
19892007 return error;
19902008 }
19912009
@@ -2013,9 +2031,9 @@
20132031 return (Err == NULL);
20142032 }
20152033
2016-svn_error_t* SVN::summarize_func(const svn_client_diff_summarize_t *diff, void *baton, apr_pool_t * /*pool*/)
2034+svn_error_t* SVN::summarize_func(const svn_client_diff_summarize_t* diff, void* baton, apr_pool_t* /*pool*/)
20172035 {
2018- SVN * svn = (SVN *)baton;
2036+ SVN* svn = (SVN*)baton;
20192037 if (diff)
20202038 {
20212039 CTSVNPath path = CTSVNPath(CUnicodeUtils::GetUnicode(diff->path));
@@ -2024,36 +2042,35 @@
20242042 return SVN_NO_ERROR;
20252043 }
20262044 svn_error_t* SVN::listReceiver(void* baton, const char* path,
2027- const svn_dirent_t *dirent,
2028- const svn_lock_t *lock,
2029- const char *abs_path,
2030- const char *external_parent_url,
2031- const char *external_target,
2032- apr_pool_t * /*pool*/)
2045+ const svn_dirent_t* dirent,
2046+ const svn_lock_t* lock,
2047+ const char* abs_path,
2048+ const char* external_parent_url,
2049+ const char* external_target,
2050+ apr_pool_t* /*pool*/)
20332051 {
2034- SVN * svn = (SVN *)baton;
2035- bool result = !!svn->ReportList(CUnicodeUtils::GetUnicode(path),
2036- dirent->kind,
2037- dirent->size,
2038- !!dirent->has_props,
2039- dirent->created_rev,
2040- dirent->time,
2041- CUnicodeUtils::GetUnicode(dirent->last_author),
2042- lock ? CUnicodeUtils::GetUnicode(lock->token) : CString(),
2043- lock ? CUnicodeUtils::GetUnicode(lock->owner) : CString(),
2044- lock ? CUnicodeUtils::GetUnicode(lock->comment) : CString(),
2045- lock ? !!lock->is_dav_comment : false,
2046- lock ? lock->creation_date : 0,
2047- lock ? lock->expiration_date : 0,
2048- CUnicodeUtils::GetUnicode(abs_path),
2049- CUnicodeUtils::GetUnicode(external_parent_url),
2050- CUnicodeUtils::GetUnicode(external_target)
2051- );
2052- svn_error_t * err = NULL;
2052+ SVN* svn = (SVN*)baton;
2053+ bool result = !!svn->ReportList(CUnicodeUtils::GetUnicode(path),
2054+ dirent->kind,
2055+ dirent->size,
2056+ !!dirent->has_props,
2057+ dirent->created_rev,
2058+ dirent->time,
2059+ CUnicodeUtils::GetUnicode(dirent->last_author),
2060+ lock ? CUnicodeUtils::GetUnicode(lock->token) : CString(),
2061+ lock ? CUnicodeUtils::GetUnicode(lock->owner) : CString(),
2062+ lock ? CUnicodeUtils::GetUnicode(lock->comment) : CString(),
2063+ lock ? !!lock->is_dav_comment : false,
2064+ lock ? lock->creation_date : 0,
2065+ lock ? lock->expiration_date : 0,
2066+ CUnicodeUtils::GetUnicode(abs_path),
2067+ CUnicodeUtils::GetUnicode(external_parent_url),
2068+ CUnicodeUtils::GetUnicode(external_target));
2069+ svn_error_t* err = NULL;
20532070 if ((result == false) || svn->Cancel())
20542071 {
20552072 CString temp;
2056- temp.LoadString (result ? IDS_SVN_USERCANCELLED : IDS_ERR_ERROR);
2073+ temp.LoadString(result ? IDS_SVN_USERCANCELLED : IDS_ERR_ERROR);
20572074 err = svn_error_create(SVN_ERR_CANCELLED, NULL, CUnicodeUtils::GetUTF8(temp));
20582075 }
20592076 return err;
@@ -2061,11 +2078,9 @@
20612078
20622079 // implement ILogReceiver
20632080
2064-void SVN::ReceiveLog ( TChangedPaths* /* changes */
2065- , svn_revnum_t rev
2066- , const StandardRevProps* stdRevProps
2067- , UserRevPropArray* userRevProps
2068- , const MergeInfo* mergeInfo)
2081+void SVN::ReceiveLog(TChangedPaths* /* changes */
2082+ ,
2083+ svn_revnum_t rev, const StandardRevProps* stdRevProps, UserRevPropArray* userRevProps, const MergeInfo* mergeInfo)
20692084 {
20702085 // check for user pressing "Cancel" somewhere
20712086
@@ -2075,8 +2090,8 @@
20752090 {
20762091 // only use revision 0 if either the author or a message is set, or if user props are set
20772092 bool bEmpty = stdRevProps ? stdRevProps->GetAuthor().empty() : true;
2078- bEmpty = bEmpty && (stdRevProps ? stdRevProps->GetMessage().empty() : true);
2079- bEmpty = bEmpty && (userRevProps ? userRevProps->GetCount() == 0 : true);
2093+ bEmpty = bEmpty && (stdRevProps ? stdRevProps->GetMessage().empty() : true);
2094+ bEmpty = bEmpty && (userRevProps ? userRevProps->GetCount() == 0 : true);
20802095 if (bEmpty)
20812096 return;
20822097 }
@@ -2084,18 +2099,14 @@
20842099 // use the log info (in a derived class specific way)
20852100
20862101 static const std::string emptyString;
2087- Log ( rev
2088- , stdRevProps == NULL ? emptyString : stdRevProps->GetAuthor()
2089- , stdRevProps == NULL ? emptyString : stdRevProps->GetMessage()
2090- , stdRevProps == NULL ? apr_time_t(0) : stdRevProps->GetTimeStamp()
2091- , mergeInfo);
2102+ Log(rev, stdRevProps == NULL ? emptyString : stdRevProps->GetAuthor(), stdRevProps == NULL ? emptyString : stdRevProps->GetMessage(), stdRevProps == NULL ? apr_time_t(0) : stdRevProps->GetTimeStamp(), mergeInfo);
20922103 }
20932104
2094-void SVN::notify( void *baton,
2095- const svn_wc_notify_t *notify,
2096- apr_pool_t *pool)
2105+void SVN::notify(void* baton,
2106+ const svn_wc_notify_t* notify,
2107+ apr_pool_t* pool)
20972108 {
2098- SVN * svn = (SVN *)baton;
2109+ SVN* svn = (SVN*)baton;
20992110
21002111 CTSVNPath tsvnPath;
21012112 tsvnPath.SetFromSVN(notify->path);
@@ -2124,24 +2135,23 @@
21242135 }
21252136
21262137 static svn_wc_conflict_choice_t
2127-trivial_conflict_choice(const svn_wc_conflict_description2_t *cd)
2138+ trivial_conflict_choice(const svn_wc_conflict_description2_t* cd)
21282139 {
2129- if ((cd->operation == svn_wc_operation_update
2130- || cd->operation == svn_wc_operation_switch) &&
2131- cd->reason == svn_wc_conflict_reason_moved_away &&
2132- cd->action == svn_wc_conflict_action_edit)
2140+ if ((cd->operation == svn_wc_operation_update || cd->operation == svn_wc_operation_switch) &&
2141+ cd->reason == svn_wc_conflict_reason_moved_away &&
2142+ cd->action == svn_wc_conflict_action_edit)
21332143 {
2134- /* local move vs. incoming edit -> update move */
2135- return svn_wc_conflict_choose_mine_conflict;
2144+ /* local move vs. incoming edit -> update move */
2145+ return svn_wc_conflict_choose_mine_conflict;
21362146 }
21372147
2138- return svn_wc_conflict_choose_unspecified;
2148+ return svn_wc_conflict_choose_unspecified;
21392149 }
21402150
2141-svn_error_t* SVN::cancel(void *baton)
2151+svn_error_t* SVN::cancel(void* baton)
21422152 {
2143- SVN * svn = (SVN *)baton;
2144- if ((svn->Cancel())||((svn->m_pProgressDlg)&&(svn->m_pProgressDlg->HasUserCancelled())))
2153+ SVN* svn = (SVN*)baton;
2154+ if ((svn->Cancel()) || ((svn->m_pProgressDlg) && (svn->m_pProgressDlg->HasUserCancelled())))
21452155 {
21462156 CString message(MAKEINTRESOURCE(IDS_SVN_USERCANCELLED));
21472157 return svn_error_create(SVN_ERR_CANCELLED, NULL, CUnicodeUtils::GetUTF8(message));
@@ -2154,33 +2164,33 @@
21542164 if (Cancel() || ((m_pProgressDlg != NULL) && (m_pProgressDlg->HasUserCancelled())))
21552165 {
21562166 CString message(MAKEINTRESOURCE(IDS_SVN_USERCANCELLED));
2157- throw SVNError (SVN_ERR_CANCELLED, CUnicodeUtils::GetUTF8(message));
2167+ throw SVNError(SVN_ERR_CANCELLED, CUnicodeUtils::GetUTF8(message));
21582168 }
21592169 }
21602170
2161-void * SVN::logMessage (CString message, char * baseDirectory)
2171+void* SVN::logMessage(CString message, char* baseDirectory)
21622172 {
21632173 message.Remove('\r');
21642174
2165- log_msg_baton3* baton = (log_msg_baton3 *) apr_palloc (m_pool, sizeof (*baton));
2166- baton->message = apr_pstrdup(m_pool, (LPCSTR)CUnicodeUtils::GetUTF8(message));
2167- baton->base_dir = baseDirectory ? baseDirectory : "";
2175+ log_msg_baton3* baton = (log_msg_baton3*)apr_palloc(m_pool, sizeof(*baton));
2176+ baton->message = apr_pstrdup(m_pool, (LPCSTR)CUnicodeUtils::GetUTF8(message));
2177+ baton->base_dir = baseDirectory ? baseDirectory : "";
21682178
21692179 baton->message_encoding = NULL;
2170- baton->tmpfile_left = NULL;
2171- baton->pool = m_pool;
2180+ baton->tmpfile_left = NULL;
2181+ baton->pool = m_pool;
21722182
21732183 return baton;
21742184 }
21752185
2176-void SVN::PathToUrl(CString &path)
2186+void SVN::PathToUrl(CString& path)
21772187 {
21782188 bool bUNC = false;
21792189 path.Trim();
2180- if (path.Left(2).Compare(L"\\\\")==0)
2190+ if (path.Left(2).Compare(L"\\\\") == 0)
21812191 bUNC = true;
21822192 // convert \ to /
2183- path.Replace('\\','/');
2193+ path.Replace('\\', '/');
21842194 path.TrimLeft('/');
21852195 // prepend file://
21862196 if (bUNC)
@@ -2187,10 +2197,10 @@
21872197 path.Insert(0, L"file://");
21882198 else
21892199 path.Insert(0, L"file:///");
2190- path.TrimRight(L"/\\"); //remove trailing slashes
2200+ path.TrimRight(L"/\\"); //remove trailing slashes
21912201 }
21922202
2193-void SVN::UrlToPath(CString &url)
2203+void SVN::UrlToPath(CString& url)
21942204 {
21952205 // we have to convert paths like file:///c:/myfolder
21962206 // to c:/myfolder
@@ -2197,14 +2207,14 @@
21972207 // and paths like file:////mymachine/c/myfolder
21982208 // to //mymachine/c/myfolder
21992209 url.Trim();
2200- url.Replace('\\','/');
2201- url = url.Mid(7); // "file://" has seven chars
2210+ url.Replace('\\', '/');
2211+ url = url.Mid(7); // "file://" has seven chars
22022212 url.TrimLeft('/');
22032213 // if we have a ':' that means the file:// url points to an absolute path
22042214 // like file:///D:/Development/test
22052215 // if we don't have a ':' we assume it points to an UNC path, and those
22062216 // actually _need_ the slashes before the paths
2207- if ((url.Find(':')<0) && (url.Find('|')<0))
2217+ if ((url.Find(':') < 0) && (url.Find('|') < 0))
22082218 url.Insert(0, L"\\\\");
22092219 SVN::preparePath(url);
22102220 // now we need to unescape the url
@@ -2211,37 +2221,37 @@
22112221 url = CPathUtils::PathUnescape(url);
22122222 }
22132223
2214-void SVN::preparePath(CString &path)
2224+void SVN::preparePath(CString& path)
22152225 {
22162226 path.Trim();
2217- path.TrimRight(L"/\\"); //remove trailing slashes
2218- path.Replace('\\','/');
2227+ path.TrimRight(L"/\\"); //remove trailing slashes
2228+ path.Replace('\\', '/');
22192229
2220- if (path.Left(10).CompareNoCase(L"file://///")==0)
2230+ if (path.Left(10).CompareNoCase(L"file://///") == 0)
22212231 {
2222- if (path.Find('%')<0)
2232+ if (path.Find('%') < 0)
22232233 path.Replace(L"file://///", L"file://");
22242234 else
22252235 path.Replace(L"file://///", L"file:////");
22262236 }
2227- else if (path.Left(9).CompareNoCase(L"file:////")==0)
2237+ else if (path.Left(9).CompareNoCase(L"file:////") == 0)
22282238 {
2229- if (path.Find('%')<0)
2239+ if (path.Find('%') < 0)
22302240 path.Replace(L"file:////", L"file://");
22312241 }
22322242 }
22332243
2234-svn_error_t* svn_cl__get_log_message(const char **log_msg,
2235- const char **tmp_file,
2236- const apr_array_header_t * /*commit_items*/,
2237- void *baton,
2238- apr_pool_t * pool)
2244+svn_error_t* svn_cl__get_log_message(const char** log_msg,
2245+ const char** tmp_file,
2246+ const apr_array_header_t* /*commit_items*/,
2247+ void* baton,
2248+ apr_pool_t* pool)
22392249 {
2240- log_msg_baton3 *lmb = (log_msg_baton3 *) baton;
2241- *tmp_file = NULL;
2250+ log_msg_baton3* lmb = (log_msg_baton3*)baton;
2251+ *tmp_file = NULL;
22422252 if (lmb->message)
22432253 {
2244- *log_msg = apr_pstrdup (pool, lmb->message);
2254+ *log_msg = apr_pstrdup(pool, lmb->message);
22452255 }
22462256
22472257 return SVN_NO_ERROR;
@@ -2249,15 +2259,15 @@
22492259
22502260 CString SVN::GetURLFromPath(const CTSVNPath& path)
22512261 {
2252- const char * URL;
2262+ const char* URL;
22532263 if (path.IsUrl())
22542264 return path.GetSVNPathString();
22552265 Prepare();
22562266 SVNPool subpool(m_pool);
2257- Err = svn_client_url_from_path2 (&URL, path.GetSVNApiPath(subpool), m_pctx, subpool, subpool);
2267+ Err = svn_client_url_from_path2(&URL, path.GetSVNApiPath(subpool), m_pctx, subpool, subpool);
22582268 if (Err)
22592269 return L"";
2260- if (URL==NULL)
2270+ if (URL == NULL)
22612271 return L"";
22622272 return CString(URL);
22632273 }
@@ -2264,18 +2274,17 @@
22642274
22652275 CTSVNPath SVN::GetWCRootFromPath(const CTSVNPath& path)
22662276 {
2267- const char * wcroot = NULL;
2277+ const char* wcroot = NULL;
22682278 Prepare();
2269- SVNPool subpool(m_pool);
2279+ SVNPool subpool(m_pool);
22702280 const char* svnPath = path.GetSVNApiPath(subpool);
2271- if ((svnPath==nullptr) || svn_path_is_url(svnPath) || (svnPath[0]==0))
2281+ if ((svnPath == nullptr) || svn_path_is_url(svnPath) || (svnPath[0] == 0))
22722282 return CTSVNPath();
2273- SVNTRACE (
2274- Err = svn_client_get_wc_root (&wcroot, svnPath, m_pctx, subpool, subpool),
2275- svnPath
2276- )
2283+ SVNTRACE(
2284+ Err = svn_client_get_wc_root(&wcroot, svnPath, m_pctx, subpool, subpool),
2285+ svnPath)
22772286
2278- if (Err)
2287+ if (Err)
22792288 return CTSVNPath();
22802289 if (wcroot == NULL)
22812290 return CTSVNPath();
@@ -2292,7 +2301,7 @@
22922301 const char* svnPath = url.GetSVNApiPath(subpool);
22932302 CHooks::Instance().PreConnect(CTSVNPathList(url));
22942303
2295- SVNTRACE (
2304+ SVNTRACE(
22962305 Err = svn_client_list4(svnPath,
22972306 pegrev,
22982307 revision,
@@ -2305,8 +2314,7 @@
23052314 this,
23062315 m_pctx,
23072316 subpool),
2308- svnPath
2309- )
2317+ svnPath)
23102318 ClearCAPIAuthCacheOnError();
23112319 return (Err == NULL);
23122320 }
@@ -2321,15 +2329,14 @@
23212329
23222330 const char* svnPath = path.GetSVNApiPath(subpool);
23232331 CHooks::Instance().PreConnect(CTSVNPathList(path));
2324- SVNTRACE (
2332+ SVNTRACE(
23252333 Err = svn_client_relocate2(
2326- svnPath,
2327- from.GetSVNApiPath(subpool),
2328- to.GetSVNApiPath(subpool),
2329- !includeexternals,
2330- m_pctx, subpool),
2331- svnPath
2332- );
2334+ svnPath,
2335+ from.GetSVNApiPath(subpool),
2336+ to.GetSVNApiPath(subpool),
2337+ !includeexternals,
2338+ m_pctx, subpool),
2339+ svnPath);
23332340
23342341 ClearCAPIAuthCacheOnError();
23352342 if (Err == NULL)
@@ -2346,12 +2353,12 @@
23462353 SVNPool subPool(m_pool);
23472354
23482355 // The URL we get here is per definition properly encoded and escaped.
2349- const char * rootPath = svn_repos_find_root_path(path.GetSVNApiPath(subPool), subPool);
2356+ const char* rootPath = svn_repos_find_root_path(path.GetSVNApiPath(subPool), subPool);
23502357 if (rootPath)
23512358 {
23522359 svn_repos_t* pRepos = NULL;
2353- Err = svn_repos_open3 (&pRepos, rootPath, NULL, subPool, subPool);
2354- if ((Err)&&(Err->apr_err == SVN_ERR_FS_BERKELEY_DB))
2360+ Err = svn_repos_open3(&pRepos, rootPath, NULL, subPool, subPool);
2361+ if ((Err) && (Err->apr_err == SVN_ERR_FS_BERKELEY_DB))
23552362 return true;
23562363 if (Err == NULL)
23572364 return true;
@@ -2363,10 +2370,10 @@
23632370 CString SVN::GetRepositoryRootAndUUID(const CTSVNPath& path, bool useLogCache, CString& sUUID)
23642371 {
23652372 if (useLogCache && IsLogCacheEnabled())
2366- return GetLogCachePool()->GetRepositoryInfo().GetRepositoryRootAndUUID (path, sUUID);
2373+ return GetLogCachePool()->GetRepositoryInfo().GetRepositoryRootAndUUID(path, sUUID);
23672374
2368- const char * returl = nullptr;
2369- const char * uuid = nullptr;
2375+ const char* returl = nullptr;
2376+ const char* uuid = nullptr;
23702377
23712378 SVNPool localpool(m_pool);
23722379 Prepare();
@@ -2378,11 +2385,10 @@
23782385 CHooks::Instance().PreConnect(CTSVNPathList(path));
23792386
23802387 // make sure the url is canonical.
2381- const char * goodurl = path.GetSVNApiPath(localpool);
2382- SVNTRACE (
2388+ const char* goodurl = path.GetSVNApiPath(localpool);
2389+ SVNTRACE(
23832390 Err = svn_client_get_repos_root(&returl, &uuid, goodurl, m_pctx, localpool, localpool),
2384- goodurl
2385- );
2391+ goodurl);
23862392 ClearCAPIAuthCacheOnError();
23872393 if (Err == NULL)
23882394 {
@@ -2392,15 +2398,13 @@
23922398 return CString(returl);
23932399 }
23942400
2395-
2396-CString SVN::GetRepositoryRoot( const CTSVNPath& url )
2401+CString SVN::GetRepositoryRoot(const CTSVNPath& url)
23972402 {
23982403 CString sUUID;
23992404 return GetRepositoryRootAndUUID(url, true, sUUID);
24002405 }
24012406
2402-
2403-CString SVN::GetUUIDFromPath( const CTSVNPath& path )
2407+CString SVN::GetUUIDFromPath(const CTSVNPath& path)
24042408 {
24052409 CString sUUID;
24062410 GetRepositoryRootAndUUID(path, true, sUUID);
@@ -2409,21 +2413,20 @@
24092413
24102414 svn_revnum_t SVN::GetHEADRevision(const CTSVNPath& path, bool cacheAllowed)
24112415 {
2412- svn_ra_session_t *ra_session;
2413- const char * urla;
2414- svn_revnum_t rev = -1;
2416+ svn_ra_session_t* ra_session;
2417+ const char* urla;
2418+ svn_revnum_t rev = -1;
24152419
24162420 SVNPool localpool(m_pool);
24172421 Prepare();
24182422
24192423 // make sure the url is canonical.
2420- const char * svnPath = path.GetSVNApiPath(localpool);
2424+ const char* svnPath = path.GetSVNApiPath(localpool);
24212425 if (!path.IsUrl())
24222426 {
2423- SVNTRACE (
2424- Err = svn_client_url_from_path2 (&urla, svnPath, m_pctx, localpool, localpool),
2425- svnPath
2426- );
2427+ SVNTRACE(
2428+ Err = svn_client_url_from_path2(&urla, svnPath, m_pctx, localpool, localpool),
2429+ svnPath);
24272430 }
24282431 else
24292432 {
@@ -2440,11 +2443,11 @@
24402443 // (missing entries will be added automatically)
24412444
24422445 CTSVNPath canonicalURL;
2443- canonicalURL.SetFromSVN (urla);
2446+ canonicalURL.SetFromSVN(urla);
24442447
24452448 CRepositoryInfo& cachedProperties = GetLogCachePool()->GetRepositoryInfo();
2446- CString uuid = cachedProperties.GetRepositoryUUID (canonicalURL);
2447- return cachedProperties.GetHeadRevision (uuid, canonicalURL);
2449+ CString uuid = cachedProperties.GetRepositoryUUID(canonicalURL);
2450+ return cachedProperties.GetHeadRevision(uuid, canonicalURL);
24482451 }
24492452 else
24502453 {
@@ -2452,18 +2455,16 @@
24522455
24532456 CHooks::Instance().PreConnect(CTSVNPathList(path));
24542457 /* use subpool to create a temporary RA session */
2455- SVNTRACE (
2456- Err = svn_client_open_ra_session2 (&ra_session, urla, path.IsUrl() ? NULL : svnPath, m_pctx, localpool, localpool),
2457- urla
2458- );
2458+ SVNTRACE(
2459+ Err = svn_client_open_ra_session2(&ra_session, urla, path.IsUrl() ? NULL : svnPath, m_pctx, localpool, localpool),
2460+ urla);
24592461 ClearCAPIAuthCacheOnError();
24602462 if (Err)
24612463 return -1;
24622464
2463- SVNTRACE (
2465+ SVNTRACE(
24642466 Err = svn_ra_get_latest_revnum(ra_session, &rev, localpool),
2465- urla
2466- );
2467+ urla);
24672468 ClearCAPIAuthCacheOnError();
24682469 if (Err)
24692470 return -1;
@@ -2473,21 +2474,20 @@
24732474
24742475 bool SVN::GetRootAndHead(const CTSVNPath& path, CTSVNPath& url, svn_revnum_t& rev)
24752476 {
2476- svn_ra_session_t *ra_session;
2477- const char * urla;
2478- const char * returl;
2477+ svn_ra_session_t* ra_session;
2478+ const char* urla;
2479+ const char* returl;
24792480
24802481 SVNPool localpool(m_pool);
24812482 Prepare();
24822483
24832484 // make sure the url is canonical.
2484- const char * svnPath = path.GetSVNApiPath(localpool);
2485+ const char* svnPath = path.GetSVNApiPath(localpool);
24852486 if (!path.IsUrl())
24862487 {
2487- SVNTRACE (
2488- Err = svn_client_url_from_path2 (&urla, svnPath, m_pctx, localpool, localpool),
2489- svnPath
2490- );
2488+ SVNTRACE(
2489+ Err = svn_client_url_from_path2(&urla, svnPath, m_pctx, localpool, localpool),
2490+ svnPath);
24912491 }
24922492 else
24932493 {
@@ -2505,30 +2505,28 @@
25052505 // (missing entries will be added automatically)
25062506
25072507 CRepositoryInfo& cachedProperties = GetLogCachePool()->GetRepositoryInfo();
2508- CString uuid;
2509- url.SetFromSVN (cachedProperties.GetRepositoryRootAndUUID (path, uuid));
2508+ CString uuid;
2509+ url.SetFromSVN(cachedProperties.GetRepositoryRootAndUUID(path, uuid));
25102510 if (url.IsEmpty())
25112511 {
2512- assert (Err != NULL);
2512+ assert(Err != NULL);
25132513 }
25142514 else
25152515 {
2516- rev = cachedProperties.GetHeadRevision (uuid, path);
2516+ rev = cachedProperties.GetHeadRevision(uuid, path);
25172517 if ((rev == NO_REVISION) && (Err == NULL))
25182518 {
25192519 CHooks::Instance().PreConnect(CTSVNPathList(path));
2520- SVNTRACE (
2521- Err = svn_client_open_ra_session2 (&ra_session, urla, path.IsUrl() ? NULL : svnPath, m_pctx, localpool, localpool),
2522- urla
2523- );
2520+ SVNTRACE(
2521+ Err = svn_client_open_ra_session2(&ra_session, urla, path.IsUrl() ? NULL : svnPath, m_pctx, localpool, localpool),
2522+ urla);
25242523 ClearCAPIAuthCacheOnError();
25252524 if (Err)
25262525 return false;
25272526
2528- SVNTRACE (
2527+ SVNTRACE(
25292528 Err = svn_ra_get_latest_revnum(ra_session, &rev, localpool),
2530- urla
2531- );
2529+ urla);
25322530 ClearCAPIAuthCacheOnError();
25332531 if (Err)
25342532 return false;
@@ -2544,26 +2542,23 @@
25442542 CHooks::Instance().PreConnect(CTSVNPathList(path));
25452543 /* use subpool to create a temporary RA session */
25462544
2547- SVNTRACE (
2548- Err = svn_client_open_ra_session2 (&ra_session, urla, path.IsUrl() ? NULL : svnPath, m_pctx, localpool, localpool),
2549- urla
2550- );
2545+ SVNTRACE(
2546+ Err = svn_client_open_ra_session2(&ra_session, urla, path.IsUrl() ? NULL : svnPath, m_pctx, localpool, localpool),
2547+ urla);
25512548 ClearCAPIAuthCacheOnError();
25522549 if (Err)
25532550 return FALSE;
25542551
2555- SVNTRACE (
2552+ SVNTRACE(
25562553 Err = svn_ra_get_latest_revnum(ra_session, &rev, localpool),
2557- urla
2558- );
2554+ urla);
25592555 ClearCAPIAuthCacheOnError();
25602556 if (Err)
25612557 return FALSE;
25622558
2563- SVNTRACE (
2559+ SVNTRACE(
25642560 Err = svn_ra_get_repos_root2(ra_session, &returl, localpool),
2565- urla
2566- );
2561+ urla);
25672562 ClearCAPIAuthCacheOnError();
25682563 if (Err)
25692564 return FALSE;
@@ -2574,36 +2569,34 @@
25742569 return true;
25752570 }
25762571
2577-bool SVN::GetLocks(const CTSVNPath& url, std::map<CString, SVNLock> * locks)
2572+bool SVN::GetLocks(const CTSVNPath& url, std::map<CString, SVNLock>* locks)
25782573 {
2579- svn_ra_session_t *ra_session;
2574+ svn_ra_session_t* ra_session;
25802575
25812576 SVNPool localpool(m_pool);
25822577 Prepare();
25832578
2584- apr_hash_t * hash = apr_hash_make(localpool);
2579+ apr_hash_t* hash = apr_hash_make(localpool);
25852580
25862581 /* use subpool to create a temporary RA session */
25872582 const char* svnPath = url.GetSVNApiPath(localpool);
25882583 CHooks::Instance().PreConnect(CTSVNPathList(url));
2589- SVNTRACE (
2590- Err = svn_client_open_ra_session2 (&ra_session, svnPath, NULL, m_pctx, localpool, localpool),
2591- svnPath
2592- );
2584+ SVNTRACE(
2585+ Err = svn_client_open_ra_session2(&ra_session, svnPath, NULL, m_pctx, localpool, localpool),
2586+ svnPath);
25932587 ClearCAPIAuthCacheOnError();
25942588 if (Err != NULL)
25952589 return false;
25962590
2597- SVNTRACE (
2591+ SVNTRACE(
25982592 Err = svn_ra_get_locks2(ra_session, &hash, "", svn_depth_infinity, localpool),
2599- svnPath
2600- )
2593+ svnPath)
26012594 ClearCAPIAuthCacheOnError();
26022595 if (Err != NULL)
26032596 return false;
2604- apr_hash_index_t *hi;
2605- svn_lock_t* val;
2606- const char* key;
2597+ apr_hash_index_t* hi;
2598+ svn_lock_t* val;
2599+ const char* key;
26072600 for (hi = apr_hash_first(localpool, hash); hi; hi = apr_hash_next(hi))
26082601 {
26092602 apr_hash_this(hi, (const void**)&key, NULL, (void**)&val);
@@ -2610,14 +2603,14 @@
26102603 if (val)
26112604 {
26122605 SVNLock lock;
2613- lock.comment = CUnicodeUtils::GetUnicode(val->comment);
2614- lock.creation_date = val->creation_date/1000000L;
2615- lock.expiration_date = val->expiration_date/1000000L;
2616- lock.owner = CUnicodeUtils::GetUnicode(val->owner);
2617- lock.path = CUnicodeUtils::GetUnicode(val->path);
2618- lock.token = CUnicodeUtils::GetUnicode(val->token);
2619- CString sKey = CUnicodeUtils::GetUnicode(key);
2620- (*locks)[sKey] = lock;
2606+ lock.comment = CUnicodeUtils::GetUnicode(val->comment);
2607+ lock.creation_date = val->creation_date / 1000000L;
2608+ lock.expiration_date = val->expiration_date / 1000000L;
2609+ lock.owner = CUnicodeUtils::GetUnicode(val->owner);
2610+ lock.path = CUnicodeUtils::GetUnicode(val->path);
2611+ lock.token = CUnicodeUtils::GetUnicode(val->token);
2612+ CString sKey = CUnicodeUtils::GetUnicode(key);
2613+ (*locks)[sKey] = lock;
26212614 }
26222615 }
26232616 return true;
@@ -2628,41 +2621,38 @@
26282621 SVNPool localpool(m_pool);
26292622 Prepare();
26302623
2631- svn_wc_revision_status_t * revstatus = NULL;
2632- const char* svnPath = wcpath.GetSVNApiPath(localpool);
2633- SVNTRACE (
2624+ svn_wc_revision_status_t* revstatus = NULL;
2625+ const char* svnPath = wcpath.GetSVNApiPath(localpool);
2626+ SVNTRACE(
26342627 Err = svn_wc_revision_status2(&revstatus, m_pctx->wc_ctx, svnPath, NULL, bCommitted, SVN::cancel, this, localpool, localpool),
2635- svnPath
2636- )
2628+ svnPath)
26372629
2638- if ((Err)||(revstatus == NULL))
2630+ if ((Err) || (revstatus == NULL))
26392631 {
2640- minrev = 0;
2641- maxrev = 0;
2632+ minrev = 0;
2633+ maxrev = 0;
26422634 switched = false;
26432635 modified = false;
2644- sparse = false;
2636+ sparse = false;
26452637 return false;
26462638 }
2647- minrev = revstatus->min_rev;
2648- maxrev = revstatus->max_rev;
2639+ minrev = revstatus->min_rev;
2640+ maxrev = revstatus->max_rev;
26492641 switched = !!revstatus->switched;
26502642 modified = !!revstatus->modified;
2651- sparse = !!revstatus->sparse_checkout;
2643+ sparse = !!revstatus->sparse_checkout;
26522644 return true;
26532645 }
26542646
2655-
2656-bool SVN::GetWCMinMaxRevs( const CTSVNPath& wcpath, bool committed, svn_revnum_t& minrev, svn_revnum_t& maxrev )
2647+bool SVN::GetWCMinMaxRevs(const CTSVNPath& wcpath, bool committed, svn_revnum_t& minrev, svn_revnum_t& maxrev)
26572648 {
26582649 SVNPool localpool(m_pool);
26592650 Prepare();
26602651
26612652 const char* svnPath = wcpath.GetSVNApiPath(localpool);
2662- SVNTRACE (
2663- Err = svn_client_min_max_revisions (&minrev, &maxrev, svnPath, committed, m_pctx, localpool),
2664- svnPath
2665- )
2653+ SVNTRACE(
2654+ Err = svn_client_min_max_revisions(&minrev, &maxrev, svnPath, committed, m_pctx, localpool),
2655+ svnPath)
26662656
26672657 return (Err == NULL);
26682658 }
@@ -2672,7 +2662,7 @@
26722662 SVNPool localpool(m_pool);
26732663 Prepare();
26742664
2675- Err = svn_client_upgrade (wcpath.GetSVNApiPath(localpool), m_pctx, localpool);
2665+ Err = svn_client_upgrade(wcpath.GetSVNApiPath(localpool), m_pctx, localpool);
26762666
26772667 return (Err == NULL);
26782668 }
@@ -2679,9 +2669,9 @@
26792669
26802670 svn_revnum_t SVN::RevPropertySet(const CString& sName, const CString& sValue, const CString& sOldValue, const CTSVNPath& URL, const SVNRev& rev)
26812671 {
2682- svn_revnum_t set_rev;
2683- svn_string_t* pval = NULL;
2684- svn_string_t* pval2 = NULL;
2672+ svn_revnum_t set_rev;
2673+ svn_string_t* pval = NULL;
2674+ svn_string_t* pval2 = NULL;
26852675 Prepare();
26862676
26872677 CStringA sValueA = CUnicodeUtils::GetUTF8(sValue);
@@ -2689,22 +2679,21 @@
26892679 SVNPool subpool(m_pool);
26902680 pval = svn_string_create(sValueA, subpool);
26912681 if (!sOldValue.IsEmpty())
2692- pval2 = svn_string_create (CUnicodeUtils::GetUTF8(sOldValue), subpool);
2682+ pval2 = svn_string_create(CUnicodeUtils::GetUTF8(sOldValue), subpool);
26932683
26942684 const char* svnPath = URL.GetSVNApiPath(subpool);
26952685 CHooks::Instance().PreConnect(CTSVNPathList(URL));
2696- SVNTRACE (
2686+ SVNTRACE(
26972687 Err = svn_client_revprop_set2(CUnicodeUtils::GetUTF8(sName),
2698- pval,
2699- pval2,
2700- svnPath,
2701- rev,
2702- &set_rev,
2703- FALSE,
2704- m_pctx,
2705- subpool),
2706- svnPath
2707- );
2688+ pval,
2689+ pval2,
2690+ svnPath,
2691+ rev,
2692+ &set_rev,
2693+ FALSE,
2694+ m_pctx,
2695+ subpool),
2696+ svnPath);
27082697 ClearCAPIAuthCacheOnError();
27092698 if (Err)
27102699 return 0;
@@ -2713,21 +2702,20 @@
27132702
27142703 CString SVN::RevPropertyGet(const CString& sName, const CTSVNPath& URL, const SVNRev& rev)
27152704 {
2716- svn_string_t *propval;
2717- svn_revnum_t set_rev;
2705+ svn_string_t* propval;
2706+ svn_revnum_t set_rev;
27182707 Prepare();
27192708
2720- SVNPool subpool(m_pool);
2709+ SVNPool subpool(m_pool);
27212710 const char* svnPath = URL.GetSVNApiPath(subpool);
27222711 CHooks::Instance().PreConnect(CTSVNPathList(URL));
2723- SVNTRACE (
2712+ SVNTRACE(
27242713 Err = svn_client_revprop_get(CUnicodeUtils::GetUTF8(sName), &propval, svnPath, rev, &set_rev, m_pctx, subpool),
2725- svnPath
2726- );
2714+ svnPath);
27272715 ClearCAPIAuthCacheOnError();
27282716 if (Err)
27292717 return L"";
2730- if (propval==NULL)
2718+ if (propval == NULL)
27312719 return L"";
27322720 if (propval->len == 0)
27332721 return L"";
@@ -2736,14 +2724,14 @@
27362724
27372725 CTSVNPath SVN::GetPristinePath(const CTSVNPath& wcPath)
27382726 {
2739- svn_error_t * err;
2740- SVNPool localpool;
2727+ svn_error_t* err;
2728+ SVNPool localpool;
27412729
27422730 const char* pristinePath = NULL;
2743- CTSVNPath returnPath;
2731+ CTSVNPath returnPath;
27442732
27452733 #pragma warning(push)
2746-#pragma warning(disable: 4996) // deprecated warning
2734+#pragma warning(disable : 4996) // deprecated warning
27472735 // note: the 'new' function would be svn_wc_get_pristine_contents(), but that
27482736 // function returns a stream instead of a path. Since we don't need a stream
27492737 // but really a path here, that function is of no use and would require us
@@ -2786,26 +2774,24 @@
27862774
27872775 void SVN::formatDate(TCHAR date_native[], FILETIME& filetime, bool force_short_fmt)
27882776 {
2789- enum {CACHE_SIZE = 16};
2777+ enum
2778+ {
2779+ CACHE_SIZE = 16
2780+ };
27902781 static async::CCriticalSection mutex;
2791- static FILETIME lastTime[CACHE_SIZE] = { {0, 0}, {0, 0}, {0, 0}, {0, 0}
2792- , {0, 0}, {0, 0}, {0, 0}, {0, 0}
2793- , {0, 0}, {0, 0}, {0, 0}, {0, 0}
2794- , {0, 0}, {0, 0}, {0, 0}, {0, 0} };
2795- static TCHAR lastResult[CACHE_SIZE][SVN_DATE_BUFFER];
2796- static bool formats[CACHE_SIZE];
2782+ static FILETIME lastTime[CACHE_SIZE] = {{0, 0}, {0, 0}, {0, 0}, {0, 0}, {0, 0}, {0, 0}, {0, 0}, {0, 0}, {0, 0}, {0, 0}, {0, 0}, {0, 0}, {0, 0}, {0, 0}, {0, 0}, {0, 0}};
2783+ static TCHAR lastResult[CACHE_SIZE][SVN_DATE_BUFFER];
2784+ static bool formats[CACHE_SIZE];
27972785
27982786 // we have to serialize access to the cache
27992787
2800- async::CCriticalSectionLock lock (mutex);
2788+ async::CCriticalSectionLock lock(mutex);
28012789
28022790 // cache lookup
28032791
28042792 TCHAR* result = NULL;
28052793 for (size_t i = 0; i < CACHE_SIZE; ++i)
2806- if ( (lastTime[i].dwHighDateTime == filetime.dwHighDateTime)
2807- && (lastTime[i].dwLowDateTime == filetime.dwLowDateTime)
2808- && (formats[i] == force_short_fmt))
2794+ if ((lastTime[i].dwHighDateTime == filetime.dwHighDateTime) && (lastTime[i].dwLowDateTime == filetime.dwLowDateTime) && (formats[i] == force_short_fmt))
28092795 {
28102796 result = lastResult[i];
28112797 break;
@@ -2818,9 +2804,9 @@
28182804 // evict an entry from the cache
28192805
28202806 static size_t victim = 0;
2821- lastTime[victim] = filetime;
2822- result = lastResult[victim];
2823- formats[victim] = force_short_fmt;
2807+ lastTime[victim] = filetime;
2808+ result = lastResult[victim];
2809+ formats[victim] = force_short_fmt;
28242810 if (++victim == CACHE_SIZE)
28252811 victim = 0;
28262812
@@ -2828,14 +2814,14 @@
28282814
28292815 // Convert UTC to local time
28302816 SYSTEMTIME systemtime;
2831- VERIFY ( FileTimeToSystemTime(&filetime,&systemtime) );
2817+ VERIFY(FileTimeToSystemTime(&filetime, &systemtime));
28322818
28332819 static TIME_ZONE_INFORMATION timeZone = {-1};
28342820 if (timeZone.Bias == -1)
2835- GetTimeZoneInformation (&timeZone);
2821+ GetTimeZoneInformation(&timeZone);
28362822
28372823 SYSTEMTIME localsystime;
2838- VERIFY ( SystemTimeToTzSpecificLocalTime(&timeZone, &systemtime,&localsystime));
2824+ VERIFY(SystemTimeToTzSpecificLocalTime(&timeZone, &systemtime, &localsystime));
28392825
28402826 TCHAR timebuf[SVN_DATE_BUFFER] = {0};
28412827 TCHAR datebuf[SVN_DATE_BUFFER] = {0};
@@ -2844,10 +2830,10 @@
28442830
28452831 /// reusing this instance is vital for \ref formatDate performance
28462832
2847- static CRegDWORD logDateFormat (500, L"Software\\TortoiseSVN\\LogDateFormat");
2848- DWORD flags = force_short_fmt || (logDateFormat == 1)
2849- ? DATE_SHORTDATE
2850- : DATE_LONGDATE;
2833+ static CRegDWORD logDateFormat(500, L"Software\\TortoiseSVN\\LogDateFormat");
2834+ DWORD flags = force_short_fmt || (logDateFormat == 1)
2835+ ? DATE_SHORTDATE
2836+ : DATE_LONGDATE;
28512837
28522838 GetDateFormat(locale, flags, &localsystime, NULL, datebuf, SVN_DATE_BUFFER);
28532839 GetTimeFormat(locale, 0, &localsystime, NULL, timebuf, SVN_DATE_BUFFER);
@@ -2861,7 +2847,7 @@
28612847 wcsncpy_s(date_native, SVN_DATE_BUFFER, result, SVN_DATE_BUFFER - 1);
28622848 }
28632849
2864-bool SVN::AprTimeExplodeLocal(apr_time_exp_t *exploded_time, apr_time_t date_svn)
2850+bool SVN::AprTimeExplodeLocal(apr_time_exp_t* exploded_time, apr_time_t date_svn)
28652851 {
28662852 // apr_time_exp_lt() can crash because it does not check the return values of APIs it calls.
28672853 // Put the call to apr_time_exp_lt() in a __try/__except to avoid those crashes.
@@ -2869,7 +2855,7 @@
28692855 {
28702856 return apr_time_exp_lt(exploded_time, date_svn) == APR_SUCCESS;
28712857 }
2872- __except(TRUE)
2858+ __except (TRUE)
28732859 {
28742860 return false;
28752861 }
@@ -2884,8 +2870,8 @@
28842870 {
28852871 apr_time_exp_t exploded_time = {0};
28862872
2887- SYSTEMTIME systime = {0,0,0,0,0,0,0,0};
2888- TCHAR datebuf[SVN_DATE_BUFFER] = {0};
2873+ SYSTEMTIME systime = {0, 0, 0, 0, 0, 0, 0, 0};
2874+ TCHAR datebuf[SVN_DATE_BUFFER] = {0};
28892875
28902876 LCID locale = s_useSystemLocale ? MAKELCID(MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT), SORT_DEFAULT) : s_locale;
28912877
@@ -2892,10 +2878,10 @@
28922878 if (!AprTimeExplodeLocal(&exploded_time, date_svn))
28932879 return L"(no date)";
28942880
2895- systime.wDay = (WORD)exploded_time.tm_mday;
2881+ systime.wDay = (WORD)exploded_time.tm_mday;
28962882 systime.wDayOfWeek = (WORD)exploded_time.tm_wday;
2897- systime.wMonth = (WORD)exploded_time.tm_mon+1;
2898- systime.wYear = (WORD)exploded_time.tm_year+1900;
2883+ systime.wMonth = (WORD)exploded_time.tm_mon + 1;
2884+ systime.wYear = (WORD)exploded_time.tm_year + 1900;
28992885
29002886 GetDateFormat(locale, DATE_SHORTDATE, &systime, NULL, datebuf, SVN_DATE_BUFFER);
29012887
@@ -2902,12 +2888,12 @@
29022888 return datebuf;
29032889 }
29042890
2905-CString SVN::formatTime (apr_time_t date_svn)
2891+CString SVN::formatTime(apr_time_t date_svn)
29062892 {
29072893 apr_time_exp_t exploded_time = {0};
29082894
2909- SYSTEMTIME systime = {0,0,0,0,0,0,0,0};
2910- TCHAR timebuf[SVN_DATE_BUFFER] = {0};
2895+ SYSTEMTIME systime = {0, 0, 0, 0, 0, 0, 0, 0};
2896+ TCHAR timebuf[SVN_DATE_BUFFER] = {0};
29112897
29122898 LCID locale = s_useSystemLocale ? MAKELCID(MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT), SORT_DEFAULT) : s_locale;
29132899
@@ -2914,14 +2900,14 @@
29142900 if (!AprTimeExplodeLocal(&exploded_time, date_svn))
29152901 return L"(no time)";
29162902
2917- systime.wDay = (WORD)exploded_time.tm_mday;
2918- systime.wDayOfWeek = (WORD)exploded_time.tm_wday;
2919- systime.wHour = (WORD)exploded_time.tm_hour;
2920- systime.wMilliseconds = (WORD)(exploded_time.tm_usec/1000);
2921- systime.wMinute = (WORD)exploded_time.tm_min;
2922- systime.wMonth = (WORD)exploded_time.tm_mon+1;
2923- systime.wSecond = (WORD)exploded_time.tm_sec;
2924- systime.wYear = (WORD)exploded_time.tm_year+1900;
2903+ systime.wDay = (WORD)exploded_time.tm_mday;
2904+ systime.wDayOfWeek = (WORD)exploded_time.tm_wday;
2905+ systime.wHour = (WORD)exploded_time.tm_hour;
2906+ systime.wMilliseconds = (WORD)(exploded_time.tm_usec / 1000);
2907+ systime.wMinute = (WORD)exploded_time.tm_min;
2908+ systime.wMonth = (WORD)exploded_time.tm_mon + 1;
2909+ systime.wSecond = (WORD)exploded_time.tm_sec;
2910+ systime.wYear = (WORD)exploded_time.tm_year + 1900;
29252911
29262912 GetTimeFormat(locale, 0, &systime, NULL, timebuf, SVN_DATE_BUFFER);
29272913
@@ -2934,11 +2920,9 @@
29342920 if (svn_path_is_url(UrlOrPath))
29352921 {
29362922 size_t length = UrlOrPath.GetLength();
2937- url = CUnicodeUtils::GetUnicode
2938- (CPathUtils::ContainsEscapedChars (UrlOrPath, length)
2939- ? CPathUtils::PathUnescape(UrlOrPath)
2940- : UrlOrPath
2941- );
2923+ url = CUnicodeUtils::GetUnicode(CPathUtils::ContainsEscapedChars(UrlOrPath, length)
2924+ ? CPathUtils::PathUnescape(UrlOrPath)
2925+ : UrlOrPath);
29422926 }
29432927 else
29442928 url = CUnicodeUtils::GetUnicode(UrlOrPath);
@@ -2948,12 +2932,12 @@
29482932
29492933 std::string SVN::MakeUIUrlOrPath(const char* UrlOrPath)
29502934 {
2951- if (!svn_path_is_url (UrlOrPath))
2935+ if (!svn_path_is_url(UrlOrPath))
29522936 return UrlOrPath;
29532937
29542938 std::string result = UrlOrPath;
2955- if (CPathUtils::ContainsEscapedChars (result.c_str(), result.length()))
2956- CPathUtils::Unescape (&result[0]);
2939+ if (CPathUtils::ContainsEscapedChars(result.c_str(), result.length()))
2940+ CPathUtils::Unescape(&result[0]);
29572941
29582942 return result;
29592943 }
@@ -2960,8 +2944,8 @@
29602944
29612945 bool SVN::EnsureConfigFile()
29622946 {
2963- svn_error_t * err;
2964- SVNPool localpool;
2947+ svn_error_t* err;
2948+ SVNPool localpool;
29652949 err = svn_config_ensure(NULL, localpool);
29662950 if (err)
29672951 {
@@ -3010,12 +2994,12 @@
30102994 // modifying the log cache is not thread safe.
30112995 // In particular, we must synchronize the loading & file check.
30122996
3013- async::CCriticalSectionLock lock (GetLogCachePoolMutex());
2997+ async::CCriticalSectionLock lock(GetLogCachePoolMutex());
30142998
30152999 if (logCachePool.get() == NULL)
30163000 {
30173001 CString cacheFolder = CPathUtils::GetAppDataDirectory() + L"logcache\\";
3018- logCachePool.reset (new LogCache::CLogCachePool (*this, cacheFolder));
3002+ logCachePool.reset(new LogCache::CLogCachePool(*this, cacheFolder));
30193003 }
30203004
30213005 return logCachePool.get();
@@ -3029,7 +3013,7 @@
30293013 // this should be called by the ~SVN only but we make sure that
30303014 // (illegal) concurrent access won't see zombie objects.
30313015
3032- async::CCriticalSectionLock lock (GetLogCachePoolMutex());
3016+ async::CCriticalSectionLock lock(GetLogCachePoolMutex());
30333017 if (logCachePool.get() != NULL)
30343018 logCachePool->Flush();
30353019
@@ -3059,24 +3043,24 @@
30593043 m_prompt.SetApp(pWinApp);
30603044 }
30613045
3062-apr_array_header_t * SVN::MakeCopyArray(const CTSVNPathList& pathList, const SVNRev& rev, const SVNRev& pegrev)
3046+apr_array_header_t* SVN::MakeCopyArray(const CTSVNPathList& pathList, const SVNRev& rev, const SVNRev& pegrev)
30633047 {
3064- apr_array_header_t * sources = apr_array_make(m_pool, pathList.GetCount(),
3065- sizeof(svn_client_copy_source_t *));
3048+ apr_array_header_t* sources = apr_array_make(m_pool, pathList.GetCount(),
3049+ sizeof(svn_client_copy_source_t*));
30663050
30673051 for (int nItem = 0; nItem < pathList.GetCount(); ++nItem)
30683052 {
3069- const char *target = apr_pstrdup (m_pool, pathList[nItem].GetSVNApiPath(m_pool));
3070- svn_client_copy_source_t *source = (svn_client_copy_source_t*)apr_palloc(m_pool, sizeof(*source));
3071- source->path = target;
3072- source->revision = rev;
3073- source->peg_revision = pegrev;
3074- APR_ARRAY_PUSH(sources, svn_client_copy_source_t *) = source;
3053+ const char* target = apr_pstrdup(m_pool, pathList[nItem].GetSVNApiPath(m_pool));
3054+ svn_client_copy_source_t* source = (svn_client_copy_source_t*)apr_palloc(m_pool, sizeof(*source));
3055+ source->path = target;
3056+ source->revision = rev;
3057+ source->peg_revision = pegrev;
3058+ APR_ARRAY_PUSH(sources, svn_client_copy_source_t*) = source;
30753059 }
30763060 return sources;
30773061 }
30783062
3079-apr_array_header_t * SVN::MakeChangeListArray(const CStringArray& changelists, apr_pool_t * pool)
3063+apr_array_header_t* SVN::MakeChangeListArray(const CStringArray& changelists, apr_pool_t* pool)
30803064 {
30813065 // passing NULL if there are no change lists will work only partially: the subversion library
30823066 // in that case executes the command, but fails to remove the existing change lists from the files
@@ -3085,10 +3069,10 @@
30853069 // change lists are removed properly.
30863070 int count = (int)changelists.GetCount();
30873071 // special case: the changelist array contains one empty string
3088- if ((changelists.GetCount() == 1)&&(changelists[0].IsEmpty()))
3072+ if ((changelists.GetCount() == 1) && (changelists[0].IsEmpty()))
30893073 count = 0;
30903074
3091- apr_array_header_t * arr = apr_array_make (pool, count, sizeof(const char *));
3075+ apr_array_header_t* arr = apr_array_make(pool, count, sizeof(const char*));
30923076
30933077 if (count == 0)
30943078 return arr;
@@ -3097,23 +3081,23 @@
30973081 {
30983082 for (int nItem = 0; nItem < changelists.GetCount(); nItem++)
30993083 {
3100- const char * c = apr_pstrdup(pool, (LPCSTR)CUnicodeUtils::GetUTF8(changelists[nItem]));
3101- (*((const char **) apr_array_push(arr))) = c;
3084+ const char* c = apr_pstrdup(pool, (LPCSTR)CUnicodeUtils::GetUTF8(changelists[nItem]));
3085+ (*((const char**)apr_array_push(arr))) = c;
31023086 }
31033087 }
31043088 return arr;
31053089 }
31063090
3107-apr_hash_t * SVN::MakeRevPropHash(const RevPropHash& revProps, apr_pool_t * pool)
3091+apr_hash_t* SVN::MakeRevPropHash(const RevPropHash& revProps, apr_pool_t* pool)
31083092 {
3109- apr_hash_t * revprop_table = NULL;
3093+ apr_hash_t* revprop_table = NULL;
31103094 if (!revProps.empty())
31113095 {
31123096 revprop_table = apr_hash_make(pool);
31133097 for (RevPropHash::const_iterator it = revProps.begin(); it != revProps.end(); ++it)
31143098 {
3115- svn_string_t *propval = svn_string_create((LPCSTR)CUnicodeUtils::GetUTF8(it->second), pool);
3116- apr_hash_set (revprop_table, apr_pstrdup(pool, (LPCSTR)CUnicodeUtils::GetUTF8(it->first)), APR_HASH_KEY_STRING, (const void*)propval);
3099+ svn_string_t* propval = svn_string_create((LPCSTR)CUnicodeUtils::GetUTF8(it->second), pool);
3100+ apr_hash_set(revprop_table, apr_pstrdup(pool, (LPCSTR)CUnicodeUtils::GetUTF8(it->first)), APR_HASH_KEY_STRING, (const void*)propval);
31173101 }
31183102 }
31193103
@@ -3120,18 +3104,18 @@
31203104 return revprop_table;
31213105 }
31223106
3123-svn_error_t * SVN::commitcallback2(const svn_commit_info_t * commit_info, void * baton, apr_pool_t * localpool)
3107+svn_error_t* SVN::commitcallback2(const svn_commit_info_t* commit_info, void* baton, apr_pool_t* localpool)
31243108 {
31253109 if (commit_info)
31263110 {
3127- SVN * pThis = (SVN*)baton;
3111+ SVN* pThis = (SVN*)baton;
31283112 pThis->m_commitRev = commit_info->revision;
31293113 if (SVN_IS_VALID_REVNUM(commit_info->revision))
31303114 {
31313115 pThis->Notify(CTSVNPath(), CTSVNPath(), svn_wc_notify_update_completed, svn_node_none, L"",
3132- svn_wc_notify_state_unknown, svn_wc_notify_state_unknown,
3133- commit_info->revision, NULL, svn_wc_notify_lock_state_unchanged,
3134- L"", L"", NULL, NULL, localpool);
3116+ svn_wc_notify_state_unknown, svn_wc_notify_state_unknown,
3117+ commit_info->revision, NULL, svn_wc_notify_lock_state_unchanged,
3118+ L"", L"", NULL, NULL, localpool);
31353119 }
31363120 if (commit_info->post_commit_err)
31373121 {
@@ -3143,23 +3127,23 @@
31433127
31443128 void SVN::SetAndClearProgressInfo(HWND hWnd)
31453129 {
3146- m_progressWnd = hWnd;
3147- m_pProgressDlg = NULL;
3148- progress_total = 0;
3130+ m_progressWnd = hWnd;
3131+ m_pProgressDlg = NULL;
3132+ progress_total = 0;
31493133 progress_lastprogress = 0;
3150- progress_lasttotal = 0;
3151- progress_lastTicks = GetTickCount64();
3134+ progress_lasttotal = 0;
3135+ progress_lastTicks = GetTickCount64();
31523136 }
31533137
3154-void SVN::SetAndClearProgressInfo(CProgressDlg * pProgressDlg, bool bShowProgressBar/* = false*/)
3138+void SVN::SetAndClearProgressInfo(CProgressDlg* pProgressDlg, bool bShowProgressBar /* = false*/)
31553139 {
3156- m_progressWnd = NULL;
3157- m_pProgressDlg = pProgressDlg;
3158- progress_total = 0;
3140+ m_progressWnd = NULL;
3141+ m_pProgressDlg = pProgressDlg;
3142+ progress_total = 0;
31593143 progress_lastprogress = 0;
3160- progress_lasttotal = 0;
3161- progress_lastTicks = GetTickCount64();
3162- m_bShowProgressBar = bShowProgressBar;
3144+ progress_lasttotal = 0;
3145+ progress_lastTicks = GetTickCount64();
3146+ m_bShowProgressBar = bShowProgressBar;
31633147 }
31643148
31653149 CString SVN::GetSummarizeActionText(svn_client_diff_summarize_kind_t kind)
@@ -3167,33 +3151,33 @@
31673151 CString sAction;
31683152 switch (kind)
31693153 {
3170- case svn_client_diff_summarize_kind_normal:
3171- sAction.LoadString(IDS_SVN_SUMMARIZENORMAL);
3172- break;
3173- case svn_client_diff_summarize_kind_added:
3174- sAction.LoadString(IDS_SVN_SUMMARIZEADDED);
3175- break;
3176- case svn_client_diff_summarize_kind_modified:
3177- sAction.LoadString(IDS_SVN_SUMMARIZEMODIFIED);
3178- break;
3179- case svn_client_diff_summarize_kind_deleted:
3180- sAction.LoadString(IDS_SVN_SUMMARIZEDELETED);
3181- break;
3154+ case svn_client_diff_summarize_kind_normal:
3155+ sAction.LoadString(IDS_SVN_SUMMARIZENORMAL);
3156+ break;
3157+ case svn_client_diff_summarize_kind_added:
3158+ sAction.LoadString(IDS_SVN_SUMMARIZEADDED);
3159+ break;
3160+ case svn_client_diff_summarize_kind_modified:
3161+ sAction.LoadString(IDS_SVN_SUMMARIZEMODIFIED);
3162+ break;
3163+ case svn_client_diff_summarize_kind_deleted:
3164+ sAction.LoadString(IDS_SVN_SUMMARIZEDELETED);
3165+ break;
31823166 }
31833167 return sAction;
31843168 }
31853169
3186-void SVN::progress_func(apr_off_t progress, apr_off_t total, void *baton, apr_pool_t * /*pool*/)
3170+void SVN::progress_func(apr_off_t progress, apr_off_t total, void* baton, apr_pool_t* /*pool*/)
31873171 {
3188- SVN * pSVN = (SVN*)baton;
3189- if ((pSVN==0)||((pSVN->m_progressWnd == 0)&&(pSVN->m_pProgressDlg == 0)))
3172+ SVN* pSVN = (SVN*)baton;
3173+ if ((pSVN == 0) || ((pSVN->m_progressWnd == 0) && (pSVN->m_pProgressDlg == 0)))
31903174 return;
31913175 apr_off_t delta = progress;
3192- if ((progress >= pSVN->progress_lastprogress)&&((total == pSVN->progress_lasttotal) || (total < 0)))
3176+ if ((progress >= pSVN->progress_lastprogress) && ((total == pSVN->progress_lasttotal) || (total < 0)))
31933177 delta = progress - pSVN->progress_lastprogress;
31943178
31953179 pSVN->progress_lastprogress = progress;
3196- pSVN->progress_lasttotal = total;
3180+ pSVN->progress_lasttotal = total;
31973181
31983182 ULONGLONG ticks = GetTickCount64();
31993183 pSVN->progress_vector.push_back(delta);
@@ -3201,14 +3185,14 @@
32013185 //ATLTRACE("progress = %I64d, total = %I64d, delta = %I64d, overall total is : %I64d\n", progress, total, delta, pSVN->progress_total);
32023186 if ((pSVN->progress_lastTicks + 1000UL) < ticks)
32033187 {
3204- double divby = (double(ticks - pSVN->progress_lastTicks)/1000.0);
3188+ double divby = (double(ticks - pSVN->progress_lastTicks) / 1000.0);
32053189 if (divby < 0.0001)
32063190 divby = 1;
32073191 pSVN->m_SVNProgressMSG.overall_total = pSVN->progress_total;
3208- pSVN->m_SVNProgressMSG.progress = progress;
3209- pSVN->m_SVNProgressMSG.total = total;
3210- pSVN->progress_lastTicks = ticks;
3211- apr_off_t average = 0;
3192+ pSVN->m_SVNProgressMSG.progress = progress;
3193+ pSVN->m_SVNProgressMSG.total = total;
3194+ pSVN->progress_lastTicks = ticks;
3195+ apr_off_t average = 0;
32123196 for (std::vector<apr_off_t>::iterator it = pSVN->progress_vector.begin(); it != pSVN->progress_vector.end(); ++it)
32133197 {
32143198 average += *it;
@@ -3256,7 +3240,7 @@
32563240 return;
32573241 }
32583242
3259-void SVN::CallPreConnectHookIfUrl( const CTSVNPathList& pathList, const CTSVNPath& path /* = CTSVNPath()*/ )
3243+void SVN::CallPreConnectHookIfUrl(const CTSVNPathList& pathList, const CTSVNPath& path /* = CTSVNPath()*/)
32603244 {
32613245 if (pathList.GetCount())
32623246 {
@@ -3267,17 +3251,17 @@
32673251 }
32683252 }
32693253
3270-CString SVN::GetChecksumString( svn_checksum_kind_t type, const CString& s, apr_pool_t * localpool )
3254+CString SVN::GetChecksumString(svn_checksum_kind_t type, const CString& s, apr_pool_t* localpool)
32713255 {
3272- svn_checksum_t *checksum;
3273- CStringA sa = CUnicodeUtils::GetUTF8(s);
3256+ svn_checksum_t* checksum;
3257+ CStringA sa = CUnicodeUtils::GetUTF8(s);
32743258 svn_checksum(&checksum, type, sa, sa.GetLength(), localpool);
3275- const char * hexname = svn_checksum_to_cstring(checksum, localpool);
3276- CString hex = CUnicodeUtils::GetUnicode(hexname);
3259+ const char* hexname = svn_checksum_to_cstring(checksum, localpool);
3260+ CString hex = CUnicodeUtils::GetUnicode(hexname);
32773261 return hex;
32783262 }
32793263
3280-CString SVN::GetChecksumString( svn_checksum_kind_t type, const CString& s )
3264+CString SVN::GetChecksumString(svn_checksum_kind_t type, const CString& s)
32813265 {
32823266 return GetChecksumString(type, s, m_pool);
32833267 }
@@ -3310,14 +3294,14 @@
33103294 }
33113295 }
33123296
3313-svn_error_t * svn_error_handle_malfunction(svn_boolean_t can_return,
3314- const char *file, int line,
3315- const char *expr)
3297+svn_error_t* svn_error_handle_malfunction(svn_boolean_t can_return,
3298+ const char* file, int line,
3299+ const char* expr)
33163300 {
33173301 // we get here every time Subversion encounters something very unexpected.
33183302 // in previous versions, Subversion would just call abort() - now we can
33193303 // show the user some information before we return.
3320- svn_error_t * err = svn_error_raise_on_malfunction(TRUE, file, line, expr);
3304+ svn_error_t* err = svn_error_raise_on_malfunction(TRUE, file, line, expr);
33213305
33223306 CString sErr(MAKEINTRESOURCE(IDS_ERR_SVNEXCEPTION));
33233307 if (err)
@@ -3326,11 +3310,11 @@
33263310 ::MessageBox(NULL, sErr, L"Subversion Exception!", MB_ICONERROR);
33273311 if (can_return)
33283312 return err;
3329- if (CRegDWORD(L"Software\\TortoiseSVN\\Debug", FALSE)==FALSE)
3313+ if (CRegDWORD(L"Software\\TortoiseSVN\\Debug", FALSE) == FALSE)
33303314 {
33313315 CCrashReport::Instance().AddUserInfoToReport(L"SVNException", sErr);
33323316 CCrashReport::Instance().Uninstall();
3333- abort(); // ugly, ugly! But at least we showed a messagebox first
3317+ abort(); // ugly, ugly! But at least we showed a messagebox first
33343318 }
33353319 }
33363320
@@ -3337,11 +3321,11 @@
33373321 CString sFormatErr;
33383322 sFormatErr.FormatMessage(IDS_ERR_SVNFORMATEXCEPTION, (LPCWSTR)CUnicodeUtils::GetUnicode(file), line, (LPCWSTR)CUnicodeUtils::GetUnicode(expr));
33393323 ::MessageBox(NULL, sFormatErr, L"Subversion Exception!", MB_ICONERROR);
3340- if (CRegDWORD(L"Software\\TortoiseSVN\\Debug", FALSE)==FALSE)
3324+ if (CRegDWORD(L"Software\\TortoiseSVN\\Debug", FALSE) == FALSE)
33413325 {
33423326 CCrashReport::Instance().AddUserInfoToReport(L"SVNException", sFormatErr);
33433327 CCrashReport::Instance().Uninstall();
3344- abort(); // ugly, ugly! But at least we showed a messagebox first
3328+ abort(); // ugly, ugly! But at least we showed a messagebox first
33453329 }
3346- return NULL; // never reached, only to silence compiler warning
3330+ return NULL; // never reached, only to silence compiler warning
33473331 }
--- trunk/src/SVN/SVN.h (revision 28497)
+++ trunk/src/SVN/SVN.h (revision 28498)
@@ -1,6 +1,6 @@
11 // TortoiseSVN - a Windows shell extension for easy version control
22
3-// Copyright (C) 2003-2018 - TortoiseSVN
3+// Copyright (C) 2003-2019 - TortoiseSVN
44
55 // This program is free software; you can redistribute it and/or
66 // modify it under the terms of the GNU General Public License
@@ -138,6 +138,22 @@
138138 SVNExportOnlyLocalChanges
139139 };
140140
141+ enum UnicodeType
142+ {
143+ AUTOTYPE,
144+ BINARY,
145+ ASCII,
146+ UTF16_LE, //=1200,
147+ UTF16_BE, //=1201,
148+ UTF16_LEBOM, //=1200,
149+ UTF16_BEBOM, //=1201,
150+ UTF32_LE, //=12000,
151+ UTF32_BE, //=12001,
152+ UTF8, //=65001,
153+ UTF8BOM, //=UTF8+65536,
154+ };
155+
156+
141157 /**
142158 * Shelving
143159 */
@@ -1041,9 +1057,12 @@
10411057 svn_revnum_t merged_revision,
10421058 apr_hash_t *merged_rev_props,
10431059 const char *merged_path,
1044- const char *line,
1060+ const svn_string_t *line,
10451061 svn_boolean_t local_change,
1046- apr_pool_t *pool);
1062+ apr_pool_t *pool);
1063+ bool ignoreNextLine = false; ///< flag used in the blame receiver when dealing with utf16 files
1064+ bool ignoredLastLine = false; ///< flag used in the blame receiver when dealing with utf16 files
1065+ UnicodeType unicodeType = UnicodeType::AUTOTYPE; ///< flag used in the blame receiver
10471066 static svn_error_t* listReceiver(void* baton,
10481067 const char* path,
10491068 const svn_dirent_t *dirent,
Show on old repository browser