Win32 Command Quoting

Patrick Mézard pmezard at gmail.com
Thu Dec 14 16:25:53 CST 2006


Hello,
I have run into shell command quoting issues with extdiff under win32 
and wrote a patch to fix it at ui.system() level. Should I post it or 
are there any reasons preventing such a thing to be brought into main 
until now ?

I am asking this because I have seen at least one similar effort to be 
ignored or rejected in the past. It was a bit different because the 
patch was applied at extension level instead of system() call but the 
roots were clearly identified 
(<http://article.gmane.org/gmane.comp.version-control.mercurial.devel/8728/match=windows+quote>). 
What I did is to detect the case where the Win32 shell behaves 
differently and add extra quotes to prevent it, before calling system().

The main drawback of this approach is it would break code already 
working around this issue at extension level.

What do you think about it ?

--
Patrick Mézard


More information about the Mercurial-devel mailing list