Jump to content


P4VS randomly offers to mark files for delete in the Depot


  • Please log in to reply
11 replies to this topic

#1 pablo81

pablo81

    Advanced Member

  • Members
  • PipPipPip
  • 34 posts

Posted 10 May 2017 - 01:40 AM

I've seen that so many times that irritating P4VS dialog that pops up and randomly offers me to delete some files. Total perforce style WTF behavior.
Usually, it was one file, now I got this dialog that offers me to delete every file in my repo. WTF, how is that even possible?!

So, I asked my colleagues if they have any clue, and everybody say that they had that same random shit out the blue poping up. All of us already aware about that crap behavior from P4VS and if this happens it's when you use middle mouse click on a source file tab in VS to close some file.

Seriously, it's just hard to imagine how is that even possible to randomly popup a dialog asking to delete files?! What does P4VS does to randomly offer that. I'm freaking speechless.

Honestly, the only reason I install anything from P4 in visual studio is to avoid irritating read-only attributes that P4 adds to all files. Can you make an option in P4VS for people like me who do not want to even know that P4VS exists and don't want to EVER see any kind of dialogs from P4VS. I use P4V to manage stuff, to reconcile, shelve delete etc. Every other dev that I spoke to only needs that basic behavior, many don't even want anything from P4 in visual studio for that same reason.

Here's what I get now:

Posted Image

#2 Sambwise

Sambwise

    Advanced Member

  • Members
  • PipPipPip
  • 612 posts

Posted 10 May 2017 - 03:23 AM

View Postpablo81, on 10 May 2017 - 01:40 AM, said:

Honestly, the only reason I install anything from P4 in visual studio is to avoid irritating read-only attributes that P4 adds to all files.

Set "allwrite" in your client spec and all the files you sync will be writable.

Main downside of this is that it's easy to forget to open files for edit, but as long as you always use "reconcile" before you sync or submit you should be fine.

#3 pablo81

pablo81

    Advanced Member

  • Members
  • PipPipPip
  • 34 posts

Posted 11 May 2017 - 05:45 PM

View PostSambwise, on 10 May 2017 - 03:23 AM, said:

Set "allwrite" in your client spec and all the files you sync will be writable.

Thanks, I'll try that.

Regarding the original problem, I think I see how that can easily be reproduced. I have multiple branches checked out. In VS very often I search in specific directories and when I open branch B I was searching inside folder of branch A. So, I opened a file from branch A and when I close that file with mouse middle click P4VS offers me to delete this file. Just tried this, and it's not only middle click, regular Ctrl+F4 to close file offers me to delete it from p4 depot.

#4 Tsaukpaetra

Tsaukpaetra

    Newbie

  • Members
  • Pip
  • 7 posts

Posted 18 September 2017 - 03:40 AM

I have this issue consistently when using Entity Framework and saving/rebuilding the model. I believe this is because it's actually clearing out the model's generated classes though. My problem is that even if I say "Yes" to marking it as delete, the subsequent "Add" doesn't undo that action, and so they just stay marked as deleted instead of getting checked out.

#5 qwertzuio

qwertzuio

    Newbie

  • Members
  • Pip
  • 3 posts

Posted 07 November 2017 - 01:17 PM

See https://forums.perfo...n-closing-file/

#6 pekuja

pekuja

    Newbie

  • Members
  • Pip
  • 2 posts

Posted 29 August 2018 - 01:05 PM

I've been experiencing this same issue. I'm using P4VS 2018.3.168.2696 which I believe is the latest, P4V version 2018.2/1687764, and Visual Studio 2017 15.7.3.

The way I can reproduce this is to open a shelved file in Visual Studio by double clicking it in P4V, and then close the file in Visual Studio. It also seems like in some cases the dialog does not pop up, but instead P4VS silently reverts a bunch of my changes. This shows up in the "Perforce Source Control" output log inside Visual Studio as "->revert <path_to_file>". I actually lost some work yesterday due to this. I think it might be that I accidentally clicked "Yes" to the dialog first, and on subsequent times P4VS would just do the revert without asking me, but I'm not entirely sure if that's the case, but that's the way it seemed to behave on my later attempt at reproducing and examining the issue.

