[patch] convert: gnu arch source for convert extension

Patrick Mézard pmezard at gmail.com
Tue Feb 5 00:57:29 CST 2008


Adrian Buehlmann a écrit :
> On 04.02.2008 19:49, Bryan O'Sullivan wrote:
>> Aleix Conchillo Flaqué wrote:
>>
>>> I recently sent an email with a GNU Arch source for the convert
>>> extension.
>> A few smallish comments and questions:
>>
>>> diff -N -r -u crew.orig/hgext/convert/common.py crew/hgext/convert/common.py
>>> --- crew.orig/hgext/convert/common.py	2008-02-03 16:47:03.000000000 +0100
>>> +++ crew/hgext/convert/common.py	2008-02-03 17:19:56.000000000 +0100
>>> @@ -227,7 +227,7 @@
>>>              except TypeError:
>>>                  pass
>>>          cmdline = [util.shellquote(arg) for arg in cmdline]
>>> -        cmdline += ['<', util.nulldev]
>>> +        cmdline += ['2>', util.nulldev, '<', util.nulldev]
>>>          cmdline = ' '.join(cmdline)
>>>          self.ui.debug(cmdline, '\n')
>>>          return cmdline
>> Patrick (or some other Windows person), will this cause problems on Windows?
>>
> 
> According to:
> 
> http://technet.microsoft.com/en-us/library/bb490982.aspx
> 
> -- which describes command redirection operators for Windows XP -- '2>' is
> correct syntax for redirecting std error on Windows XP:

The syntax is correct and I don't think it will cause more troubles here. Fact is util.popen already appends this redirection to work around some weird python popen behaviour under Windows, see util.popen comments for more details.


More information about the Mercurial-devel mailing list