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

Reply via email to