Re: [fossil-users] Issue with crlf-glob *

2017-04-13 Thread Ross Berteig

On 4/12/2017 10:30 PM, Scott Robison wrote:

On Wed, Apr 12, 2017 at 4:41 PM, Thomas  wrote:

On 2017-04-12 23:24, Scott Robison wrote:

When I am using the download from fossil-scm.org, I am able to use
single quotes to 'escape' the asterisk. Double quotes do not work.

On Windows?
How'd you do that?

Using a copy of fossil.exe 2.2 I just downloaded from fossil's
download page a minute ago, from a command prompt on Windows 10 Pro,
as follows: 


Interesting. That does work, but not entirely for the reason I expected.

Using my build of Fossil 2.1 on Win10 64-bit, and the fossil test-echo 
command, I see:


C:\Users\Ross\Documents\tmp\fossil4>fossil test-echo '*'
g.nameOfExe = [C:\Programs\Bin\fossil.exe]
argv[0] = [fossil]
argv[1] = [test-echo]
argv[2] = ['*']

C:\Users\Ross\Documents\tmp\fossil4>fossil test-echo *
g.nameOfExe = [C:\Programs\Bin\fossil.exe]
argv[0] = [fossil]
argv[1] = [test-echo]
argv[2] = [.all-help-9c65b5432e.html.espell]
argv[3] = [.dockerignore]

argv[35] = [www]

So the single quotes work. The arguments are passed by CMD to fossil.exe 
without expanding wildcards. It appears that the single quotes prevent 
expansion in the C startup code, but are preserved. But that is ok, 
because the GLOB syntax understood by fossil allows quotes and strips 
them off before matching.


There's one more quirk. The globber does not change the argument in 
fossil if no files match. I suspect that causes some confusion when 
experimenting with this:


C:\Users\Ross\Documents\tmp\fossil4>fossil test-echo *.no-such-file.*
g.nameOfExe = [C:\Programs\Bin\fossil.exe]
argv[0] = [fossil]
argv[1] = [test-echo]
argv[2] = [*.no-such-file.*]

C:\Users\Ross\Documents\tmp\fossil4>

--
Ross Berteig   r...@cheshireeng.com
Cheshire Engineering Corp.   http://www.CheshireEng.com/
+1 626 303 1602

___
fossil-users mailing list
fossil-users@lists.fossil-scm.org
http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users


Re: [fossil-users] Issue with crlf-glob *

2017-04-12 Thread Scott Robison
On Wed, Apr 12, 2017 at 4:41 PM, Thomas  wrote:
> On 2017-04-12 23:24, Scott Robison wrote:
>>
>> When I am using the download from fossil-scm.org, I am able to use
>> single quotes to 'escape' the asterisk. Double quotes do not work.
>
>
> On Windows?
> How'd you do that?

Using a copy of fossil.exe 2.2 I just downloaded from fossil's
download page a minute ago, from a command prompt on Windows 10 Pro,
as follows:

D:\temp\work>fossil settings ignore-glob
ignore-glob

D:\temp\work>fossil extras
c.a
x/a.a
x/b.b
x/c.a
z.a

D:\temp\work>fossil settings ignore-glob '*'

D:\temp\work>fossil settings ignore-glob
ignore-glob  (local)  '*'

D:\temp\work>fossil extras

D:\temp\work>fossil unset ignore-glob

D:\temp\work>fossil extras
c.a
x/a.a
x/b.b
x/c.a
z.a

D:\temp\work>fossil settings ignore-glob '*.a'

D:\temp\work>fossil extras
x/b.b

D:\temp\work>fossil settings ignore-glob *.a
Usage: fossil settings ?PROPERTY? ?VALUE? ?-global?

Unquoted in the last example, *.a doesn't work. Single quoted it does.
-- 
Scott Robison
___
fossil-users mailing list
fossil-users@lists.fossil-scm.org
http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users


Re: [fossil-users] Issue with crlf-glob *

2017-04-12 Thread Thomas

On 2017-04-12 23:31, Thomas wrote:

On 2017-04-12 22:55, Ross Berteig wrote:


A very clean and lightweight build can be had from ./configure
--with-miniz --with-openssl=none


Oups, sorry. I overlooked that.

This is what I downloaded from
https://www.fossil-scm.org/fossil/uv/download.html before I started
using Fossil:
4,459,022 fossil.exe

This is what I built myself with MSVC 2015 a few hours ago:
2,799,616 fossil.exe

No idea what's the default but what I did before I built was to change
two lines in Makefile.msc beforehand:
FOSSIL_BUILD_SSL = 1
FOSSIL_ENABLE_SSL = 1

Maybe my build is missing something I've yet to figure out.


