-
Notifications
You must be signed in to change notification settings - Fork 53
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Files incorrectly opened for delete #52
Comments
@mjcrouch I thought about this some more. I actually think that there is a fundamental problem with the plugin. It should not be file watching the folders. It should, rather 'p4 delete' files if they are deleted from VS code explorer. I say this for a couple of reasons:
So my suggestion (and I will try and implement it) is to not use file watchers. But on adding a new file via vscode explorer we can 'p4 add' (if the option is checked) and deleting a file out of VS code explorer we will 'p4 delete' if the option is set. |
Indeed, this has been on my mind, I think you're right. The original PR back in 2015 doesn't have any particular justification for using the FileSystem watcher over the internal events (I have no idea if the events like It's hard to be sure whether there is anyone deliberately using this feature via the filesystem watcher. I've seen mentions from the original creator about using external tools to automate things externally, but this isn't really our responsibility as an IDE extension, and I think it is better to be more explicit / consistent* and restrict these automatic actions to things that have happened within the IDE Probably, the people negatively impacted by using a fs watcher is greater than the people positively impacted by it - and I'm trying not to worry too much about breaking niche use cases as a fork in the relatively early stages * since |
Hello - I have a potential prototype of the work here. I did a small amount of refactoring and some renaming to get some function names consistent (pet peeve). The tests seem to work, although I wasn't entirely sure if the integration tests were fully working or not. Wanted to maybe ask about those first before submitting pull request. In looking at the command code too, there is some other cleanup work that would be awesome to do (as the original code was using promises before the command limiter code was put in). Oh, it will require upgrade to vscode 1.42. The create and delete events are not available in 1.40 |
Looks good so far
Did you get a summary of test results at the end (depending on whether you ran them from npm or the launch config, they would be in the terminal or in the debug console)? IIRC it's around 166 passing and a few pending that I have as placeholders to do something about later. I don't think I've written any tests for the areas you've touched yet. Also it should automatically run the tests on Azure when you create a PR (even a draft one I think) so if you do have trouble we can see how it runs on there anyway
Didn't realise that - you also need to change Also added a comment to one line on the last commit about the revert followed by a delete
As I mentioned in #5 I'm planning to remove all of the calls to things like |
This was originally a bug reported by another dev here on the old fork. I am reposting here since you are actively maintaining this repo now :) Here is a link to the original bug post.
With deleteOnFileDelete:true, performing a sync in the P4V client will cause files that have been removed from the depot to now be marked as Open for Delete.
For example:
User A syncs to head revision on a folder.
User B deletes several files in that folder and then submits those deletes.
With VS Code open, User A now syncs to head revision on that same folder.
The files that User B deleted are now removed from User A's system, but VS Code detects that removal and marks those same files for delete. The files are no longer on disk, but the Default Changelist now has all of those deleted files showing up as open for delete.
I would expect VS Code to detect the removal of those files and then verify whether they have been intentionally removed before doing a second Open for Delete on a file that's already deleted.l,
Versions & Details:
Additional context
The text was updated successfully, but these errors were encountered: