• R/O
  • SSH
  • HTTPS

tortoisesvn: Commit


Commit MetaInfo

Revisión29432 (tree)
Tiempo2022-07-19 04:23:20
Autorstefankueng

Log Message

fix finding the script path with %REPOROOT%

Cambiar Resumen

Diferencia incremental

--- trunk/src/Changelog.txt (revision 29431)
+++ trunk/src/Changelog.txt (revision 29432)
@@ -6,6 +6,9 @@
66 - NEW: add autocomplete functionality in the log dialog
77 used in Repository browser. (Daniel Sahlberg)
88 - BUG: Crash in TMerge when doing Redo after saving. (Stefan)
9+- BUG: hook scripts specified with %REPOROOT% were not
10+ executed correctly for paths more than two
11+ levels down the root. (Stefan)
912
1013 Version 1.14.3
1114 - BUG: clipboard wasn't closed after pasting into
--- trunk/src/Utils/Hooks.cpp (revision 29431)
+++ trunk/src/Utils/Hooks.cpp (revision 29432)
@@ -1,6 +1,6 @@
11 // TortoiseSVN - a Windows shell extension for easy version control
22
3-// Copyright (C) 2007-2018, 2021 - TortoiseSVN
3+// Copyright (C) 2007-2018, 2021-2022 - TortoiseSVN
44 // Copyright (C) 2019 - TortoiseGit
55
66 // This program is free software; you can redistribute it and/or
@@ -807,6 +807,7 @@
807807 CString sLocalPathUrl = rootUrl;
808808 CString sLocalPath = rootPath;
809809 // find the lowest common ancestor of the local path url and the script url
810+ int stripCount = 0;
810811 while (fullUrl.Left(sLocalPathUrl.GetLength()).Compare(sLocalPathUrl))
811812 {
812813 int sp = sLocalPathUrl.ReverseFind('/');
@@ -813,7 +814,7 @@
813814 if (sp < 0)
814815 return false;
815816 sLocalPathUrl = sLocalPathUrl.Left(sp);
816-
817+ ++stripCount;
817818 do
818819 {
819820 sp = sLocalPath.ReverseFind('\\');
@@ -820,6 +821,8 @@
820821 if (sp < 0)
821822 {
822823 sLocalPath = rootPath;
824+ for (int j = 0; j < stripCount; ++j)
825+ sLocalPath = sLocalPath.Left(sLocalPath.ReverseFind('\\'));
823826 break;
824827 }
825828 sLocalPath = sLocalPath.Left(sp);
Show on old repository browser