Giter Site home page Giter Site logo

vscode-perforce's People

Contributors

egamma avatar forgottenski avatar hoovercj avatar howardcvalve avatar ihalip avatar jel-massih avatar joaomoreno avatar pjdanfor avatar ralberts avatar stef-levesque avatar tw1nk avatar vrachels 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  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  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

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

vscode-perforce's Issues

Resolve real path

I have linked files in my project folder whose paths are not in perforce depot, so p4 edit command is not effect, please resolve the symlink path to real path by executing commands

Login/connect to a Perforce server using username/password

The extension keeps denying any request with this error message:

Perforce Log Output
p4.exe info
ERROR:
Error: Command failed: p4.exe print -q -o "C:\Users...\AppData\Local\Temp\tmp-....." "c:\p4......"
c:\p4...... - must create client 'my-computer-name' to access local files.

VS Code SCM Provider

This is an FYI message - fell free to close....

Hello,

Thanks for creating and extension for VS Code, we have now added an API for VSCode to enable pluggable SCM Providers. This is currently in the 'preview' state and only in the 'insiders' build. Our plan is to move this into 'stable' in our next release (early April 17).

This lays the foundation for rich SCM Extensions to be distributed through the marketplace. These extensions will have access to all of the features our Git support leverages (this itself is now only using the public API).

Our ASK If you are interested in helping create an SCM provider, we want to help you and have created a new repo with all of the required details including - timelines, instructions, sample implementations, ... https://github.com/Microsoft/vscode-SCMBuilders

Head on over there if you want to help to get going or to monitor progress - with any luck in the coming months we should have a set of high quality SCM providers for VS Code.

Sean
VS Code Team Member

Unable to login to perforce

Hey,

I am trying to use this integration for perforce which seems very handy!

Unfortunately I can't get it working. At all.

When I try to login to perforce via vscode I get this error message:
Perforce: Command failed: p4 login

However, from the same folder if I open a terminal and type 'p4 login', then enter the same password it succeeds.

Any ideas what is going on here?

Add quotes around file paths passed to commands

Currently the commands do not work properly if there are spaces in the file paths. Please add quotes around the paths that are passed to executed perforce commands.

This has worked in earlier versions, at least in 0.1.8 where the quotes were added to all paths, but the functionality has apparently broken in the refactoring done for the latest 1.0.0 version.

Add keyboard shortcuts to p4 diff

::RFE::
There is no option of setting keyboard shortcuts for going back and forth when using perforce diff in visual studio code.
This enhancement would be very useful, since using mouse to click on top right corner arrows is not practical at all, and all diff tools have this one implemented either via Fx keys or Ctrl+1/2 combo.

Watch for file status change

When a file is changed and then committed using p4v, the file in the editor still have change marks:
image

They don't go away even if I close the file and reopen.
They are removed only when I close and reopen vscode.

VSCode Engine 1.11.1 causes npm install error

I updated to the v1.11.1 and ran npm install and got this:

node ./node_modules/vscode/bin/install

Detected VS Code engine version: ^1.11.1
Found minimal version that qualifies engine range: 1.11.1
Fetching vscode.d.ts from: https://raw.githubusercontent.com/Microsoft/vscode/1.11.1/src/vs/vscode.d.ts
Error installing vscode.d.ts: Error: Request returned status code: 404
Details: 404: Not Found

File is not under client's root

Possibly a conflict with the sublime perforce plugin, but I can seem to get the edit command to work.

I get the following:

p4.exe edit "c:\Users\snarehanger\Documents\Development\project\proj\js\v2\components\elements\MultiFileUploader.jsx"

ERROR:
Path 'c:\Users\snarehanger\Documents\Development\project\proj\js\v2\components\elements\MultiFileUploader.jsx' is not under client's root 'c:\Users\snarehanger\AppData\Roaming\Sublime Text 3\Packages\User'.

Possibly a p4 configuration issue, but any ideas on this?

Show warning when checking out outdated file

Currently you don't get any warning when you edit an outdated file. This is sometimes annoying, because one has to merge after editing the file. When getting a warning with a "get latest revision" button one could avoid this.

As solution one could diff current revision against revision on head with p4 fstat -T "headRev" %file and p4 fstat -T "haveRev" %file.

add p4 change support

with -m max support and is configurable as option perforce.changes.max.
(optional) It can be overridden in command palette.

Support for "Add Changelist"

I can only move files to another already existing changelist. It would be great to be able to create a new changelist.

Changelists appear twice

Changelists appear twice, but the changed files sit in only a single changelist. See screenshot:

vscode bug

Option to open file editor from Source Control sidebar.

I would like to easily open a file listed in the source control sidebar in a default editing window rather than a diff view.

Could you please add a config option to make this the default behaviour or alternatively open the editor with a modifier key + left click or middle click or something.

Thanks

Suggestion: Allow extension to work without opening folder

Right now you have to open a folder to allow the extension to work at all due to it's use of the per workspace configurations. It would be nice to be able to use this extension with random files that I've opened that aren't in a folder I currently have open.