I tend to omit/forget probably valuable information. ;-(
I took this information from
https://www.fossil-scm.org/xfer/doc/trunk/www/build.wiki .

Sorry again:-(


___
fossil-users mailing list
fossil-users@lists.fossil-scm.org
http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users


Re: [fossil-users] Issue with crlf-glob *

2017-04-12 Thread Thomas

On 2017-04-12 23:24, Scott Robison wrote:

When I am using the download from fossil-scm.org, I am able to use
single quotes to 'escape' the asterisk. Double quotes do not work.


On Windows?
How'd you do that?


___
fossil-users mailing list
fossil-users@lists.fossil-scm.org
http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users


Re: [fossil-users] Issue with crlf-glob *

2017-04-12 Thread Thomas

On 2017-04-12 23:24, Scott Robison wrote:

On Wed, Apr 12, 2017 at 2:10 PM, Thomas  wrote:

On 2017-04-12 18:01, Scott Robison wrote:


On Apr 12, 2017 10:31 AM, "Thomas" > wrote:

On 2017-04-09 02:19, Richie Adler wrote:

Thomas decía, en el mensaje "[fossil-users] Issue with crlf-glob
*" del
8/4/2017 17:46:14:

Does anyone know how to unveil the secret of getting the
mentioned
asterisk into the crlf-glob setting without consulting the
web interface?


For me, it works if I enter the asterisk as '*'.

I'm on Windows 7 Ultimate Build 7601 SP 1.

This is fossil version 2.2 [9612d43f93] 2017-03-18 14:10:13 UTC
Compiled on Mar 18 2017 13:48:53 using mingw32 (64-bit)


It's obviously not the version. It still doesn't work here.
This is fossil version 2.2 [a9d1d46f65] 2017-04-12 11:39:23 UTC
Compiled just now ...


Probably the difference between the Microsoft and MINGW run time
libraries.



Most likely, yes. That's pretty much the only option left now. ;)
Unless, of course, the provided exe at
https://www.fossil-scm.org/fossil/uv/download.html has not been built with
MSVC. If it's been built with MinGW we're back at square 1.

In my case, I got two working solutions now:
- Use "*," instead of just "*".
- Write the asterisk to .fossil-settings\crlf-glob directly (which I like
more).


I must have misread ... I thought you said you'd built with Visual C++
2015. Probably someone else.

When I am using the download from fossil-scm.org, I am able to use
single quotes to 'escape' the asterisk. Double quotes do not work.


I built with MSVC 2015, yes.


___
fossil-users mailing list
fossil-users@lists.fossil-scm.org
http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users


Re: [fossil-users] Issue with crlf-glob *

2017-04-12 Thread Thomas

On 2017-04-12 22:55, Ross Berteig wrote:


A very clean and lightweight build can be had from ./configure
--with-miniz --with-openssl=none


Oups, sorry. I overlooked that.

This is what I downloaded from 
https://www.fossil-scm.org/fossil/uv/download.html before I started 
using Fossil:

4,459,022 fossil.exe

This is what I built myself with MSVC 2015 a few hours ago:
2,799,616 fossil.exe

No idea what's the default but what I did before I built was to change 
two lines in Makefile.msc beforehand:

FOSSIL_BUILD_SSL = 1
FOSSIL_ENABLE_SSL = 1

Maybe my build is missing something I've yet to figure out.

___
fossil-users mailing list
fossil-users@lists.fossil-scm.org
http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users


Re: [fossil-users] Issue with crlf-glob *

2017-04-12 Thread Thomas

On 2017-04-12 23:24, Scott Robison wrote:

On Wed, Apr 12, 2017 at 2:10 PM, Thomas  wrote:

On 2017-04-12 18:01, Scott Robison wrote:


On Apr 12, 2017 10:31 AM, "Thomas" > wrote:

On 2017-04-09 02:19, Richie Adler wrote:

Thomas decía, en el mensaje "[fossil-users] Issue with crlf-glob
*" del
8/4/2017 17:46:14:

Does anyone know how to unveil the secret of getting the
mentioned
asterisk into the crlf-glob setting without consulting the
web interface?


For me, it works if I enter the asterisk as '*'.

I'm on Windows 7 Ultimate Build 7601 SP 1.

This is fossil version 2.2 [9612d43f93] 2017-03-18 14:10:13 UTC
Compiled on Mar 18 2017 13:48:53 using mingw32 (64-bit)


It's obviously not the version. It still doesn't work here.
This is fossil version 2.2 [a9d1d46f65] 2017-04-12 11:39:23 UTC
Compiled just now ...


Probably the difference between the Microsoft and MINGW run time
libraries.



Most likely, yes. That's pretty much the only option left now. ;)
Unless, of course, the provided exe at
https://www.fossil-scm.org/fossil/uv/download.html has not been built with
MSVC. If it's been built with MinGW we're back at square 1.

In my case, I got two working solutions now:
- Use "*," instead of just "*".
- Write the asterisk to .fossil-settings\crlf-glob directly (which I like
more).


I must have misread ... I thought you said you'd built with Visual C++
2015. Probably someone else.

When I am using the download from fossil-scm.org, I am able to use
single quotes to 'escape' the asterisk. Double quotes do not work.


I built with MSVC 2015, yes.


___
fossil-users mailing list
fossil-users@lists.fossil-scm.org
http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users


Re: [fossil-users] Issue with crlf-glob *

2017-04-12 Thread Thomas

On 2017-04-12 22:55, Ross Berteig wrote:


A very clean and lightweight build can be had from ./configure
--with-miniz --with-openssl=none


Oups, sorry. I overlooked that.

This is what I downloaded from 
https://www.fossil-scm.org/fossil/uv/download.html before I started 
using Fossil:

4,459,022 fossil.exe

This is what I built myself with MSVC 2015 a few hours ago:
2,799,616 fossil.exe

No idea what's the default but what I did before I built was to change 
two lines in Makefile.msc beforehand:

FOSSIL_BUILD_SSL = 1
FOSSIL_ENABLE_SSL = 1

Maybe my build is missing something I've yet to figure out.

___
fossil-users mailing list
fossil-users@lists.fossil-scm.org
http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users


Re: [fossil-users] Issue with crlf-glob *

2017-04-12 Thread Scott Robison
On Wed, Apr 12, 2017 at 2:10 PM, Thomas  wrote:
> On 2017-04-12 18:01, Scott Robison wrote:
>>
>> On Apr 12, 2017 10:31 AM, "Thomas" > > wrote:
>>
>> On 2017-04-09 02:19, Richie Adler wrote:
>>
>> Thomas decía, en el mensaje "[fossil-users] Issue with crlf-glob
>> *" del
>> 8/4/2017 17:46:14:
>>
>> Does anyone know how to unveil the secret of getting the
>> mentioned
>> asterisk into the crlf-glob setting without consulting the
>> web interface?
>>
>>
>> For me, it works if I enter the asterisk as '*'.
>>
>> I'm on Windows 7 Ultimate Build 7601 SP 1.
>>
>> This is fossil version 2.2 [9612d43f93] 2017-03-18 14:10:13 UTC
>> Compiled on Mar 18 2017 13:48:53 using mingw32 (64-bit)
>>
>>
>> It's obviously not the version. It still doesn't work here.
>> This is fossil version 2.2 [a9d1d46f65] 2017-04-12 11:39:23 UTC
>> Compiled just now ...
>>
>>
>> Probably the difference between the Microsoft and MINGW run time
>> libraries.
>
>
> Most likely, yes. That's pretty much the only option left now. ;)
> Unless, of course, the provided exe at
> https://www.fossil-scm.org/fossil/uv/download.html has not been built with
> MSVC. If it's been built with MinGW we're back at square 1.
>
> In my case, I got two working solutions now:
> - Use "*," instead of just "*".
> - Write the asterisk to .fossil-settings\crlf-glob directly (which I like
> more).

I must have misread ... I thought you said you'd built with Visual C++
2015. Probably someone else.

When I am using the download from fossil-scm.org, I am able to use
single quotes to 'escape' the asterisk. Double quotes do not work.
-- 
Scott Robison
___
fossil-users mailing list
fossil-users@lists.fossil-scm.org
http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users


Re: [fossil-users] Issue with crlf-glob *

2017-04-12 Thread Thomas

On 2017-04-12 22:55, Ross Berteig wrote:


On 4/12/2017 1:10 PM, Thomas wrote:

I might try MinGW as soon as I figured out how to buld Fossil with
MinGW/Cygwin. ;-)


I've been looking at the wildcard globbing from command line issue, and
the bottom line is that out of the box MinGW and MSVC both defer to the
Microsoft C Runtime Library to get argv[] initialized. There is a
mechanism available at link time to tell it not to glob before main() is
entered, but its complicated. No one is happy. Lots of shouting on
mailing lists. More yak shaving and bike shedding. Also, sadly, no
changes. It doesn't help that MS has been changing what they do in edge
cases from release to release, making it even harder to figure out what
to do to build code that does what you assume you wanted.


I believe there's got to be a balance between effort and outcome.

No one needs a washing machine if there's any other way of getting clean 
clothes, because that's what's required at the end of the day. The 
washing machine is just a tool. My preference would be to buy a magic 
wand that washes my socks. ;-)