Right now I have a file XYZ.cpp with some changes that I have open in Visual Studio, and if I open any shelved file (doesn't have to be XYZ.cpp, though I do have a shelved version of it, too) from P4V, and then close it, P4VS reverts XYZ.cpp without asking. If I don't have XYZ.cpp open in Visual Studio when I close the shelved file, nothing out of the ordinary happens, though I think previously I had this happen on several files when I only had one of them open.

#7 p4bill

p4bill

    Advanced Member

  • Members
  • PipPipPip
  • 156 posts

Posted 29 August 2018 - 10:09 PM

View Postpekuja, on 29 August 2018 - 01:05 PM, said:

I've been experiencing this same issue. I'm using P4VS 2018.3.168.2696 which I believe is the latest, P4V version 2018.2/1687764, and Visual Studio 2017 15.7.3. The way I can reproduce this is to open a shelved file in Visual Studio by double clicking it in P4V, and then close the file in Visual Studio. It also seems like in some cases the dialog does not pop up, but instead P4VS silently reverts a bunch of my changes. This shows up in the "Perforce Source Control" output log inside Visual Studio as "->revert ". I actually lost some work yesterday due to this. I think it might be that I accidentally clicked "Yes" to the dialog first, and on subsequent times P4VS would just do the revert without asking me, but I'm not entirely sure if that's the case, but that's the way it seemed to behave on my later attempt at reproducing and examining the issue. Right now I have a file XYZ.cpp with some changes that I have open in Visual Studio, and if I open any shelved file (doesn't have to be XYZ.cpp, though I do have a shelved version of it, too) from P4V, and then close it, P4VS reverts XYZ.cpp without asking. If I don't have XYZ.cpp open in Visual Studio when I close the shelved file, nothing out of the ordinary happens, though I think previously I had this happen on several files when I only had one of them open.

The files that are being reverted... were they marked for add? I believe the dialog you are seeing appear is the delete files dialog, which will mark files for delete, or revert files that are marked for add.

With your repro steps, I might have found the bug. When a shelved file is opened in Visual Studio, it is opened as a temp file. When temp files are closed in the editor, Visual Studio triggers OnQueryRemoveFiles as if a file has been deleted - which in the case of temp files, it has. P4VS is then looking at currently selected files, and offering to delete them. Your XYZ.cpp must be selected in the editor or the solution explorer. If XYZ.cpp was marked for add, that would explain the revert (vs. mark for delete). If you could confirm that, we'd appreciate it.

Thanks for the feedback, we'll continue to investigate here.

#8 pekuja

pekuja

    Newbie

  • Members
  • Pip
  • 2 posts

Posted 30 August 2018 - 08:52 AM

View Postp4bill, on 29 August 2018 - 10:09 PM, said:

The files that are being reverted... were they marked for add? I believe the dialog you are seeing appear is the delete files dialog, which will mark files for delete, or revert files that are marked for add.

With your repro steps, I might have found the bug. When a shelved file is opened in Visual Studio, it is opened as a temp file. When temp files are closed in the editor, Visual Studio triggers OnQueryRemoveFiles as if a file has been deleted - which in the case of temp files, it has. P4VS is then looking at currently selected files, and offering to delete them. Your XYZ.cpp must be selected in the editor or the solution explorer. If XYZ.cpp was marked for add, that would explain the revert (vs. mark for delete). If you could confirm that, we'd appreciate it.

Thanks for the feedback, we'll continue to investigate here.

Well, oddly enough, the files were not marked for add, but just for edit. In fact, I had some files marked for add and some for edit, and only the edited files were reverted, while the added files were left alone.

#9 p4bill

p4bill

    Advanced Member

  • Members
  • PipPipPip
  • 156 posts

Posted 30 August 2018 - 06:52 PM

View Postpekuja, on 30 August 2018 - 08:52 AM, said:

Well, oddly enough, the files were not marked for add, but just for edit. In fact, I had some files marked for add and some for edit, and only the edited files were reverted, while the added files were left alone.

Thank you again for the feedback and details. We'll plan on releasing a patched 2018.3 version next week.

#10 anne101

anne101

    Newbie

  • Members
  • Pip
  • 1 posts

Posted 04 October 2018 - 06:10 PM

Hi, it appears my devs are hitting this bug as well even with the patched version.

Here's the report from the dev:
I opened ViewModel.h first (from the solution explorer) then navigated to BaseComponent.h. Then when I close BaseComponent.h, P4V plugin asks if I want to delete ViewModel.h (not even the file I was just closing)

They have P4VS version 2018.3.169.7626
And Visual Studio Pro 2015 version 14.0.25420.01 Update 3

#11 p4bill

p4bill

    Advanced Member

  • Members
  • PipPipPip
  • 156 posts

Posted 11 October 2018 - 06:45 PM

View Postanne101, on 04 October 2018 - 06:10 PM, said:

Hi, it appears my devs are hitting this bug as well even with the patched version.

Here's the report from the dev:
I opened ViewModel.h first (from the solution explorer) then navigated to BaseComponent.h. Then when I close BaseComponent.h, P4V plugin asks if I want to delete ViewModel.h (not even the file I was just closing)

They have P4VS version 2018.3.169.7626
And Visual Studio Pro 2015 version 14.0.25420.01 Update 3

Thank you for the details. We have reproduced the issue where our patch did not cover all workflows. An updated version should be available next week.

#12 p4bill

p4bill

    Advanced Member

  • Members
  • PipPipPip
  • 156 posts

Posted Yesterday, 04:18 PM

An updated version of P4VS (2018.3.171.5340) is now available.




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users