SimpsonGSD / P4EditVS

Simple, lightweight Visual Studio plugin to run various Perforce commands on files, such as checkout and revert. Includes optional auto-checkout feature.
https://marketplace.visualstudio.com/items?itemName=ScottSimpson.p4editvs
MIT License
32 stars 8 forks source link

Time lapse view should specify current line when possible #20

Closed tom-seddon closed 2 years ago

tom-seddon commented 2 years ago

When possible - so, definitely at least when invoked from an editor tab - invoke as p4vc -l LINE FILE. The -l flag opens the time lapse view with the given line highlighted, and also enables line numbers by default.

PR to hopefully follow at some point.

--Tom

tom-seddon commented 2 years ago

Is it easy to add stuff to the right click menu? image Looks like the line numbers column isn't clickable, so that's a shame.

Anyway, maybe this could be at least a partial solution for #11. Though the -l option only works for the first invocation for a given file. (p4vc will re-use the window for subsequent invocations, but the -l option doesn't work.) So not much fun if you want quick history for a bunch of lines.

--Tom

SimpsonGSD commented 2 years ago

Oh great, the original aim was to do this but I didn't know the commandline and got side tracked.

SimpsonGSD commented 2 years ago

Is it easy to add stuff to the right click menu? image Looks like the line numbers column isn't clickable, so that's a shame.

Anyway, maybe this could be at least a partial solution for #11. Though the -l option only works for the first invocation for a given file. (p4vc will re-use the window for subsequent invocations, but the -l option doesn't work.) So not much fun if you want quick history for a bunch of lines.

--Tom

It should be easy enough to add a right-click if you can find the correct ID, it will most likely start with IDM_VS_CTXT_. You can then add it to the command table (.vsct).

For #11 I was going to use p4 annotate which gets the revision/user/data/CL/etc for each line of the file. I just don't know the best way to integrate into the IDE that isn't intrusive and has zero performance impact.