I think the "*," solution is totally ok, as long as it's promoted in the 
documentation.




___
fossil-users mailing list
fossil-users@lists.fossil-scm.org
http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users


Re: [fossil-users] Issue with crlf-glob *

2017-04-12 Thread Ross Berteig


On 4/12/2017 1:10 PM, Thomas wrote:
I might try MinGW as soon as I figured out how to buld Fossil with 
MinGW/Cygwin. ;-)


On Windows 10 Pro 64-bit here, I still build fossil as a 32-bit exe with 
MinGW because there seems to be no need for 64-bit. I use the MinGW 
lightweight environment provided by MSYS. I've also salted in a bunch of 
otherwise handy classic *nix utilities built for Windows Console by the 
GnuWin32 project. (Sadly that project is not well maintained, but their 
downloads still exist. YMMV.)


From the MSYS bash prompt in an open fossil clone of fossil, I find 
that the standard recipe of "./configure ; make" works well to build it, 
as long as the right options are provided to configure.


A very clean and lightweight build can be had from ./configure 
--with-miniz --with-openssl=none


That will substitute miniz instead of zlib, which has the advantage for 
building that miniz is a single C file compiled and linked along with 
fossil. A full source kit to zlib is included in .../compat/zlib but it 
needs to be built separately before fossil can be configured and built 
with it.


The big downside with using miniz in your build is that there is an 
issue that prevents linking both OpenSSL and miniz. I have not chased 
the issue down, the workaround is simply to build and use real zlib 
instead. If you have invested in the effort to have the correct OpenSSL 
available, the marginal cost of getting zlib to build is negligible.


For a complete fossil with all the bells and whistles that work on 
windows I invoke configure as:


./configure --with-zlib=tree 
--with-openssl=C:/Programs/MinGW/msys/1.0/local/ssl --json --with-tcl 
--with-tcl-stubs --with-tcl-private-stubs --with-th1-docs --with-th1-hooks


