• R/O
  • SSH
  • HTTPS

tortoisesvn: Commit


Commit MetaInfo

Revision23269 (tree)
Zeit2012-09-08 03:31:02
Autorstefankueng

Log Message

Merged revision(s) r23251, , r23258, r23259, , r23266, r23267, r23268 from trunk:
* Fix link to the issue tracker doc.
* Allow case-renames with the "move and rename" drop.
* Initialize the pan start position on startup, and invalidate it when the mouse pointer leaves the window. (Fixes issue #406) : wrong image positioning
* every time a config object is requested, provide a deep copy of the object that we initialized. (Fixes issue #408) : repeated authentication and crashes
* Mark all properties as secure so they can be used in an admin/silent installation. (Fixes issue #409) : language pack fails to install in silent mode
* Update to WiX 3.6 and NAnt 0.92

Ändern Zusammenfassung

Diff

--- branches/1.7.x/build.txt (revision 23268)
+++ branches/1.7.x/build.txt (revision 23269)
@@ -47,8 +47,8 @@
4747 - Python 2.6(\b 1) http://www.python.org/windows/
4848 - libxml2 python bindings http://users.skynet.be/sbi/libxml-python/
4949 - Perl http://www.activestate.com/Products/ActivePerl/
50-- WiX3.5(\b 1) http://wix.codeplex.com/
51-- NAnt 0.90 (\b 1) http://nant.sourceforge.net
50+- WiX3.6(\b 1) http://wix.codeplex.com/
51+- NAnt 0.92 (\b 1) http://nant.sourceforge.net
5252 .
5353 (\b 1) Add the paths of the binaries to the PATH environment variable. You may have to
5454 logoff/logon to make the new environment variables take effect!
Modified: svn:mergeinfo
## -0,0 +0,1 ##
Merged /trunk/build.txt:r23266-23268
--- branches/1.7.x/doc/source/en/TortoiseSVN/tsvn_dug/dug_bugtracker.xml (revision 23268)
+++ branches/1.7.x/doc/source/en/TortoiseSVN/tsvn_dug/dug_bugtracker.xml (revision 23269)
@@ -362,7 +362,7 @@
362362 <para>
363363 This issue tracker integration is not restricted to TortoiseSVN; it can be used
364364 with any Subversion client. For more information, read the full
365- <ulink url="http://tortoisesvn.googlecode.com/svn/trunk/doc/issuetrackers.txt">
365+ <ulink url="http://tortoisesvn.googlecode.com/svn/trunk/doc/notes/issuetrackers.txt">
366366 <citetitle>Issue Tracker Integration Specification</citetitle>
367367 </ulink>
368368 in the TortoiseSVN source repository.
--- branches/1.7.x/src/Changelog.txt (revision 23268)
+++ branches/1.7.x/src/Changelog.txt (revision 23269)
@@ -1,3 +1,10 @@
1+Version 1.7.10
2+- BUG: Issue #406: wrong image positioning. (Stefan)
3+- BUG: Issue #408: repeated authentication
4+ and crashes. (Stefan)
5+- BUG: Issue #409: language pack fails to install
6+ in silent mode. (Stefan)
7+
18 Version 1.7.9
29 - BUG: Issue #394: crash when refreshing
310 status list control. (Stefan)
--- branches/1.7.x/src/SVN/SVN.cpp (revision 23268)
+++ branches/1.7.x/src/SVN/SVN.cpp (revision 23269)
@@ -113,7 +113,7 @@
113113 svn_ra_initialize(pool);
114114 // set up the configuration
115115 if (Err == 0)
116- m_pctx->config = SVNConfig::Instance().GetConfig();
116+ m_pctx->config = SVNConfig::Instance().GetConfig(pool);
117117
118118 if (m_pctx->config == nullptr)
119119 {
@@ -170,7 +170,7 @@
170170
171171 // set up the configuration
172172 if (err == 0)
173- ctx->config = SVNConfig::Instance().GetConfig();
173+ ctx->config = SVNConfig::Instance().GetConfig(pool);
174174 CString msg;
175175 CString temp;
176176 if (err != NULL)
@@ -1416,7 +1416,7 @@
14161416 apr_hash_set (fs_config, SVN_FS_CONFIG_BDB_LOG_AUTOREMOVE,
14171417 APR_HASH_KEY_STRING, "1");
14181418
1419- config = SVNConfig::Instance().GetConfig();
1419+ config = SVNConfig::Instance().GetConfig(localpool);
14201420
14211421 const char * fs_type = apr_pstrdup(localpool, CStringA(fstype));
14221422 apr_hash_set (fs_config, SVN_FS_CONFIG_FS_TYPE,
--- branches/1.7.x/src/SVN/SVNConfig.cpp (revision 23268)
+++ branches/1.7.x/src/SVN/SVNConfig.cpp (revision 23269)
@@ -36,7 +36,7 @@
3636 : config(nullptr)
3737 , patterns(nullptr)
3838 {
39- svn_error_t * err;
39+ m_critSec.Init();
4040 parentpool = svn_pool_create(NULL);
4141
4242 err = svn_config_ensure(NULL, parentpool);
@@ -55,6 +55,7 @@
5555 {
5656 svn_pool_destroy (pool);
5757 svn_pool_destroy (parentpool);
58+ m_critSec.Term();
5859 delete m_pInstance;
5960 }
6061
@@ -124,3 +125,137 @@
124125 }
125126 return bRet;
126127 }
128+
129+
130+// TODO: remove these forward declarations
131+// once svn 1.8 is out and the config copy
132+// APIs can be used.
133+struct svn_config_t
134+{
135+ /* Table of cfg_section_t's. */
136+ apr_hash_t *sections;
137+
138+ /* Pool for hash tables, table entries and unexpanded values */
139+ apr_pool_t *pool;
140+
141+ /* Pool for expanded values -- this is separate, so that we can
142+ clear it when modifying the config data. */
143+ apr_pool_t *x_pool;
144+
145+ /* Indicates that some values in the configuration have been expanded. */
146+ svn_boolean_t x_values;
147+
148+ /* Temporary string used for lookups. (Using a stringbuf so that
149+ frequent resetting is efficient.) */
150+ svn_stringbuf_t *tmp_key;
151+
152+ /* Temporary value used for expanded default values in svn_config_get.
153+ (Using a stringbuf so that frequent resetting is efficient.) */
154+ svn_stringbuf_t *tmp_value;
155+
156+ /* Specifies whether section names are populated case sensitively. */
157+ svn_boolean_t section_names_case_sensitive;
158+};
159+
160+/* Section table entries. */
161+typedef struct cfg_section_t cfg_section_t;
162+struct cfg_section_t
163+{
164+ /* The section name. */
165+ const char *name;
166+
167+ /* The section name, converted into a hash key. */
168+ const char *hash_key;
169+
170+ /* Table of cfg_option_t's. */
171+ apr_hash_t *options;
172+};
173+
174+
175+/* Option table entries. */
176+typedef struct cfg_option_t cfg_option_t;
177+struct cfg_option_t
178+{
179+ /* The option name. */
180+ const char *name;
181+
182+ /* The option name, converted into a hash key. */
183+ const char *hash_key;
184+
185+ /* The unexpanded option value. */
186+ const char *value;
187+
188+ /* The expanded option value. */
189+ const char *x_value;
190+
191+ /* Expansion flag. If this is TRUE, this value has already been expanded.
192+ In this case, if x_value is NULL, no expansions were necessary,
193+ and value should be used directly. */
194+ svn_boolean_t expanded;
195+};
196+
197+apr_hash_t * SVNConfig::GetConfig( apr_pool_t * pool )
198+{
199+ // create a copy of the config object we have
200+ // to avoid threading issues
201+ CComCritSecLock<CComCriticalSection> lock(m_critSec);
202+
203+ // TODO: once 1.8 is out, use svn_config_copy_config() instead
204+ // of this custom copy stuff.
205+ apr_hash_t * rethash = apr_hash_make(pool);
206+ for (apr_hash_index_t * cidx = apr_hash_first(pool, config); cidx != NULL; cidx = apr_hash_next(cidx))
207+ {
208+ const void *ckey = NULL;
209+ void *cval = NULL;
210+ apr_ssize_t ckeyLength = 0;
211+
212+ apr_hash_this(cidx, &ckey, &ckeyLength, &cval);
213+ svn_config_t * c = (svn_config_t*)cval;
214+
215+
216+ svn_config_t * newconfig = NULL;
217+ svn_config_create(&newconfig, false, pool);
218+
219+ newconfig->sections = apr_hash_make(pool);
220+ newconfig->pool = pool;
221+ newconfig->x_pool = svn_pool_create(pool);
222+ newconfig->x_values = c->x_values;
223+ newconfig->tmp_key = svn_stringbuf_dup(c->tmp_key, pool);
224+ newconfig->tmp_value = svn_stringbuf_dup(c->tmp_value, pool);
225+ newconfig->section_names_case_sensitive = c->section_names_case_sensitive;
226+
227+ for (apr_hash_index_t * sectidx = apr_hash_first(pool, c->sections); sectidx != NULL; sectidx = apr_hash_next(sectidx))
228+ {
229+ const void *sectkey = NULL;
230+ void *sectval = NULL;
231+ apr_ssize_t sectkeyLength = 0;
232+ apr_hash_this(sectidx, &sectkey, &sectkeyLength, &sectval);
233+ cfg_section_t * sect = (cfg_section_t*)sectval;
234+
235+ cfg_section_t * newsec = (cfg_section_t *)apr_palloc(pool, sizeof(*newsec));
236+ newsec->name = apr_pstrdup(pool, sect->name);
237+ newsec->hash_key = apr_pstrdup(pool, sect->hash_key);
238+ newsec->options = apr_hash_make(pool);
239+ for (apr_hash_index_t * optidx = apr_hash_first(pool, sect->options); optidx != NULL; optidx = apr_hash_next(optidx))
240+ {
241+ const void *optkey = NULL;
242+ void *optval = NULL;
243+ apr_ssize_t optkeyLength = 0;
244+ apr_hash_this(optidx, &optkey, &optkeyLength, &optval);
245+ cfg_option_t * opt = (cfg_option_t*)optval;
246+
247+ cfg_option_t * newopt = (cfg_option_t*)apr_palloc(pool, sizeof(*newopt));
248+ newopt->name = apr_pstrdup(pool, opt->name);
249+ newopt->hash_key = apr_pstrdup(pool, opt->hash_key);
250+ newopt->value = apr_pstrdup(pool, opt->value);
251+ newopt->x_value = apr_pstrdup(pool, opt->x_value);
252+ newopt->expanded = opt->expanded;
253+ apr_hash_set(newsec->options, apr_pstrdup(pool, (const char*)optkey), optkeyLength, newopt);
254+ }
255+ apr_hash_set(newconfig->sections, apr_pstrdup(pool, (const char*)sectkey), sectkeyLength, newsec);
256+ }
257+ apr_hash_set(rethash, apr_pstrdup(pool, (const char*)ckey), ckeyLength, newconfig);
258+ }
259+
260+ return rethash;
261+}
--- branches/1.7.x/src/SVN/SVNConfig.h (revision 23268)
+++ branches/1.7.x/src/SVN/SVNConfig.h (revision 23269)
@@ -45,10 +45,7 @@
4545 /**
4646 * Returns the configuration
4747 */
48- apr_hash_t * GetConfig()
49- {
50- return config;
51- }
48+ apr_hash_t * GetConfig(apr_pool_t * pool);
5249
5350 /**
5451 * Reads the global ignore patterns which will be used later in
@@ -75,5 +72,6 @@
7572 apr_hash_t * config;
7673 apr_array_header_t * patterns;
7774
75+ CComCriticalSection m_critSec;
7876 static SVNConfig * m_pInstance;
7977 };
--- branches/1.7.x/src/SVN/SVNFolderStatus.cpp (revision 23268)
+++ branches/1.7.x/src/SVN/SVNFolderStatus.cpp (revision 23269)
@@ -138,7 +138,7 @@
138138 // Note: I know this is an 'expensive' call, but without this, ignores
139139 // done in the global ignore pattern won't show up.
140140 if (g_unversionedovlloaded)
141- localctx->config = SVNConfig::Instance().GetConfig();
141+ localctx->config = SVNConfig::Instance().GetConfig(pool);
142142
143143 // strings pools are unused, now -> we may clear them
144144
--- branches/1.7.x/src/SVN/SVNHelpers.cpp (revision 23268)
+++ branches/1.7.x/src/SVN/SVNHelpers.cpp (revision 23269)
@@ -59,7 +59,7 @@
5959 m_ctx->cancel_func = cancelfunc;
6060 m_ctx->cancel_baton = this;
6161 m_ctx->client_name = SVNHelper::GetUserAgentString(m_pool);
62- m_config = SVNConfig::Instance().GetConfig();
62+ m_config = SVNConfig::Instance().GetConfig(m_pool);
6363 }
6464
6565 SVNHelper::~SVNHelper(void)
@@ -84,7 +84,7 @@
8484 {
8585 ctx->cancel_func = cancelfunc;
8686 ctx->cancel_baton = (void *)this;
87- ctx->config = m_config;
87+ ctx->config = SVNConfig::Instance().GetConfig(m_pool);
8888 }
8989
9090 return ctx;
--- branches/1.7.x/src/SVN/SVNInfo.cpp (revision 23268)
+++ branches/1.7.x/src/SVN/SVNInfo.cpp (revision 23269)
@@ -68,12 +68,12 @@
6868
6969 #ifdef _MFC_VER
7070 // set up the configuration
71- m_pctx->config = SVNConfig::Instance().GetConfig();
71+ m_pctx->config = SVNConfig::Instance().GetConfig(m_pool);
7272 // set up authentication
7373 m_prompt.Init(m_pool, m_pctx);
7474 #else
7575 // set up the configuration
76- m_pctx->config = SVNConfig::Instance().GetConfig();
76+ m_pctx->config = SVNConfig::Instance().GetConfig(m_pool);
7777 #endif
7878 m_pctx->cancel_func = cancel;
7979 m_pctx->cancel_baton = this;
--- branches/1.7.x/src/SVN/SVNReadProperties.cpp (revision 23268)
+++ branches/1.7.x/src/SVN/SVNReadProperties.cpp (revision 23269)
@@ -150,7 +150,7 @@
150150 #ifdef _MFC_VER
151151
152152 // set up the configuration
153- m_pctx->config = SVNConfig::Instance().GetConfig();
153+ m_pctx->config = SVNConfig::Instance().GetConfig(m_pool);
154154 if (m_pctx->config == nullptr)
155155 {
156156 Err = svn_config_get_config (&(m_pctx->config), g_pConfigDir, m_pool);
--- branches/1.7.x/src/SVN/SVNStatus.cpp (revision 23268)
+++ branches/1.7.x/src/SVN/SVNStatus.cpp (revision 23269)
@@ -62,7 +62,7 @@
6262
6363 #ifdef _MFC_VER
6464 // set up the configuration
65- m_pctx->config = SVNConfig::Instance().GetConfig();
65+ m_pctx->config = SVNConfig::Instance().GetConfig(m_pool);
6666
6767 // set up authentication
6868 m_prompt.Init(m_pool, m_pctx);
@@ -78,7 +78,7 @@
7878 SVNConfig::SetUpSSH(m_pctx);
7979 #else
8080 // set up the configuration
81- m_pctx->config = SVNConfig::Instance().GetConfig();
81+ m_pctx->config = SVNConfig::Instance().GetConfig(m_pool);
8282
8383 #endif
8484 }
@@ -110,7 +110,7 @@
110110 svn_error_clear(svn_client_create_context(&ctx, pool));
111111
112112 // set up the configuration
113- ctx->config = SVNConfig::Instance().GetConfig();
113+ ctx->config = SVNConfig::Instance().GetConfig(pool);
114114
115115 svn_revnum_t youngest = SVN_INVALID_REVNUM;
116116 svn_opt_revision_t rev;
--- branches/1.7.x/src/TortoiseIDiff/PicWindow.cpp (revision 23268)
+++ branches/1.7.x/src/TortoiseIDiff/PicWindow.cpp (revision 23269)
@@ -231,6 +231,8 @@
231231 ReleaseCapture();
232232 break;
233233 case WM_MOUSELEAVE:
234+ ptPanStart.x = -1;
235+ ptPanStart.y = -1;
234236 m_lastTTPos.x = 0;
235237 m_lastTTPos.y = 0;
236238 SendMessage(hwndTT, TTM_TRACKACTIVATE, FALSE, 0);
@@ -265,7 +267,9 @@
265267 m_lastTTPos.x = 0;
266268 m_lastTTPos.y = 0;
267269 }
268- if (wParam & MK_LBUTTON)
270+ if ((wParam & MK_LBUTTON) &&
271+ (ptPanStart.x >= 0) &&
272+ (ptPanStart.y >= 0))
269273 {
270274 // pan the image
271275 int xPos = GET_X_LPARAM(lParam);
--- branches/1.7.x/src/TortoiseIDiff/PicWindow.h (revision 23268)
+++ branches/1.7.x/src/TortoiseIDiff/PicWindow.h (revision 23269)
@@ -1,6 +1,6 @@
11 // TortoiseIDiff - an image diff viewer in TortoiseSVN
22
3-// Copyright (C) 2006-2010 - TortoiseSVN
3+// Copyright (C) 2006-2010, 2012 - 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
@@ -56,6 +56,8 @@
5656 */
5757 class CPicWindow : public CWindow
5858 {
59+private:
60+ CPicWindow() : CWindow(NULL) {}
5961 public:
6062 CPicWindow(HINSTANCE hInst, const WNDCLASSEX* wcx = NULL) : CWindow(hInst, wcx)
6163 , bValid(false)
@@ -88,6 +90,8 @@
8890 SetWindowTitle(_T("Picture Window"));
8991 m_lastTTPos.x = 0;
9092 m_lastTTPos.y = 0;
93+ ptPanStart.x = -1;
94+ ptPanStart.y = -1;
9195 };
9296
9397 enum BlendType
--- branches/1.7.x/src/TortoiseProc/Commands/DropMoveCommand.cpp (revision 23268)
+++ branches/1.7.x/src/TortoiseProc/Commands/DropMoveCommand.cpp (revision 23269)
@@ -1,6 +1,6 @@
11 // TortoiseSVN - a Windows shell extension for easy version control
22
3-// Copyright (C) 2007-2008, 2010-2011 - TortoiseSVN
3+// Copyright (C) 2007-2008, 2010-2012 - 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
@@ -63,21 +63,25 @@
6363 destPath = CTSVNPath(droppath+_T("\\")+pathList[nPath].GetFileOrDirectoryName());
6464 else
6565 destPath = CTSVNPath(droppath+_T("\\")+sNewName);
66- if (destPath.Exists())
66+ // path the same but case-changed is ok: results in a case-rename
67+ if (!(pathList[nPath].IsEquivalentToWithoutCase(destPath) && !pathList[nPath].IsEquivalentTo(destPath)))
6768 {
68- CString name = pathList[nPath].GetFileOrDirectoryName();
69- if (!sNewName.IsEmpty())
70- name = sNewName;
71- progress.Stop();
72- CRenameDlg dlg;
73- dlg.SetInputValidator(this);
74- dlg.m_name = name;
75- dlg.m_windowtitle.Format(IDS_PROC_NEWNAMEMOVE, (LPCTSTR)name);
76- if (dlg.DoModal() != IDOK)
69+ if (destPath.Exists())
7770 {
78- return FALSE;
71+ CString name = pathList[nPath].GetFileOrDirectoryName();
72+ if (!sNewName.IsEmpty())
73+ name = sNewName;
74+ progress.Stop();
75+ CRenameDlg dlg;
76+ dlg.SetInputValidator(this);
77+ dlg.m_name = name;
78+ dlg.m_windowtitle.Format(IDS_PROC_NEWNAMEMOVE, (LPCTSTR)name);
79+ if (dlg.DoModal() != IDOK)
80+ {
81+ return FALSE;
82+ }
83+ destPath.SetFromWin(droppath+_T("\\")+dlg.m_name);
7984 }
80- destPath.SetFromWin(droppath+_T("\\")+dlg.m_name);
8185 }
8286 if (!svn.Move(CTSVNPathList(pathList[nPath]), destPath))
8387 {
--- branches/1.7.x/src/TortoiseProc/RevisionGraph/FullHistory.cpp (revision 23268)
+++ branches/1.7.x/src/TortoiseProc/RevisionGraph/FullHistory.cpp (revision 23269)
@@ -71,7 +71,7 @@
7171
7272 pool = svn_pool_create (parentpool);
7373 // set up the configuration
74- ctx->config = SVNConfig::Instance().GetConfig();
74+ ctx->config = SVNConfig::Instance().GetConfig(pool);
7575
7676 // set up authentication
7777 prompt.Init(pool, ctx);
--- branches/1.7.x/src/TortoiseProc/TortoiseProc.cpp (revision 23268)
+++ branches/1.7.x/src/TortoiseProc/TortoiseProc.cpp (revision 23269)
@@ -275,6 +275,15 @@
275275 return FALSE;
276276 }
277277
278+ if (parser.HasVal(_T("configdir")))
279+ {
280+ // the user can override the location of the Subversion config directory here
281+ CString sConfigDir = parser.GetVal(_T("configdir"));
282+ g_SVNGlobal.SetConfigDir(sConfigDir);
283+ }
284+ // load the configuration now
285+ SVNConfig::Instance();
286+
278287 CTSVNPath cmdLinePath;
279288 CTSVNPathList pathList;
280289 if (g_sGroupingUUID.IsEmpty())
@@ -398,12 +407,6 @@
398407
399408 CheckForNewerVersion();
400409
401- if (parser.HasVal(_T("configdir")))
402- {
403- // the user can override the location of the Subversion config directory here
404- CString sConfigDir = parser.GetVal(_T("configdir"));
405- g_SVNGlobal.SetConfigDir(sConfigDir);
406- }
407410 // to avoid that SASL will look for and load its plugin dlls all around the
408411 // system, we set the path here.
409412 // Note that SASL doesn't have to be initialized yet for this to work
Show on old repository browser