• R/O
  • SSH
  • HTTPS

tortoisesvn: Commit


Commit MetaInfo

Revision27644 (tree)
Zeit2017-01-05 19:01:40
Autorstefankueng

Log Message

Merged revision(s) r27634, r27636, r27640, r27643 from trunk:
* Correctly kill TSVNCache on reinstall/upgrade/repair. Based on TortoiseGit rev. 0bb08ec7eea54a6ed9bd7e84440715073826297a.
* Remove the readonly attribute for the merge target file if the 'svn:needs-lock' property is set.
* Adjust for 2017
* use svn_client_mergeinfo_get_merged() again instead of svn_client_mergeinfo_log2(): This change was introduced in r26198 because svn_client_mergeinfo_log2() should have properly stopped at the branch revision automatically. Since this didn't work properly the workaround to get that revision was re-introduced in r26783. With that change, there's no need to use svn_client_mergeinfo_log2() anymore since it is slower for big repositories.

Ändern Zusammenfassung

Diff

--- branches/1.9.x/Languages/TortoiseDocPotHeader.txt (revision 27643)
+++ branches/1.9.x/Languages/TortoiseDocPotHeader.txt (revision 27644)
@@ -1,6 +1,6 @@
11 #
22 # Translation of the TortoiseSVN manuals
3-# Copyright (C) 2004-2016 the TortoiseSVN team
3+# Copyright (C) 2004-2017 the TortoiseSVN team
44 #
55 # This file is distributed under the same license as TortoiseSVN
66 #
--- branches/1.9.x/Languages/TortoiseUIPotHeader.txt (revision 27643)
+++ branches/1.9.x/Languages/TortoiseUIPotHeader.txt (revision 27644)
@@ -1,6 +1,6 @@
11 #
22 # Translation of the TortoiseSVN user interface
3-# Copyright (C) 2004-2016 the TortoiseSVN team
3+# Copyright (C) 2004-2017 the TortoiseSVN team
44 #
55 # This file is distributed under the same license as TortoiseSVN
66 #
--- branches/1.9.x/contrib/hook-scripts/client-side/checkyear.js (revision 27643)
+++ branches/1.9.x/contrib/hook-scripts/client-side/checkyear.js (revision 27644)
@@ -20,7 +20,7 @@
2020 WScript.Quit(1);
2121 }
2222
23-var re = /^\/\/ Copyright.+(2016)(.*)/;
23+var re = /^\/\/ Copyright.+(2017)(.*)/;
2424 var basere = /^\/\/ Copyright(.*)/;
2525 var filere = /(\.cpp$)|(\.h$)|(\.idl$)/;
2626
--- branches/1.9.x/src/TortoiseProc/AppUtils.cpp (revision 27643)
+++ branches/1.9.x/src/TortoiseProc/AppUtils.cpp (revision 27644)
@@ -1,6 +1,6 @@
11 // TortoiseSVN - a Windows shell extension for easy version control
22
3-// Copyright (C) 2003-2016 - TortoiseSVN
3+// Copyright (C) 2003-2017 - TortoiseSVN
44 // Copyright (C) 2015 - TortoiseGit
55
66 // This program is free software; you can redistribute it and/or
@@ -187,7 +187,15 @@
187187 com.Replace(L"%merged", L"");
188188 }
189189 else
190+ {
191+ SVNProperties props(mergedfile, SVNRev::REV_WC, false, false);
192+ if (props.HasProperty("svn:needs-lock"))
193+ {
194+ // remove the readonly attribute
195+ ::SetFileAttributes(mergedfile.GetWinPath(), FILE_ATTRIBUTE_NORMAL);
196+ }
190197 com.Replace(L"%merged", L"\"" + mergedfile.GetWinPathString() + L"\"");
198+ }
191199 if (basename.IsEmpty())
192200 {
193201 if (basefile.IsEmpty())
--- branches/1.9.x/src/TortoiseProc/LogDialog/LogDlg.cpp (revision 27643)
+++ branches/1.9.x/src/TortoiseProc/LogDialog/LogDlg.cpp (revision 27644)
@@ -1,6 +1,6 @@
11 // TortoiseSVN - a Windows shell extension for easy version control
22
3-// Copyright (C) 2003-2016 - TortoiseSVN
3+// Copyright (C) 2003-2017 - 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
@@ -1550,17 +1550,6 @@
15501550 return TRUE;
15511551 }
15521552
1553-svn_error_t* mergedrevsreceiver(void *baton, svn_log_entry_t *log_entry, apr_pool_t * /*pool*/)
1554-{
1555- std::set<svn_revnum_t> * pMergedRevs = (std::set<svn_revnum_t>*)baton;
1556- if (log_entry && pMergedRevs)
1557- {
1558- if (log_entry->revision)
1559- pMergedRevs->insert(log_entry->revision);
1560- }
1561- return NULL;
1562-}
1563-
15641553 //this is the thread function which calls the subversion function
15651554 void CLogDlg::LogThread()
15661555 {
@@ -1673,17 +1662,59 @@
16731662 // match the URL we show the log for.
16741663 SVNPool localpool(m_pool);
16751664 svn_error_clear(Err);
1665+ apr_hash_t * mergeinfo = nullptr;
16761666 const char* svnPath = m_mergePath.GetSVNApiPath(localpool);
16771667 apr_array_header_t * noprops = apr_array_make(localpool, 0, sizeof(const char *));
16781668
16791669 SVNTRACE(
1680- Err = svn_client_mergeinfo_log2(true, svnPath, m_mergePath.IsUrl() ? SVNRev(SVNRev::REV_HEAD) : SVNRev(SVNRev::REV_BASE),
1681- m_path.GetSVNApiPath(localpool), SVNRev(SVNRev::REV_HEAD), m_startrev, m_endrev,
1682- mergedrevsreceiver, &m_mergedRevs,
1683- false, svn_depth_empty, noprops, m_pctx, localpool),
1670+ Err = svn_client_mergeinfo_get_merged(&mergeinfo, svnPath, SVNRev(SVNRev::REV_WC),
1671+ m_pctx, localpool),
16841672 svnPath
1685- )
16861673
1674+ )
1675+ if (Err == nullptr)
1676+ {
1677+ // now check the relative paths
1678+ apr_hash_index_t *hi;
1679+ const void *key;
1680+ void *val;
1681+
1682+ if (mergeinfo)
1683+ {
1684+ // unfortunately it's not defined whether the urls have a trailing
1685+ // slash or not, so we have to trim such a slash before comparing
1686+ // the sUrl with the mergeinfo url
1687+ CStringA sUrl = CPathUtils::PathEscape(CUnicodeUtils::GetUTF8(m_sURL));
1688+ sUrl.TrimRight('/');
1689+
1690+ for (hi = apr_hash_first(localpool, mergeinfo); hi; hi = apr_hash_next(hi))
1691+ {
1692+ apr_hash_this(hi, &key, nullptr, &val);
1693+ CStringA sKey = (char*)key;
1694+ sKey.TrimRight('/');
1695+ if (sUrl.Compare(sKey) == 0)
1696+ {
1697+ apr_array_header_t * arr = (apr_array_header_t*)val;
1698+ if (val)
1699+ {
1700+ for (long i = 0; i < arr->nelts; ++i)
1701+ {
1702+ svn_merge_range_t * pRange = APR_ARRAY_IDX(arr, i, svn_merge_range_t*);
1703+ if (pRange)
1704+ {
1705+ for (svn_revnum_t re = pRange->start + 1; re <= pRange->end; ++re)
1706+ {
1707+ m_mergedRevs.insert(re);
1708+ }
1709+ }
1710+ }
1711+ }
1712+ break;
1713+ }
1714+ }
1715+ }
1716+ }
1717+
16871718 bool bFindCopyFrom = !!(DWORD)CRegDWORD(L"Software\\TortoiseSVN\\LogFindCopyFrom", TRUE);
16881719 if (bFindCopyFrom && m_bStrict)
16891720 {
Show on old repository browser