Of course, you need to point configure at the correct location for SSL.

I normally build outside of the source tree, so the configure invocation 
is usually something like ../../fossil/configure


Built this way, my builds also pass the fossil test suite available by 
saying make test.


There are other ways to build on Windows, including using MinGW at a CMD 
prompt, or using Visual Studio's compiler instead. The "official" 
documentation is here:


  https://www.fossil-scm.org/index.html/doc/trunk/www/build.wiki


I've been looking at the wildcard globbing from command line issue, and 
the bottom line is that out of the box MinGW and MSVC both defer to the 
Microsoft C Runtime Library to get argv[] initialized. There is a 
mechanism available at link time to tell it not to glob before main() is 
entered, but its complicated. No one is happy. Lots of shouting on 
mailing lists. More yak shaving and bike shedding. Also, sadly, no 
changes. It doesn't help that MS has been changing what they do in edge 
cases from release to release, making it even harder to figure out what 
to do to build code that does what you assume you wanted.


--
Ross Berteig   r...@cheshireeng.com
Cheshire Engineering Corp.   http://www.CheshireEng.com/
+1 626 303 1602

___
fossil-users mailing list
fossil-users@lists.fossil-scm.org
http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users


Re: [fossil-users] Issue with crlf-glob *

2017-04-12 Thread Thomas

On 2017-04-12 18:01, Scott Robison wrote:

On Apr 12, 2017 10:31 AM, "Thomas" > wrote:

On 2017-04-09 02:19, Richie Adler wrote:

Thomas decía, en el mensaje "[fossil-users] Issue with crlf-glob
*" del
8/4/2017 17:46:14:

Does anyone know how to unveil the secret of getting the
mentioned
asterisk into the crlf-glob setting without consulting the
web interface?


For me, it works if I enter the asterisk as '*'.

I'm on Windows 7 Ultimate Build 7601 SP 1.

This is fossil version 2.2 [9612d43f93] 2017-03-18 14:10:13 UTC
Compiled on Mar 18 2017 13:48:53 using mingw32 (64-bit)


It's obviously not the version. It still doesn't work here.
This is fossil version 2.2 [a9d1d46f65] 2017-04-12 11:39:23 UTC
Compiled just now ...


Probably the difference between the Microsoft and MINGW run time libraries.


Most likely, yes. That's pretty much the only option left now. ;)
Unless, of course, the provided exe at 
https://www.fossil-scm.org/fossil/uv/download.html has not been built 
with MSVC. If it's been built with MinGW we're back at square 1.


In my case, I got two working solutions now:
- Use "*," instead of just "*".
- Write the asterisk to .fossil-settings\crlf-glob directly (which I 
like more).


I might try MinGW as soon as I figured out how to buld Fossil with 
MinGW/Cygwin. ;-)


___
fossil-users mailing list
fossil-users@lists.fossil-scm.org
http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users


Re: [fossil-users] Issue with crlf-glob *

2017-04-12 Thread Scott Robison
On Apr 12, 2017 10:31 AM, "Thomas"  wrote:

On 2017-04-09 02:19, Richie Adler wrote:

> Thomas decía, en el mensaje "[fossil-users] Issue with crlf-glob *" del
> 8/4/2017 17:46:14:
>
> Does anyone know how to unveil the secret of getting the mentioned
>> asterisk into the crlf-glob setting without consulting the web interface?
>>
>
> For me, it works if I enter the asterisk as '*'.
>
> I'm on Windows 7 Ultimate Build 7601 SP 1.
>
> This is fossil version 2.2 [9612d43f93] 2017-03-18 14:10:13 UTC
> Compiled on Mar 18 2017 13:48:53 using mingw32 (64-bit)
>

It's obviously not the version. It still doesn't work here.
This is fossil version 2.2 [a9d1d46f65] 2017-04-12 11:39:23 UTC
Compiled just now ...


Probably the difference between the Microsoft and MINGW run time libraries.
___
fossil-users mailing list
fossil-users@lists.fossil-scm.org
http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users


Re: [fossil-users] Issue with crlf-glob *

2017-04-12 Thread Thomas

On 2017-04-09 02:19, Richie Adler wrote:

Thomas decía, en el mensaje "[fossil-users] Issue with crlf-glob *" del
8/4/2017 17:46:14:


Does anyone know how to unveil the secret of getting the mentioned
asterisk into the crlf-glob setting without consulting the web interface?


For me, it works if I enter the asterisk as '*'.

I'm on Windows 7 Ultimate Build 7601 SP 1.

This is fossil version 2.2 [9612d43f93] 2017-03-18 14:10:13 UTC
Compiled on Mar 18 2017 13:48:53 using mingw32 (64-bit)


It's obviously not the version. It still doesn't work here.
This is fossil version 2.2 [a9d1d46f65] 2017-04-12 11:39:23 UTC
Compiled just now with MSVC 2015.

___
fossil-users mailing list
fossil-users@lists.fossil-scm.org
http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users


Re: [fossil-users] Issue with crlf-glob *

2017-04-09 Thread Thomas

On 2017-04-09 09:04, Thomas Schnurrenberger wrote:

You could make use of the "--args" option in Fossil:

$ echo *|fossil test-echo --args -


