This evening, Stefan Reichör wrote: > [EMAIL PROTECTED] (Edgar Gonçalves) writes: > >> Hi all! I've recently discovered the ongoing work on DVC, a few months after >> having tried non-CVS revision systems. So, after a lot of websurfing for >> information, and after trying tla and baz, I've come to the conclusion that >> for >> windows I would be better off with bzr or darcs. From here, I had to choose >> between the ability to use plink to access sftp servers (darcs), or have a >> nice, >> friendly emacs interface (bzr). So for now I'll stick with bzr! :) >> >> First of all, DVC with baz is working fine in windows. It's a great frontend! >> >> When I tried to use bzr, I started getting problems. First of all, since I >> use a >> native Windows emacs (and not cygwin's version), I can't use the bzr script >> (wich would call my native python with something like >> "/cygdrive/c/dev/python/scripts/bzr", and python won't find that cygwin path >> ever...). So I had to change bzr-executable to "bzr.bat" (also comes with the >> standard bzr distibution), but that's a minor fix. > > 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! -- Edgar Gonçalves Software Engineering Group @ INESC-ID IST/Technical University of Lisbon Rua Alves Redol, 9, Room 635 1000-029 Lisboa, Portugal mailto:[EMAIL PROTECTED] http://www.esw.inesc-id.pt/~eemg _______________________________________________ Xtla-el-dev mailing list [email protected] https://mail.gna.org/listinfo/xtla-el-dev
