No announcement yet.

P4V: beware the trailing space in argument list

  • Filter
  • Time
  • Show
Clear All
new posts

  • P4V: beware the trailing space in argument list

    I ran into something odd recently and just figured out the problem, so I thought I'd share. I set up BC4 to be the diff tool for P4V as outlined in the KB. But for some reason, whenever I diffed files, it opened like a 3-way merge. I finally discovered why: In the arguments box for the diff tool, there was a trailing space character so it was "%1 %2 " (without quotes). No space, normal diff view. Space, 3-way merge view. It happens with both the Windows & Linux versions. I don't know if it's a BC4 bug, a P4V bug, or expected behavior, but it was certainly confusing.
    I tested this using:
    • 4.2.4 (build 22795) on Windows 10 64bit
    • 4.2.10 (build 23938) on Windows 10 64bit
    • 4.2.3 (build 22587) on CentOS 7 64 bit

  • #2

    Spaces are generally used to separate parameters. If there is an extra space in P4V's definition, this might cause it to try and pass a third parameter rather than strip a trailing whitespace. You could use a program such as Process Explorer to then see exactly what was called to Bcomp.exe.
    Aaron P Scooter Software