RE: bug? svn.exe propset svn:executable "*" affects too may files on Windows
From: Jože Fabčič <Joze.Fabcic_at_comtrade.com>
Date: Thu, 11 Jun 2015 17:22:46 +0200
Bert, do you know the issue number for this "known issue"?
I checked what the Windows, Visual studio and vscrt do. It's easy to get the original command line as it was typed into console using function GetCommandLine (1). It's easy to instruct CRT to expand * to all the files by linking setargv.obj (2), see https://msdn.microsoft.com/en-us/library/8bch7bkk(v=vs.100).aspx.
The example c++ code is here, easily convertible into c:
int _tmain(int argc, _TCHAR* argv[])
for (int i=0; i<argc; i++)
return 0;
I compiled it with VS 2010 and run on windows 7.
b:\svn>dir /b
It was possible to get asterisk expansion and the original line:
b:\svn>args\debug\args 1 "2" "*" *
This processing of asterisks by CRT function _setargv is different from the processing of unix shells as it removes the quotes if present. But the svn.exe can start with the result of GetCommandLine and evaluate arguments better, it can distinguish between "*" and *.
Jože
From: Bert Huijben [mailto:bert_at_qqmail.nl]
On Windows the '*' is evaluated even when it is enclosed in quotes... (The arguments are expanded by 'svn' after they are split on Windows, instead of by the shell as on many other platforms). So your command sets the name of the first file that matches to the svn:executable value on all further files that match.
There is not much we can do about this. A valid workaround is passing a different character (E.g. 'x'), as Subversion will canonicalize the value of this reserved property to '*' when you set it.
Given that this is a known issue, it would have been better to ask this on the user list.
Bert
From: Jože Fabčič [mailto:Joze.Fabcic_at_comtrade.com]
Hi all,
I compiled a library (boost) and found out that few files are missing the svn:executable property. I wanted to set the property and the command line client started to apply the property to all the files in the current directory:
b:\boost\boost-1.44>svn propset svn:executable "*" bootstrap.sh
The working copy was created with TortoiseSVN, probably 1.8.10 that linked SVN 1.8.11. I upgraded to the latest TortoiseSVN 1.8.11 that links SVN 1.8.13 and received the same result. I installed SVN 1.8.13 from https://www.visualsvn.com/downloads/ and received the same result.
On unix, the command works correctly. Using some other value of a property, as used for example in SVN book works fine:
b:\boost\boost-1.44>svn propset svn:executable on bootstrap.sh
The asterisk "*" is returned as the value of property.
b:\boost\boost-1.44>svn propget svn:executable bootstrap.sh
When searching google with "svn execute permission windows", the first result that I receive is
and besides the correct procedure using TortoiseSVN it also presents the wrong command-line invocation
svn propset svn:executable "*" someScript
It seems that the value of property is incorrectly used also for selecting the target:
Do you see the same behaviour also on your systems?
Thanks, Jože
|
This is an archived mail posted to the Subversion Dev mailing list.
This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.