Coder Social home page Coder Social logo

simpsongsd / p4editvs Goto Github PK

View Code? Open in Web Editor NEW
32.0 2.0 8.0 1.15 MB

Simple, lightweight Visual Studio plugin to run various Perforce commands on files, such as checkout and revert. Includes optional auto-checkout feature.

Home Page: https://marketplace.visualstudio.com/items?itemName=ScottSimpson.p4editvs

License: MIT License

C# 100.00%
sourcecontrol perforce visualstudio-extension visual-studio checkout p4v plugin vsix vsix-extensions visual-studio-marketplace

p4editvs's People

Contributors

bellicapax avatar simpsongsd avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

p4editvs's Issues

[Bug] Handling spaces in file path

Getting stderr: file(s) not on client when checking out/performing any actions on file paths with spaces in folder/file names.
Should work if we surround filePath in Commands with quotes ""?

P.S. Thank you! Was looking for a lightweight Perforce plugin and found this in the Visual Studio Marketplace! Love it!

Filepath Case Sensitivity

I've noticed in my Unreal Engine project that randomly, Visual Studio for some reason loses the case accuracy of the file path. I can see this even by right clicking on a file and selecting "Copy Full Path". Unfortunately, it looks like P4 command line is case sensitive for file paths. That means that sometimes, P4EditVS works fine... but at some point this breaks and it gives the error "file(s) not on client." when I try to perform any p4 operations and will continue this trend until I re-open the solution.

Is there possibly a way you could fix this by grabbing the correct casing for a given filepath from the disk?

Here's a fake example (my project is NDA).

Right:
D:\Something\v4.0\Project\Plugins\Private\StackCameraUtils.cpp

Wrong:
d:\something\v4.0\project\Plugins\Private\StackCameraUtils.cpp

Thanks
Ant

Time lapse view should specify current line when possible

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

Output window switches to P4EditVS when first written to and can be annoying

The output window swaps to P4EditVS's output pane when the solution settings are loaded.
As the plugin is async loaded it can take quite a while for it to be initialized meaning it can take focus in the middle of doing something such as building.

Try to see if there's a way to not take focus or initialize earlier if possible.

Can't dismiss revert dialog with Esc

This message box (and in fact any dialogs like it...) should have whatever flags added that mean the user can press Esc to get back to where they were, with no action taken.

image

No PR yet, but this is on my to do list.

--Tom

P.S. Visual Studio gets this wrong too!

image

"Open with P4V" creates a new P4V instance every time.

I think it would be better if this uses the existing instance of P4V instead of opening a new one. This could be a configurable option if needed, though I think making it use the existing instance by default would be best.

Feature Request: Collapse Item menu into sub-menu

Hey,

Thanks for the plugin!

I was wondering if you could provide an option for user to have all the per item p4editvs options under a submenu (the same way you do for the solution explorer).

Right now the p4editvs options nearly doubles the size of the menu.

So basically if we can do this (as an option, that would be greatly appreciated).

image

Diff uses P4V's diff tool even if a different diff tool is specified in P4V's preferences

Since this plugin is for visual studio, I wanted my diffs to also appear in visual studio, instead of opening in a seperate program. However, the diffs seem to always open using P4V's diff tool, even if I specify for them to use Visual Studios' diff tool in P4V's preferences.

P4EditVS should either allow configuration to open diffs in Visual Studio, or it should respect whatever is set in P4V preferences.

Support for folder workspaces

Hi! I love this extention, but sadly it doesn't work reliably with the 'open folder' feature. I was wondering if you could add support for this? Cheers!
image

Support for Visual Studio 2022

Please enable the support for VS 2022. The VS Beta is working pretty well, I miss a good Perforce extension :=)

Best regards
Alex

Add option to select change list

First of all Thanks for the addon,
When checking out a file, it will be great if you can add an option to
1- create a new changelist
2- select an existing changelist

Line history wanted

Is there any change that we can show line history by right-click the current line? Or make it a hint on current cursor position?

I guess it would be a popular feature if added.

Automatic connection to the last workspace