I have written a small wrapper for invoking Fossil without
expanding wildcards:

--- content of fng.cmd ---
@echo off
rem
rem Invoke Fossil without command line globbing.
rem 2014-08-03 Thomas Schnurrenberger
rem
setlocal
if "%~1" == "fossil" goto loop
rem
rem Invoke ourself and pass the output to fossil.
"%~f0" fossil %*|fossil --args -
goto leave
rem
rem Output each argument on a single line.
:loop
if "%~2" == "" goto leave
echo %~2
shift
goto loop
:leave
endlocal
--- end of content ---


This is a highly sophisticated solution ;-)
Thanks for sharing.


___
fossil-users mailing list
fossil-users@lists.fossil-scm.org
http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users


Re: [fossil-users] Issue with crlf-glob *

2017-04-09 Thread Thomas

On 2017-04-09 07:42, Artur Shepilko wrote:

You may try to add a comma to the the asterisk "*,"

fossil set crnl-glob *,

This used to work properly with cmd.exe, so it won't expand the * to a
file-name.

The crnl-glob Fossil setting allows a comma-separated list of glob patterns.
 "*," is effectively such list that also includes an empty pattern.


Thanks. This is a very good idea. It works with test-echo.

C:\fos>fossil test-echo *,
g.nameOfExe = [C:fos\fossil.exe]
argv[0] = [fossil]
argv[1] = [test-echo]
argv[2] = [*,]

___
fossil-users mailing list
fossil-users@lists.fossil-scm.org
http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users


Re: [fossil-users] Issue with crlf-glob *

2017-04-09 Thread Thomas Schnurrenberger
On 08.04.2017 22:46, Thomas wrote:
> C:\fos>fossil settings crlf-glob *.obj
> C:\fos>
> C:\fos>fossil settings crlf-glob *
> Usage: fossil settings ?PROPERTY? ?VALUE? ?-global?
> C:\fos>fossil settings crlf-glob * -global
> Usage: fossil settings ?PROPERTY? ?VALUE? ?-global?
> C:\fos>fossil settings crlf-glob "*"
> Usage: fossil settings ?PROPERTY? ?VALUE? ?-global?
> C:\fos>fossil settings crlf-glob "*" -global
> Usage: fossil settings ?PROPERTY? ?VALUE? ?-global?
> 
> Does anyone know how to unveil the secret of getting the mentioned
> asterisk into the crlf-glob setting without consulting the web interface?
> 

You could make use of the "--args" option in Fossil:

$ echo *|fossil test-echo --args -


I have written a small wrapper for invoking Fossil without
expanding wildcards:

--- content of fng.cmd ---
@echo off
rem
rem Invoke Fossil without command line globbing.
rem 2014-08-03 Thomas Schnurrenberger
rem
setlocal
if "%~1" == "fossil" goto loop
rem
rem Invoke ourself and pass the output to fossil.
"%~f0" fossil %*|fossil --args -
goto leave
rem
rem Output each argument on a single line.
:loop
if "%~2" == "" goto leave
echo %~2
shift
goto loop
:leave
endlocal
--- end of content ---

HTH

-- 
tsbg

___
fossil-users mailing list
fossil-users@lists.fossil-scm.org
http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users


Re: [fossil-users] Issue with crlf-glob *

2017-04-09 Thread Artur Shepilko
You may try to add a comma to the the asterisk "*,"

fossil set crnl-glob *,

This used to work properly with cmd.exe, so it won't expand the * to a
file-name.

The crnl-glob Fossil setting allows a comma-separated list of glob patterns.
 "*," is effectively such list that also includes an empty pattern.


On Sat, Apr 8, 2017 at 3:46 PM, Thomas  wrote:
> Hello,
>
> I recently started using Fossil. I got a Fossil server up on a Windows 8
> machine and my development box is Windows 7.
>
> Since Windows editors by default use CR/LF line endings I'd like to turn off
> this setting in Fossil.
>
> The page https://www.fossil-scm.org/xfer/help/settings says this:
>
> "crlf-globA comma or newline-separated list of GLOB patterns for
> (versionable)   text files in which it is ok to have CR, CR+LF or mixed
> line endings. Set to "*" to disable CR+LF checking.
> The crnl-glob setting is a compatibility alias.
>
> However, when I try this nothing happens, apart from Fossil telling me that
> something's wrong.
>
> C:\fos>fossil settings crlf-glob *.obj
> C:\fos>
> C:\fos>fossil settings crlf-glob *
> Usage: fossil settings ?PROPERTY? ?VALUE? ?-global?
> C:\fos>fossil settings crlf-glob * -global
> Usage: fossil settings ?PROPERTY? ?VALUE? ?-global?
> C:\fos>fossil settings crlf-glob "*"
> Usage: fossil settings ?PROPERTY? ?VALUE? ?-global?
> C:\fos>fossil settings crlf-glob "*" -global
> Usage: fossil settings ?PROPERTY? ?VALUE? ?-global?
>
> Does anyone know how to unveil the secret of getting the mentioned asterisk
> into the crlf-glob setting without consulting the web interface?
>
> Any help is highly appreciated.
> ___
> fossil-users mailing list
> fossil-users@lists.fossil-scm.org
> http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users
___
fossil-users mailing list
fossil-users@lists.fossil-scm.org
http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users


