niftyplugins icon indicating copy to clipboard operation
niftyplugins copied to clipboard

Edit file doesn't seem to work for files outside the solution.

Open GoogleCodeExporter opened this issue 10 years ago • 8 comments

Open any file that's not part of the current solution and invoke p4edititem on 
it.




Original issue reported on code.google.com by [email protected] on 18 Jun 2009 at 4:42

GoogleCodeExporter avatar Mar 24 '15 05:03 GoogleCodeExporter

Original comment by [email protected] on 18 Jun 2009 at 4:42

  • Added labels: Priority-High
  • Removed labels: Priority-Medium

GoogleCodeExporter avatar Mar 24 '15 05:03 GoogleCodeExporter

Hmm, seems to work just fine for me. Waiting on more info from original bug 
reporter.


0: Scheduled p4.exe  -p quad:1666 -u Jim_Tilander -c QUAD edit 
"c:\work\perforce\Shared\AuroraTest\Test\Build\Win32\TestAuroraTest.sln"
0: p4.exe  -p quad:1666 -u Jim_Tilander -c QUAD edit 
"c:\work\perforce\Shared\AuroraTest\Test\Build\Win32\TestAuroraTest.sln"
//depot/main/Shared/AuroraTest/Test/Build/Win32/TestAuroraTest.sln#1 - opened 
for 
edit
1: Scheduled p4.exe  -p quad:1666 -u Jim_Tilander -c QUAD edit 
"c:\work\perforce\Shared\readme_new.txt"
2: Scheduled p4.exe  -p quad:1666 -u Jim_Tilander -c QUAD edit 
"c:\work\perforce\Shared\readme_new.txt"
2: p4.exe  -p quad:1666 -u Jim_Tilander -c QUAD edit 
"c:\work\perforce\Shared\readme_new.txt"
//depot/main/Shared/readme_new.txt#1 - opened for edit
1: p4.exe  -p quad:1666 -u Jim_Tilander -c QUAD edit 
"c:\work\perforce\Shared\readme_new.txt"
//depot/main/Shared/readme_new.txt#1 - opened for edit


Original comment by [email protected] on 23 Jun 2009 at 4:15

GoogleCodeExporter avatar Mar 24 '15 05:03 GoogleCodeExporter

Original comment by [email protected] on 23 Jun 2009 at 4:16

  • Added labels: Priority-Medium
  • Removed labels: Priority-High

GoogleCodeExporter avatar Mar 24 '15 05:03 GoogleCodeExporter

Odd, when I attempt to open a file from outside the solution for edit, nothing 
appears in the NiftyPerforce pane.

If I edit & save the read-only file with AutoCheckoutOnSave enabled, I get 
Visual 
Studio's Save As/Overwrite dialog.

I have tried with files under the solution directory but not part of the 
solution, 
and with files outside the solution directory.

I have tried with explicit client/port/user and with useSystemEnv

I have EnableBindings=False, autoAdd, autoCheckoutOnBuild, autoCheckoutOnSave, 
autoCheckoutProject=True, autoCheckoutOnEdit, autoDelete=False.

Running VS 2005, version 8.0.50727.867 (vsvista.050727-8600) with all current 
security patches.  Issue repros on XP & Win 7.

Would you like to know more?

Original comment by [email protected] on 28 Oct 2009 at 11:46

GoogleCodeExporter avatar Mar 24 '15 05:03 GoogleCodeExporter

Original comment by [email protected] on 29 Oct 2009 at 7:04

  • Added labels: Priority-Low
  • Removed labels: Priority-Medium

GoogleCodeExporter avatar Mar 24 '15 05:03 GoogleCodeExporter

[deleted comment]

GoogleCodeExporter avatar Mar 24 '15 05:03 GoogleCodeExporter

I'm also experiencing this issue with some XML files. They're present in the 
perforce depot, but all NiftyP4 commands (the "normal" Edit, Diff, etc. 
variants, not the solution browser EditFile, DiffFile, etc. ones) used with the 
file open are forwarded to the vcproj instead of the XML file. The vcproj 
receiving the command seems to be whichever one contains the currently selected 
file in the solution explorer.

Adding the XML file to a vcproj and then reopening the file in VS sees the 
commands properly being handled by the XML file. If the file is already open 
before it is added to the vcproj, but is not reopened upon adding it, then it 
still forwards the commands to the vcproj.

Using VS2008, without P4Win installed, if that changes anything.

Original comment by [email protected] on 14 Oct 2011 at 3:46

GoogleCodeExporter avatar Mar 24 '15 05:03 GoogleCodeExporter

Note to self:

ItemCommandBase.cs OnCommand() tries to resolve the filename through the project, instead of the document. Which means that it will just be the wrong filename if the document has a file opened that is not in the project. Doh. Should probably read up on how to get the proper filename. Note that this is if you do the document tab item checkout, but this code is still correct for the right click on the solution / project explorer checkout.

jtilander avatar Aug 06 '15 05:08 jtilander