Hello!
First of all, I use Workspaces instead of 'Allow Environment' functionality. I noticed that when I specify workspace in settings, it successfully saves and after reload we can see it again. To work in certain workspace, I have to select it in Extensions -> P4EditVS -> [MyWorkspaceName]. But when I close my project and reopen it later, I notice that I still have to select it in Extensions (see screenshot below). It would be good if you add option 'Default Workspace on startup' which connects to specified workspace automatically on vs load (because I always set it manually)

image

Thank you!

VS2019 extension store can't find MPS 15.0

image
This dependency doesn't seem to be installable, either through the VIsual Studio Installer or otherwise. I've seen references to it on stack overflow in being an old dependency that's no longer important to include in the visx. Is there a workaround? VS2022 seems to work fine, but I need VS2019 available as well.

Checking out C# form .cs file doesn't check out .Designer.cs and .resx

If you go to check out something whose kind is GUID_ItemType_PhysicalFile, how about if P4EditVS checked out everything in its ProjectItems array (and recursively)? Looks like that would fix this case.

Maybe extend this for folders too? Feels like it'd perhaps end up too easy to check out too much.

Open in P4V fails with P4V 2024.1

In P4V 2024.1 with "bug fix" #119251, they changed the command line for the Open in P4V functionality. Rather than p4vc -s <file name> you must now use p4vc workspacewindow -s <file name> or you get a popup error message.

One upside of fixing this is you can close #36 as this is the new behavior.

For completeness, here is the note from the P4V revision history:

#119251 (Change #2555854)
'p4v -s', and 'p4v -t' now tells you to run 'p4vc workspacewindow -s', or 'p4vc
workspacewindow -t'. The workspacewindow provides the same functionality as
running P4V. If you run 'p4vc workspacewindow -s ' and a
workspacewindow is already running connected to that client, it brings the
application to the foreground and selects that file in either the workspace or
depot tree instead of opening a second window.

Extension can cause save as dialog to appear even though file is checked out

Reported on marketplace:

Using ctrl+s to save can frequently cause the file save as dialog to appear even when the file is checked out.
Disabling the extension does stop this from occurring.

Environment:

  • Windows 11, up-to-date
  • Microsoft Visual Studio Community 2022 (64-bit) - Current Version 17.8.1
  • P4V Rev. P4V/NTX64/2023.3/2495381
  • Project is checked out with default settings (e.g. read-only means not checked out, etc).

Open in P4V command does not use .p4config when Use Environment is selected

It's being reported that even though Use Environment is selected in one solution it is not using the .p4config file to get the correct P4 environment.

  • I tried a different solution, and it also crashed. Got an error message from perforce in the process:
    Path 'e:\perforce\new_solution\new_file.cpp/...' is not under client's root 'D:\dev\perforce\original_solution'.
    Both solutions have a .p4config set up, and Use Environment is true, so I guess the environment variables are pointing at original_solution or something? Shouldn't it use .p4config though?

Originally posted by @Malrog in #21 (comment)

Specify CL for newly checked out/marked files.

It would be nice to have the option to select from my existing pending CLs when prompted for check out/add/delete, and have the file added to that CL (similar to how p4vs does it). This could also provide the option to create a new CL, although that's a lesser QoL feature.

An alternative to this would be to have an 'active' CL that the user can define (perhaps on a toolbar or via a menu), and then all check out/add/delete operations will use that CL. This would be an improvement on p4vs, which prompts for CL every single time. ๐Ÿ˜…

Crash when using Open in P4V

As reported on the VS marketplace, I'm getting a crash when I use Open in P4V on a file in my solution (.h or .cpp). P4V opens up fine, and selects the appropriate file but almost immediately after, VS locks up, and about 10s later force closes and reloads the solution. I'm then informed that
image

I'm using VS Pro 2019 (Version 16.9.6). It crashes whether I use Open in P4V on the tab context menu, or on the main menu option. I do not have it set up as a keyboard shortcut. I enabled devenv logging, but annoyingly nothing appeared in the log.

Happy to help debug this, if needed.

Toolbar request

It would be nice if P4EditVS came with a Toolbar. I know it's possible to create your own (and have done so, see picture below) but then if I am on a different machine I don't have it automatically when I install the extension. One possible suggestion for the layout of the toolbar is to put the 'text-only' items in a sub menu:
image
I have also grouped the 'operates on this file' options separately from the 'alternate views of this file' options, hence the separator to the left of the 'History' icon.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.