Re: [fossil-users] Issue with crlf-glob *

2017-04-08 Thread Thomas

On 2017-04-09 02:19, Richie Adler wrote:

Thomas decía, en el mensaje "[fossil-users] Issue with crlf-glob *" del
8/4/2017 17:46:14:


Does anyone know how to unveil the secret of getting the mentioned
asterisk into the crlf-glob setting without consulting the web interface?


For me, it works if I enter the asterisk as '*'.

I'm on Windows 7 Ultimate Build 7601 SP 1.

This is fossil version 2.2 [9612d43f93] 2017-03-18 14:10:13 UTC
Compiled on Mar 18 2017 13:48:53 using mingw32 (64-bit)


That's good news. Cheers!

I got this:
This is fossil version 2.1 [83e3445f67] 2017-03-10 17:07:08 UTC

That's the latest one from 
https://www.fossil-scm.org/fossil/uv/download.html .


From where might I be able to download a new one?

___
fossil-users mailing list
fossil-users@lists.fossil-scm.org
http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users


Re: [fossil-users] Issue with crlf-glob *

2017-04-08 Thread Richie Adler
Thomas decía, en el mensaje "[fossil-users] Issue with crlf-glob *" del
8/4/2017 17:46:14:

> Does anyone know how to unveil the secret of getting the mentioned 
> asterisk into the crlf-glob setting without consulting the web interface?

For me, it works if I enter the asterisk as '*'.

I'm on Windows 7 Ultimate Build 7601 SP 1.

This is fossil version 2.2 [9612d43f93] 2017-03-18 14:10:13 UTC
Compiled on Mar 18 2017 13:48:53 using mingw32 (64-bit)



___
fossil-users mailing list
fossil-users@lists.fossil-scm.org
http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users


Re: [fossil-users] Issue with crlf-glob *

2017-04-08 Thread Thomas

On 2017-04-08 23:00, Ross Berteig wrote:

Welcome to the strange and wonderful world of CMD.EXE's quoting rules.
Which differ between the interactive prompt and in a .BAT file (and in
some subtle ways .CMD files are yet different) too.


...and even between Windows versions. What worked on one version all of 
a sudden stops working after an upgrade. This is quite annoying but then 
most changes MS make/made to the command line interpreter in my opinion 
alwas change/changed to the better.




The command fossil test-echo * is passed the * by CMD, but as part of
the C runtime startup, it is expanding wildcards on the command line so
that fossil sees what it would see on a *nix box where the shell does
the wildcard expansion before any program runs.


I found some posts pointing to MinGW as being the culprit. However, some 
of them seem quite old.


Two examples:
http://stackoverflow.com/questions/33860141/windows-mingw-asterisk-passing-by-argv1-to-string
http://mingw.5.n7.nabble.com/Why-is-MinGW-escaping-the-command-line-arguments-td9791.html



1. Use fossil ui and the navigate to the settings page in the browser.
That will let you change the setting from the web form. This assumes you
have a browser and your firewall will allow it to talk to an arbitrary
port on localhost owned by a local process. Which should all be true.


I was thinking about this but it'd deafeat the single batch file option 
because it'll require one step more for each project.




2. Use the versionable settings. Say echo * > .fossil-settings/crlf-glob
then fossil add the settings file and check it in.


I had this in mind too. It's not off the list yet.
Since I'm having another issue with files being added to the repository 
although they're listed in the --ignore-glob parameter I'll have to 
investigate a bit more first.




3. Use MSYS bash to have a bash prompt with its different quoting rules.
With care, it is possible to use that to modify either global settings
or a specific repository.


Since the issue is in Fossil's startup code I'm not sure if this would help.



4. Use SQL to edit the setting into the repo file. Don't do this unless
you know what you are doing. The hint I'll provide is that the
repository is actually a SQLite database file. There is documentation.
But directly poking it is dangerous, so only try on a backup.


I've seen this too but I dismissed that idea because it'd either stop 
working if a single column is renamed in one of Fossil's future 
versions, or I'd have to carefully check every new version available and 
change the batch file if something's changed.


Thank you for your detailed reply.


___
fossil-users mailing list
fossil-users@lists.fossil-scm.org
http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users


Re: [fossil-users] Issue with crlf-glob *

2017-04-08 Thread Ross Berteig


On 4/8/2017 2:29 PM, Thomas wrote:


Thanks for this quick reply. I think I understand it now.
However, it's still quite weird.

C:\fos>fossil test-echo *
g.nameOfExe = [C:\fos\fossil.exe]
argv[0] = [fossil]
argv[1] = [test-echo]
argv[2] = [_FOSSIL_]
argv[3] = [fossil.exe]
argv[4] = [db.fossil]
argv[5] = [test.cmd]

Is this what it's supposed to look like?


Yes that is what fossil test-echo is supposed to do, but this shows that 
it expanded the * to file names. If it had been quoted right, you would 
have seen only entries for argv[0], argv[1], and argv[2].


Which is what I thought I saw when I did fossil test-echo "^*", but I 
was blinded by expectations and missed that it showed "^*" for argv[2] 
not "*".


So that doesn't work as expected.


test.cmd contains:
ECHO %1

When I run it:
C:\fos>test.cmd *

C:\fos>ECHO *
*