Seems like you could do this in a pretty straightforward way by having a set of global settings that were able to be overridden by the local workspace settings (if set by the user for that workspace).

Error on opening huge file

There's an error when openning a huge file (740KB, 25000+ lines):

ERROR:
Error: stdout maxBuffer exceeded
p4.exe opened "xxxxxx.cpp"

Project based settings

Hi
i'm using your tool everyday but there is this little thing that I either don't understand or not available.
We typically use new clients and port settings for every project,
So we have files called .p4config that contains:
P4PORT=:
P4CLIENT=

could you tool detect these files and use these settings so when we jump from one project to another
we do not need to start VSCode with new settings?

Otto

p4 sync

Morning! Really enjoy using this at the workplace, so thanks for this.

Is there a reason why the p4 sync command hasn't been included? If no reason, happy to dev and pull it in.

Thanks,
Christian

Submit Default Changelist

This is a feature request to be able to directly submit the default changelist.

Checked out items are currently added to the default changelist, but there is no immediate way to submit those changes. The workflow required is to:

  • create a new "named" changelist
  • move checked out items of interest to the "named" changelist
  • submit the "named" changelist

This feature should allow:

  • "one click submit" of the default changelist...this is add the little check-marky submit button which will immediately submit the default changelist
  • adding a description to the default changelist before submission should be optional, it defeats the "one click submit" nature to require an added description...perhaps this can be options driven
  • a keyboard shortcut for "submit default changelist" would be desirable

The combination of these three behaviors would allow for very fast iterative development in appropriately equipped environments.

Option to ignore files outside of p4 root

I use vscode for editing files both within a p4 root and external to it. Because I'm lazy I have it configured like this:

// Automatically open a file for edit when saved
"perforce.editOnFileSave": true,

// Automatically open a file for edit when Modified
"perforce.editOnFileModified": true,

// Automatically Add a file to depot when Created
"perforce.addOnFileCreate": true,

// Automatically delete a file from depot when deleted
"perforce.deleteOnFileDelete": true,

which is awesome while under a p4 root, and super-annoying outside of it. Would an option to ignore errors if not under a p4 root be possible?

I experimented with setting those all to false by default and just overriding in a .vscode/settings.json file, but I would need to add that all over my projects for that to work since vscode doesn't seem to walk up the directory structure to find settings.

Running a file intensive operation in workspace leads to lots of duplicate changelists

vscode: 1.11.2
vscode-perforce: 2.0.1

Running an operation that creates a large number of files (for example a local build) inside the perforce workspace causes the extension to rapidly refresh the pending changelists. What I think happens is that multiple refreshes are done in parallel and this leads to lots of duplicate changelists that don't disappear when manually refreshing.

Example:
image

In this screenshot, the only changelist that has an opened file is the actual default changelist, all the other ones are "ghosts".

Changelist selection

Hey!

It would be really-really useful if we could select a changelist, or set a default changelist where deleted/edited files go

Thank you very much!

Perforce diff when using keyboard shortcuts doesn't work

But works when selecting diff from the command palette. Thanks, great plugin.

Error output in the perforce window

ERROR:
Error: Command failed: p4.exe print -q -o "C:\Users\MYUSER\AppData\Local\Temp\tmp-RANDOMFILENAME" "c:\local\path\to\my\file#[object Object]"
Invalid revision number '[object Object]'.

p4 annotate invalid option -u

Currently vscode-perforce runs: p4 annotate -qu <file>

Results in invalid option -u.

Use the latest version of p4v (2017.1) which comes with p4 (2016.2) and it does not have this flag.

Where do you get the p4 2017.1 version?

Is there a way to exclude the -u so it can work with this version of p4?

deleteOnFileDelete:true marks files as deleted if deleted from Windows Explorer

I'm using VSCode 1.11.2 with vscode-perforce 2.0.1.

Reproduction case:

  • Enable perforce.deleteOnFileDelete. Restart VS Code to ensure the option is honored.
  • Open a folder that's tracked by Perforce with VSCode. Expand the tree view to reveal files.
  • Also open that folder in the Windows Explorer.
  • From the Windows Explorer window, delete one file that's visible in VSCode's tree view.
  • Observe that the file was marked as deleted in the P4 workspace's default changelist.

This might be intended behavior, but I'd only expect vscode-perforce to mark as deleted the files that I'm explicitly deleting from within VSCode (especially since re-creating those files does not re-add them).

Enhancement: "p4 edit" on Save

It would be nice to be able to automatically "p4 edit" a file on saving rather than manually running the command.

Should be very easy when a presave event gets added to the api. I'd be happy to add it.

microsoft/vscode#239

Automatically uncheck file after undoing latest changes

This ia suggestion for when perforce.editOnFileModified is true.

Imagine opening a file that is not yet checked out in a changelist and you start modifying it and afterwards save the changes. The file is now automatically checked out and put in the default changelist.

Now keep doing CTRL+Z in VSCcode until all changes are undone and the document is exactly the same as it was before. The perforce plugin should automatically detect this and also revert/uncheck the file out of the changelist.

Incompatibile with Source Depot

