Path escaping error in Hglog in Windows

Create issue
Issue #19 resolved
Former user created an issue

Environment: gvim 7.4 in Windows XP Steps: :Hglog Expected: display hg log Instead: display wrong path like "C:\Documents "

I guess the long path "C:\Documents and Settings" is not correctly escaping.

Thanks.

lawrencium is an awesome script!

Comments (3)

  1. Gareth Phillips

    I had this problem as well. It looks like the problem is that the log style file name gets escaped twice. It is escaped once in read_lawrencium_log using the shellescape command, and again in HgRepo.GetCommand, which adds quotation marks around any argument which contains spaces. So the final style file name ends up with two sets of quotes around it, which does not escape anything.

    For me just removing the shellescape calls from read_lawrencium_log was enough to fix the problem.

  2. Ludovic Chabant repo owner

    Sorry, I remember looking at that issue initially, and not being able to reproduce it, but I totally forgot to post back asking for more feedback. I tried reproducing it with the source file in a folder with spaces, instead of Lawrencium itself being in a folder with spaces, which is where you get the bug! Big thanks to Gareth for the solution, it's now submitted: https://bitbucket.org/ludovicchabant/vim-lawrencium/commits/b051b81cc3650708d6e233f3a4318d1d9afcad90 Cheers, and sorry again for forgetting about this!

  3. Log in to comment