So, it works for test.cmd but not for Fossil. Strange.


Welcome to the strange and wonderful world of CMD.EXE's quoting rules. 
Which differ between the interactive prompt and in a .BAT file (and in 
some subtle ways .CMD files are yet different) too.


All is documented somewhere, but hard to find. I've spent several 
"pleasant" hours just reading the output of CMD/?, IF/?, CALL/?, 
START/?, and so forth. Often, important bits of trivia are only said in 
the help text for an obscure built-in command.


In fact, what is really happening is more complicated.

The command fossil test-echo * is passed the * by CMD, but as part of 
the C runtime startup, it is expanding wildcards on the command line so 
that fossil sees what it would see on a *nix box where the shell does 
the wildcard expansion before any program runs.


You can see this at the prompt with echo *, and echo ^* both which echo 
a single * character, because the echo command does not do any wildcard 
expansion.


I think this is an almost impossible platform-specific issue to fix. 
Most of the time, we want wildcards expanded. Rarely, we don't. 
Unfortunately, you've hit one of the rare cases.


There are two easy work-arounds.

1. Use fossil ui and the navigate to the settings page in the browser. 
That will let you change the setting from the web form. This assumes you 
have a browser and your firewall will allow it to talk to an arbitrary 
port on localhost owned by a local process. Which should all be true.


2. Use the versionable settings. Say echo * > .fossil-settings/crlf-glob 
then fossil add the settings file and check it in.


There are harder work-arounds.

3. Use MSYS bash to have a bash prompt with its different quoting rules. 
With care, it is possible to use that to modify either global settings 
or a specific repository.


4. Use SQL to edit the setting into the repo file. Don't do this unless 
you know what you are doing. The hint I'll provide is that the 
repository is actually a SQLite database file. There is documentation. 
But directly poking it is dangerous, so only try on a backup.


--
Ross Berteig   r...@cheshireeng.com
Cheshire Engineering Corp.   http://www.CheshireEng.com/
+1 626 303 1602

___
fossil-users mailing list
fossil-users@lists.fossil-scm.org
http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users


Re: [fossil-users] Issue with crlf-glob *

2017-04-08 Thread Thomas

On 2017-04-08 22:33, Ross Berteig wrote:

Try "^*":

C:...>fossil test-echo "^*"
g.nameOfExe = [C:\Programs\Bin\fossil.exe]
argv[0] = [fossil]
argv[1] = [test-echo]
argv[2] = [^*]


I've tried this too but as you can see in your example that didn't 
escape the asterisk but instead placed the caret and the asterisk in the 
parameter


argv[2] = [^*]



___
fossil-users mailing list
fossil-users@lists.fossil-scm.org
http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users


Re: [fossil-users] Issue with crlf-glob *

2017-04-08 Thread Scott Robison
On Apr 8, 2017 3:29 PM, "Thomas"  wrote:

On 2017-04-08 21:59, Richard Hipp wrote:

> On 4/8/17, Thomas  wrote:
>
>>
>> C:\fos>fossil settings crlf-glob *.obj
>> C:\fos>
>> C:\fos>fossil settings crlf-glob *
>> Usage: fossil settings ?PROPERTY? ?VALUE? ?-global?
>> C:\fos>fossil settings crlf-glob * -global
>> Usage: fossil settings ?PROPERTY? ?VALUE? ?-global?
>> C:\fos>fossil settings crlf-glob "*"
>> Usage: fossil settings ?PROPERTY? ?VALUE? ?-global?
>> C:\fos>fossil settings crlf-glob "*" -global
>> Usage: fossil settings ?PROPERTY? ?VALUE? ?-global?
>>
>> Does anyone know how to unveil the secret of getting the mentioned
>> asterisk into the crlf-glob setting without consulting the web interface?
>>
>
> This seems to be a windows shell thing.  On unix, you would just put
> the * inside single-quotes: '*' - but that appears not to work on
> windows.  I don't know the solution.
>
> A hint:  You can run
>
> fossil test-echo *
>
> to see what the command-line gets expanded to by the shell.  I haven't
> (yet) found a variation on this that does not expand the *.
>
> Anybody else?
>

Thanks for this quick reply. I think I understand it now.
However, it's still quite weird.

C:\fos>fossil test-echo *
g.nameOfExe = [C:\fos\fossil.exe]
argv[0] = [fossil]
argv[1] = [test-echo]
argv[2] = [_FOSSIL_]
argv[3] = [fossil.exe]
argv[4] = [db.fossil]
argv[5] = [test.cmd]

Is this what it's supposed to look like?

test.cmd contains:
ECHO %1

When I run it:
C:\fos>test.cmd *

C:\fos>ECHO *
*

So, it works for test.cmd but not for Fossil.


Windows (and DOS previously) include simple command prompts as compared to
posix. They do virtually no command line processing, leaving it to each
program to process the command as it wants. So Windows does pass the
asterisk to fossil. The C run time start up code expands the asterisk
before passing control to fossil's main function.
___
fossil-users mailing list
fossil-users@lists.fossil-scm.org
http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users


Re: [fossil-users] Issue with crlf-glob *

2017-04-08 Thread Ross Berteig



On 4/8/2017 1:59 PM, Richard Hipp wrote:

On 4/8/17, Thomas  wrote:

