Jump to content


P4vs difficulties

P4vs

  • Please log in to reply
2 replies to this topic

#1 Henrichostino

Henrichostino

    Newbie

  • Members
  • Pip
  • 2 posts

Posted 23 February 2015 - 01:43 PM

Hello,

I am trying to make p4scc and p4vs work on the same machine (because some users want to work with the last p4vs version and others dont want to migrate to this addin...)  

I added a button in visual studio which remove p4scc files and set the current add in to p4vs, it is working fine except that you have to manually open a connection in the project once you've migrated it with my button.)
Is it possible to open this connection in command line ? (every data are stored in the p4 environment var)

#2 P4Shimada

P4Shimada

    Advanced Member

  • Members
  • PipPipPip
  • 831 posts

Posted 03 March 2015 - 10:57 PM

Hi,

To login from a command line you can use global options like the following example:

  p4 -p perforce:1666 -u vs_user1 -c windowapp1 login

where the port, user and client are set with the global option flags -p, -u and -c.


- 'p4 login'
http://www.perforce....f/p4_login.html

- Global Options
http://www.perforce....al.options.html

Have you tried the following P4VS Perforce -> Connections settings?  In Visual Studio 2010, go to the menu Tools -> Options -> Source Control -> Perforce - Connections.
  • The options under Perforce-Connections are as follows:
    • When opening a project under source control (radio buttons):
      • Show the Perforce Connection dialog
      • Connect to the server using my most recent settings
      • Connect to the server using solution-specific settings
      • Connect to the server u sing my Perforce environment settings
  • Opening and closing connections (checkboxes):
    • Use IP-specific tickets when loggin in
    • Automatically log off when closing a connection
In P4SCC, if you do not want to go through many Open Connection dialogs, you can do the following:
  • In .NET, choose Tools > Options > Source Control > SCC Provider > Advanced > Connection Tab then select "Bind to the workspace that matches your Perforce environment settings" and close the IDE.
  • From the Command Prompt in the directory, or directory above the solution, set your Perforce environment variables (P4USER, P4CLIENT and so on) using the following commands:
    • p4 set P4USER=<Perforce user>
    • p4 set P4CLIENT=<Perforce client workspace>
    • p4 set P4PORT=<Perforce server:port>


#3 Henrichostino

Henrichostino

    Newbie

  • Members
  • Pip
  • 2 posts

Posted 31 March 2015 - 03:49 PM

Hello again,
My first post was not very clear, I will try to explain again what I want to do programatically with the two following snapshots :
http://imgur.com/0mobNgV
http://imgur.com/hrY1pA6

So basically, I want to do the same thing that is happening when I am clicking on file \ open connection to a perforce depot and then ok on the new window that is appearing. Every data are stored in the perforce environment variable that is why I only have to click ok on the second window.

Is it possible to do the exact same thing programatically ? Without it I cannot do what I want to do...

I already did everything that you mentionned in options, but I still need to do this thing programatically, it cannot be avoided to do what I have to do.

I hope you will know how to do it.
Best regards





0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users