[EMAIL PROTECTED] (Edgar Gonçalves) writes:

>> Is bzr.bat on the search path? Or do you have to specify the full path?
>> If bzr.bat is on the search path, we could set the bzr-executable to bzr.bat
>> on windows.
> Yep, both bzr.bat and bzr is on the search path. The problem was only on how
> 'sh' passes the script name to python. 
>>
>>> The big problem was after that, I kept getting an error when launching some
>>> bzr-* command. I traced the problem to the command creation. Apparently, 
>>> "sh"
>>> doesn't like commands like "\"path/bzr.bat\" \"status\"". So I changed the
>>> command creation, and it's working like a charm (for the basic tests I
>>> made). Here's the changed function:
>>>
>>> (defun dvc-build-dvc-command (dvc list-args)
>>>   "Build a shell command to run DVC with args LIST-ARGS.
>>> DVC can be one of 'baz, 'xhg, ...
>>> Works for sh.exe under a windows (enabling the call of native programs)."
>>>   (let ((executable (dvc-variable dvc "executable")))
>>>     (replace-regexp-in-string "\""
>>>                           ""
>>>                           (mapconcat 'shell-quote-argument
>>>                                      (cons executable
>>>                                            (delq nil list-args))
>>>                                      " "))))
>>
>> Shouldn't the replacement string (after replace-regexp-in-string) be "\\"" 
>> instead of "\""?
>>
>> So your patch converts "\"path/bzr.bat\" \"status\"" to "path/bzr.bat status"
>> Is this correct?
>
> Well, I've been using this patched function since my first post, and it 
> works! I
> think it's because the `executable' is evaluated before passed to
> `replace-regexp-in-string'. This way, the executable is '"path/bzr.bat"
> "status"', and the internal " are removed. At least this was my 
> interpretation,
> but then again, I'm no elisp guru! :)
>
>>
>>>
>>> I hope this can help dvc to get a few more Windows customers :)
>>> Cheers!
>>
>> It would be nice, if dvc runs well on windows.
> Like a charm. I'm using it successfully with both baz and bzr, now!

Could you please try [EMAIL PROTECTED]/dvc--dev--0--patch-181
It should set the bzr-executable to bzr.bat and dvc-build-dvc-command should
work now out of the box.


Stefan.

_______________________________________________
Xtla-el-dev mailing list
[email protected]
https://mail.gna.org/listinfo/xtla-el-dev

Reply via email to