C:\fos>fossil settings crlf-glob *.obj
C:\fos>
C:\fos>fossil settings crlf-glob *
Usage: fossil settings ?PROPERTY? ?VALUE? ?-global?
C:\fos>fossil settings crlf-glob * -global
Usage: fossil settings ?PROPERTY? ?VALUE? ?-global?
C:\fos>fossil settings crlf-glob "*"
Usage: fossil settings ?PROPERTY? ?VALUE? ?-global?
C:\fos>fossil settings crlf-glob "*" -global
Usage: fossil settings ?PROPERTY? ?VALUE? ?-global?

Does anyone know how to unveil the secret of getting the mentioned
asterisk into the crlf-glob setting without consulting the web interface?

This seems to be a windows shell thing.  On unix, you would just put
the * inside single-quotes: '*' - but that appears not to work on
windows.  I don't know the solution.

A hint:  You can run

 fossil test-echo *

to see what the command-line gets expanded to by the shell.  I haven't
(yet) found a variation on this that does not expand the *.

Anybody else?



Try "^*":

C:...>fossil test-echo "^*"
g.nameOfExe = [C:\Programs\Bin\fossil.exe]
argv[0] = [fossil]
argv[1] = [test-echo]
argv[2] = [^*]

C:...>

The caret is supposed to be CMD.EXE's quote character analogous to 
/bin/sh's use of \, and I thought it worked anywhere and not just inside 
double quotes. But a bare ^* did not do what I expected at a CMD prompt.


The other trick for settings like crlf-glob is to use versionable 
settings for them. Then you get to edit a file rather than fighting with 
strange shell quoting rules. Just create the file 
.fossil-settings\crlf-glob in the root of your repository's workspace 
and put a single line in it containing the asterisk. Add the file and 
check it in and all should be well.



--
Ross Berteig   r...@cheshireeng.com
Cheshire Engineering Corp.   http://www.CheshireEng.com/
+1 626 303 1602

___
fossil-users mailing list
fossil-users@lists.fossil-scm.org
http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users


Re: [fossil-users] Issue with crlf-glob *

2017-04-08 Thread Thomas

On 2017-04-08 21:59, Richard Hipp wrote:

On 4/8/17, Thomas  wrote:


C:\fos>fossil settings crlf-glob *.obj
C:\fos>
C:\fos>fossil settings crlf-glob *
Usage: fossil settings ?PROPERTY? ?VALUE? ?-global?
C:\fos>fossil settings crlf-glob * -global
Usage: fossil settings ?PROPERTY? ?VALUE? ?-global?
C:\fos>fossil settings crlf-glob "*"
Usage: fossil settings ?PROPERTY? ?VALUE? ?-global?
C:\fos>fossil settings crlf-glob "*" -global
Usage: fossil settings ?PROPERTY? ?VALUE? ?-global?

Does anyone know how to unveil the secret of getting the mentioned
asterisk into the crlf-glob setting without consulting the web interface?


This seems to be a windows shell thing.  On unix, you would just put
the * inside single-quotes: '*' - but that appears not to work on
windows.  I don't know the solution.

A hint:  You can run

fossil test-echo *

to see what the command-line gets expanded to by the shell.  I haven't
(yet) found a variation on this that does not expand the *.

Anybody else?


Thanks for this quick reply. I think I understand it now.
However, it's still quite weird.

C:\fos>fossil test-echo *
g.nameOfExe = [C:\fos\fossil.exe]
argv[0] = [fossil]
argv[1] = [test-echo]
argv[2] = [_FOSSIL_]
argv[3] = [fossil.exe]
argv[4] = [db.fossil]
argv[5] = [test.cmd]

Is this what it's supposed to look like?

test.cmd contains:
ECHO %1

When I run it:
C:\fos>test.cmd *

C:\fos>ECHO *
*

So, it works for test.cmd but not for Fossil. Strange.


Cheers
Thomas

___
fossil-users mailing list
fossil-users@lists.fossil-scm.org
http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users


Re: [fossil-users] Issue with crlf-glob *

2017-04-08 Thread Richard Hipp
On 4/8/17, Thomas  wrote:
>
> C:\fos>fossil settings crlf-glob *.obj
> C:\fos>
> C:\fos>fossil settings crlf-glob *
> Usage: fossil settings ?PROPERTY? ?VALUE? ?-global?
> C:\fos>fossil settings crlf-glob * -global
> Usage: fossil settings ?PROPERTY? ?VALUE? ?-global?
> C:\fos>fossil settings crlf-glob "*"
> Usage: fossil settings ?PROPERTY? ?VALUE? ?-global?
> C:\fos>fossil settings crlf-glob "*" -global
> Usage: fossil settings ?PROPERTY? ?VALUE? ?-global?
>
> Does anyone know how to unveil the secret of getting the mentioned
> asterisk into the crlf-glob setting without consulting the web interface?

This seems to be a windows shell thing.  On unix, you would just put
the * inside single-quotes: '*' - but that appears not to work on
windows.  I don't know the solution.

A hint:  You can run

fossil test-echo *

to see what the command-line gets expanded to by the shell.  I haven't
(yet) found a variation on this that does not expand the *.

Anybody else?

-- 
D. Richard Hipp
d...@sqlite.org
___
fossil-users mailing list
fossil-users@lists.fossil-scm.org
http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users