Loading ...
Sorry, an error occurred while loading the content.

Issue 127 in vim: TFS Plugin Broken by latest VIM

Expand Messages
  • vim@...
    Status: New Owner: ---- Labels: Type-Defect Priority-Medium New issue 127 by lukemaul...@gmail.com: TFS Plugin Broken by latest VIM
    Message 1 of 8 , Apr 9, 2013
    • 0 Attachment
      Status: New
      Owner: ----
      Labels: Type-Defect Priority-Medium

      New issue 127 by lukemaul...@...: TFS Plugin Broken by latest VIM
      http://code.google.com/p/vim/issues/detail?id=127

      What steps will reproduce the problem?
      1. Download the VIM executable provided by vim.org for Windows (7.3.46)
      2. Install the plugin to work with TFS:
      http://www.vim.org/scripts/script.php?script_id=3808
      3. Verify that TFS functions operate as expected (checkout, status, etc..)
      4. Download the latest VIM source code (currently 7.3.884) and compile
      using MSVC 2012.
      5. Replace the VIM 7.3.46 .exe file with the .exe versioned 7.3.884
      6. Verify that the TFS functions do not work. They show in the command bar
      like they are executing but they do not execute.

      What is the expected output? What do you see instead?
      I expect the TFS plugin to work like it does in VIM version 7.3.46. The
      plugin has been broken by 7.3.884

      What version of the product are you using? On what operating system?
      Versions 7.3.46 and 7.3.884 on Windows 7 X64. Both versions of VIM are
      compiled for 32 bit and all other plugins work as expected.

      Please provide any additional information below.
      I attempted to use the VIMScript debugger to debug the scripts but I am a
      relatively new VIM user and so I wasn't able to accurately determine the
      problem.


      --
      You received this message because this project is configured to send all
      issue notifications to this address.
      You may adjust your notification preferences at:
      https://code.google.com/hosting/settings

      --
      --
      You received this message from the "vim_dev" maillist.
      Do not top-post! Type your reply below the text you are replying to.
      For more information, visit http://www.vim.org/maillist.php

      ---
      You received this message because you are subscribed to the Google Groups "vim_dev" group.
      To unsubscribe from this group and stop receiving emails from it, send an email to vim_dev+unsubscribe@....
      For more options, visit https://groups.google.com/groups/opt_out.
    • vim@...
      Comment #1 on issue 127 by fritzoph...@gmail.com: TFS Plugin Broken by latest VIM http://code.google.com/p/vim/issues/detail?id=127 ... In general this will
      Message 2 of 8 , Apr 9, 2013
      • 0 Attachment
        Comment #1 on issue 127 by fritzoph...@...: TFS Plugin Broken by
        latest VIM
        http://code.google.com/p/vim/issues/detail?id=127

        > 4. Download the latest VIM source code (currently 7.3.884) and compile
        > using MSVC 2012.
        > 5. Replace the VIM 7.3.46 .exe file with the .exe versioned 7.3.884

        In general this will not work as well as you hope. There are a lot
        of "runtime" files, including syntax scripts, standard plugins,
        documentation, and more which are also part of the 7.3.884 source code. You
        will have none of these if you just copy over the executable.

        > 6. Verify that the TFS functions do not work. They show in the command
        > bar like they are executing but they do not execute.

        Can you give a specific command (exact key sequence if a mapping), and the
        specific output you expected, and what you got instead?

        One possible source of the problem MIGHT be a few changes that were done
        somewhere in those 884 patches to make shell quoting work by default in
        most cases on Windows. Check that your 'shellxquote' and 'shellcmdflag'
        and 'shell' and 'shellescape' options are set appropriately (in most cases
        they should remain at the default).

        Without knowing the specific command you tried, and what actually gets
        executed, there's not much way to debug this.

        Have you tried contacting the plugin maintainer? They can probably debug
        the problem easier than most others.

        --
        You received this message because this project is configured to send all
        issue notifications to this address.
        You may adjust your notification preferences at:
        https://code.google.com/hosting/settings

        --
        --
        You received this message from the "vim_dev" maillist.
        Do not top-post! Type your reply below the text you are replying to.
        For more information, visit http://www.vim.org/maillist.php

        ---
        You received this message because you are subscribed to the Google Groups "vim_dev" group.
        To unsubscribe from this group and stop receiving emails from it, send an email to vim_dev+unsubscribe@....
        For more options, visit https://groups.google.com/groups/opt_out.
      • vim@...
        Comment #2 on issue 127 by antoine....@gmail.com: TFS Plugin Broken by latest VIM http://code.google.com/p/vim/issues/detail?id=127 Instead of mixing some
        Message 3 of 8 , Apr 9, 2013
        • 0 Attachment
          Comment #2 on issue 127 by antoine....@...: TFS Plugin Broken by
          latest VIM
          http://code.google.com/p/vim/issues/detail?id=127

          Instead of mixing some files of the 7.3.046 distribution with a newly
          compiled executable, you should use a consistent set, for instance the
          Windows installer available as the newest entry at
          http://sourceforge.net/projects/cream/files/Vim/ which Vim-list old-timers
          have dubbed "Vim without Cream". It is currently at patchlevel 7.3.829 but
          it includes a consistent set of runtime files. Also, it is a Win32
          executable but it will run on a Win64 machine too, and its shorter word
          length should not give you problems except with extremely voluminous files
          (2 GiB or more, let's say) or computations involving extremely big integers
          (more than 2147483647 in absolue value; floating-point numbers, OTOH, are
          the same on both architectures).

          Before installing it, you may want to remove, with all its contents,
          the "vim73" directory containing your existing installation (but not
          the "vim" directory above it).

          And like Ben Fritz said, try to contact the script maintainer.


          Best regards,
          Tony.
          --
          ERIC IDLE PLAYED: THE DEAD COLLECTOR, MR BINT (A VILLAGE NE'ER-DO -WELL VERY
          KEEN ON BURNING WITCHES), SIR ROBIN, THE GUARD WHO DOESN'T
          HICOUGH BUT TRIES TO GET THINGS STRAIGHT, CONCORDE (SIR
          LAUNCELOT'S TRUSTY STEED), ROGER THE SHRUBBER (A
          SHRUBBER),
          BROTHER MAYNARD
          "Monty Python and the Holy Grail" PYTHON (MONTY) PICTURES
          LTD


          --
          You received this message because this project is configured to send all
          issue notifications to this address.
          You may adjust your notification preferences at:
          https://code.google.com/hosting/settings

          --
          --
          You received this message from the "vim_dev" maillist.
          Do not top-post! Type your reply below the text you are replying to.
          For more information, visit http://www.vim.org/maillist.php

          ---
          You received this message because you are subscribed to the Google Groups "vim_dev" group.
          To unsubscribe from this group and stop receiving emails from it, send an email to vim_dev+unsubscribe@....
          For more options, visit https://groups.google.com/groups/opt_out.
        • vim@...
          Comment #3 on issue 127 by lukemaul...@gmail.com: TFS Plugin Broken by latest VIM http://code.google.com/p/vim/issues/detail?id=127 I downloaded the latest
          Message 4 of 8 , Apr 25, 2013
          • 0 Attachment
            Comment #3 on issue 127 by lukemaul...@...: TFS Plugin Broken by
            latest VIM
            http://code.google.com/p/vim/issues/detail?id=127

            I downloaded the latest Win64 build from Haroogan
            (https://bitbucket.org/Haroogan/64-bit-vim-builds-for-windows-64-bit/downloads)
            which is at patch level 7.3.761. I tried the TFS plugin and the plugin
            still does not work.
            I checked 'shellxquote', 'shellcmdflag', 'shell', and 'shellescape' and
            those are not mentioned in my _vimrc file.
            I tried contacting the plugin author but I have received no response. The
            command puts the following text at the bottom of my VIM window (see
            screenshot) but the file is not actually checked out from TFS.
            I have verified that the file path is correct and if I execute this command
            from a Windows command line, the file is correctly checked out from TFS:
            C:\Projects\TFS\NCN -
            Other\MRASystem\Main\Go\src\mrawebtoolboxext>"E:\Programs\VisualStudio2012\Common7\IDE\TF.exe"
            checkout "C:\projects\tfs\ncn -
            other\mrasystem\main\go\src\mra\logger\logger.go"



            Attachments:
            VIMScreenshot.png 10.6 KB

            --
            You received this message because this project is configured to send all
            issue notifications to this address.
            You may adjust your notification preferences at:
            https://code.google.com/hosting/settings

            --
            --
            You received this message from the "vim_dev" maillist.
            Do not top-post! Type your reply below the text you are replying to.
            For more information, visit http://www.vim.org/maillist.php

            ---
            You received this message because you are subscribed to the Google Groups "vim_dev" group.
            To unsubscribe from this group and stop receiving emails from it, send an email to vim_dev+unsubscribe@....
            For more options, visit https://groups.google.com/groups/opt_out.
          • vim@...
            Comment #4 on issue 127 by fritzoph...@gmail.com: TFS Plugin Broken by latest VIM http://code.google.com/p/vim/issues/detail?id=127 It looks like the plugin is
            Message 5 of 8 , Apr 25, 2013
            • 0 Attachment
              Comment #4 on issue 127 by fritzoph...@...: TFS Plugin Broken by
              latest VIM
              http://code.google.com/p/vim/issues/detail?id=127

              It looks like the plugin is manually escaping quote characters in the
              command with ^, which with default settings Vim will now do automatically
              as-needed.

              It looks like the format of commands that run are:

              ! start /min cmd /c path/to/tool.exe ^"tool arguments^"

              or, depending on the command or specific settings, I'm not sure which:

              r!cmd /c "path/to/tool.exe ^"tool arguments^""

              "Does not work" means very little. What specific output do you get when you
              try to run a command that fails?

              I don't have TFS installed, and the plugin invokes a big chain of functions
              to execute any command, so I tried the second command format with the 'dir'
              command, as follows:

              new
              r!cmd /c "dir /b ^"C:\Program Files^""

              Doing this gives me:
              E485: Can't read file C:/Users/btfritz/AppData/Local/Temp/VIoF289.tmp

              If I remove the ^ characters (because Vim's default settings are now set up
              for these not to be needed anymore), I get a directory listing as I expect:

              :new
              r!cmd /c "dir /b "C:\Program Files""

              For now you can try removing the ^ escaping from the commands in the
              plugin. You should contact the plugin maintainer to let him know his plugin
              needs adjustment for Vim's new default shellxquote and shellxescape
              settings.

              Note that ^" isn't actually a valid escape to include a quote within a
              quote. The quotes also prevent special meanings of characters, so the
              plugin was arguably wrong in the first place:

              C:\>echo ^^
              ^
              C:\>echo ^"
              "
              C:\>echo "^""
              "^""

              --
              You received this message because this project is configured to send all
              issue notifications to this address.
              You may adjust your notification preferences at:
              https://code.google.com/hosting/settings

              --
              --
              You received this message from the "vim_dev" maillist.
              Do not top-post! Type your reply below the text you are replying to.
              For more information, visit http://www.vim.org/maillist.php

              ---
              You received this message because you are subscribed to the Google Groups "vim_dev" group.
              To unsubscribe from this group and stop receiving emails from it, send an email to vim_dev+unsubscribe@....
              For more options, visit https://groups.google.com/groups/opt_out.
            • vim@...
              Comment #5 on issue 127 by lukemaul...@gmail.com: TFS Plugin Broken by latest VIM http://code.google.com/p/vim/issues/detail?id=127 Removing the ^ worked
              Message 6 of 8 , Apr 27, 2013
              • 0 Attachment
                Comment #5 on issue 127 by lukemaul...@...: TFS Plugin Broken by
                latest VIM
                http://code.google.com/p/vim/issues/detail?id=127

                Removing the ^ worked great, thank you. Was this a change to VIM's
                behavior?

                --
                You received this message because this project is configured to send all
                issue notifications to this address.
                You may adjust your notification preferences at:
                https://code.google.com/hosting/settings

                --
                --
                You received this message from the "vim_dev" maillist.
                Do not top-post! Type your reply below the text you are replying to.
                For more information, visit http://www.vim.org/maillist.php

                ---
                You received this message because you are subscribed to the Google Groups "vim_dev" group.
                To unsubscribe from this group and stop receiving emails from it, send an email to vim_dev+unsubscribe@....
                For more options, visit https://groups.google.com/groups/opt_out.
              • vim@...
                Comment #6 on issue 127 by fritzoph...@gmail.com: TFS Plugin Broken by latest VIM http://code.google.com/p/vim/issues/detail?id=127 ... ...sort of. It s a
                Message 7 of 8 , Apr 29, 2013
                • 0 Attachment
                  Comment #6 on issue 127 by fritzoph...@...: TFS Plugin Broken by
                  latest VIM
                  http://code.google.com/p/vim/issues/detail?id=127

                  > Removing the ^ worked great, thank you. Was this a change to VIM's
                  > behavior?

                  ...sort of.

                  It's a change in the DEFAULT behavior.

                  Previously something like this:

                  "C:\Program Files\MyApp\myapp.exe" "some arguments"

                  Would get executed directly in cmd.exe with no escaping or anything, which
                  the wonderful world of quoting in Windows cmd.exe would interpret as:

                  C:\Program Files\MyApp\myapp.exe" "some arguments

                  Which would obviously fail because "C:\Program" is not an executable
                  program (and probably doesn't even exist as a directory).

                  The plugin you are using dates from when this was still the default
                  behavior and is probably the only workaround that worked for the author at
                  the time. However, as I pointed out, I have no idea why it worked, because
                  it was wrong anyway. You can't escape quotes within quotes in Windows.

                  Anyway, Vim changed over a series of changes, each one less broken than the
                  last, to actually execute something like this in the cmd.exe shell for the
                  example I give above:

                  (^"C:\Program Files\MyApp\myapp.exe^" ^"some arguments^")

                  This works in almost every use case, although another thread recently found
                  something strange going on with parentheses between quotes or something
                  like that.

                  Support was also added to execute something like this instead, but it's not
                  the default, and I'm not actually sure what it fixes:

                  "(^"C:\Program Files\MyApp\myapp.exe^" ^"some arguments^")"

                  Remember how I said that escaping quotes within quotes won't work? You
                  might wonder why the above works. Well...cmd.exe will always strip off the
                  first and last quote in a line that begins and ends with a quote. So it's
                  actually like those aren't even there. Again though, I don't remember the
                  details. I think we ended up with defaults that work *almost* all the time
                  but still fail in specific less-common scenarios.

                  It's probably easier to do as some plugin authors do, and just build a .bat
                  script in a temp file and execute that, so you don't need to worry about
                  quoting.

                  --
                  You received this message because this project is configured to send all
                  issue notifications to this address.
                  You may adjust your notification preferences at:
                  https://code.google.com/hosting/settings

                  --
                  --
                  You received this message from the "vim_dev" maillist.
                  Do not top-post! Type your reply below the text you are replying to.
                  For more information, visit http://www.vim.org/maillist.php

                  ---
                  You received this message because you are subscribed to the Google Groups "vim_dev" group.
                  To unsubscribe from this group and stop receiving emails from it, send an email to vim_dev+unsubscribe@....
                  For more options, visit https://groups.google.com/groups/opt_out.
                • vim@...
                  Updates: Status: Invalid Comment #7 on issue 127 by chrisbr...@googlemail.com: TFS Plugin Broken by latest VIM
                  Message 8 of 8 , Sep 30, 2014
                  • 0 Attachment
                    Updates:
                    Status: Invalid

                    Comment #7 on issue 127 by chrisbr...@...: TFS Plugin Broken by
                    latest VIM
                    https://code.google.com/p/vim/issues/detail?id=127

                    (No comment was entered for this change.)

                    --
                    You received this message because this project is configured to send all
                    issue notifications to this address.
                    You may adjust your notification preferences at:
                    https://code.google.com/hosting/settings

                    --
                    --
                    You received this message from the "vim_dev" maillist.
                    Do not top-post! Type your reply below the text you are replying to.
                    For more information, visit http://www.vim.org/maillist.php

                    ---
                    You received this message because you are subscribed to the Google Groups "vim_dev" group.
                    To unsubscribe from this group and stop receiving emails from it, send an email to vim_dev+unsubscribe@....
                    For more options, visit https://groups.google.com/d/optout.
                  Your message has been successfully submitted and would be delivered to recipients shortly.