So far I have found two major incompatibilities wiith source depot (aka SD, the internal microsoft fork of perforce).

Problem: SD doesn't support login, it simply uses windows authentication, so the login checks always return false and nothing gets executed.
My workaround: I commented out the body of "isLoggedIn" and just return true instead.
Possible Solution: Provide a "skipLogin" config option. When that is true, "isLoggedIn" always returns true.

Problem: SD doesn't support ztags.
My workaround: I've considered rewriting some regexes as a proof of concept fix, but I haven't done it yet.
Possible Solution: Provide a "useZtags" config option that defaults to true and follows current code paths. When false, it can leave off the ztag parameter and I can write some extra parsing functions to get the output into the correct shape to be compatible with the rest of the program (if possible).

Error: ENOENT: no such file or directory, uv_cwd

I get following error while running any node related command like npm -v, npm install, gulp -v:

path.js:424
    var path = (i >= 0) ? arguments[i] : process.cwd();
                                                 ^
Error: ENOENT: no such file or directory, uv_cwd
    at Error (native)
    at Object.posix.resolve (path.js:424:50)
    at Function.Module._resolveLookupPaths (module.js:263:17)
    at Function.Module._resolveFilename (module.js:330:31)
    at Function.Module._load (module.js:290:25)
    at Module.require (module.js:367:17)
    at require (internal/module.js:16:19)
    at /usr/local/lib/node_modules/npm/bin/npm-cli.js:26:13
    at Object.<anonymous> (/usr/local/lib/node_modules/npm/bin/npm-cli.js:76:3)
    at Module._compile (module.js:413:34)

Add ability to select perforce client in settings

I have multiple perforce clients and would like to be able to select which perforce client a project uses, rather then create a new client. It would be great to have a setting for this, E.G. "perforce.clientName" which I could use to override the clientname.

I tried changing "perforce.command" to "p4.exe -c " but it gives an error because the value of command gets wrapped with double quotes.

To select a client you would pass -c as an argument to p4.exe.

Perforce.editOnFileSave workspace setting not working as expected.

  • VSCode Version: 1.1.0
  • OS Version: Windows 7

Steps to Reproduce:

  1. Open User settings, set "perforce.editOnFileSave": true,
  2. Restart VS Code
  3. Edit file in workspace
  4. Save
  5. File is write protect, VS Code asks if you want to overwrite, save or discard.

Additional information:
The file mentioned above can be checked out using the plugin menu, manually.
_editOnFileModified _ is working as expected.

Thanks for the plugin, it's been really helpful.

Andy.

What is the reason to do `export namespace XYZ`?

I'm considering to contribute to the code so I want to understand the code first.

Is there a reason for that?

It seems like it is extra to me because at consumption you do

import {PerforceCommands} from './PerforceCommands'

It is the same if you remove the namespace and import as:

import * as PerforceCommands from './PerforceCommands'

// or better
import { registerCommands } from './PerforceCommands'

export function activate(...) {
  registerCommands()
}

Performance Concerns

Almost every action clears the resource list and does a complete refresh.

Some changes such as moving a file to a new changelist, marking a file for "edit", etc. could be handled by updating the resources data structure without a refresh.

Also, the overall performance seems very slow. A refresh on my machine takes ~20 seconds whereas using refresh in a standalone tool we have takes less than 10.

perforce.editOnFileSave appears to be successful, but error message is still shown

OS: Linux Mint 18.1
vscode: Version 1.11.2
vscode-perforce: 2.0.1

Other extensions: ms-vscode.cpptools, msjsdiag.debugger-for-chrome, dbaeumer.vscode-eslint, eg2.tslint

I have "perforce.editOnFileSave": true and when I make a simple modification (like adding a newline) into a file that is not checked out, it will be checked out into the default changelist as expected. I can see the change I made when I check the diff.

However, vscode still shows a message saying the file is write-protected:
image

Honor .p4ignore for delete

I have node_modules ignored (of course), but when I update a package, it tries to run p4.exe delete <file in node_modules>.

With perforce.deleteOnFileDelete turned on.

Information Message

I think it would be a good idea to replace the information message with a statusbar message, because it's annoying to always click the appearing message box.
So instead of:
showInformationMessage("blabla")
you could use:
setStatusBarMessage("blabla", 3000) //Statusbar message that disappears after 3 seconds.

Can no longer use edit command since 1.0

Since the 1.0 update the edit command no longer works. The icon also doesn't correctly reflect the file's status any more.

Using p4 edit from the command line still works the same.

This was not an issue in the previous version.

Show confirmation and refresh source control panel on Changelist submitted

Currently, the only way to see that a changelist has been correctly submitted is by checking the Perforce Logs. It would be useful some kind of visual feedback according to the result of the submit command.

Moreover, a just submitted changelist still appear in the source control panel, even clicking the refresh button. To get rid of that you have to check out a file for editing or reload the whole vscode window.

Check for change based on project root

# workspace
- main
- branches
  - branchA
  - branchB

vscode is opening the folder main, branchA, or branchB
The changelist would be more functional if it shows only the changes under the opened folder, not the whole workspace.

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.