Jump to content


Initial Workspace setup and depot connection

workspace depot

  • Please log in to reply
7 replies to this topic

#1 rmack@int-bio.com

rmack@int-bio.com

    Newbie

  • Members
  • Pip
  • 3 posts

Posted 01 May 2013 - 03:15 PM

So, I am just getting started and yes, I have RTFM (read the funny manual). Both the Admin and user ones as well as the getting started one.

None of them describes how one connects a depot to a workspace (or vice versa).  It seems to happen as if by magic.  There is certainly no "connect to this depot" place on the connection dialog in P4V.  There also appears to be no way to tell the workspace to connect to a different depot if you did it wrong.

SO, I have three depots in our freshly minted server.  They show up as below:
depot
Test_depot
Test_depot_2
streamsDepot

I have no idea whether I have done something stupid in setting up the depots because none of the 3 manuals I have read describe depot management in detail from a "how do I use depots for managing multiple projects" standpoint.

I suspect these types of information exist somewhere, but I haven't stumbled on them yet.

I want one workspace to connect to Test_depot and another one to connect to Test_depot_2. Inquiring minds want to know...

#2 P4GabeW

P4GabeW

    Advanced Member

  • Members
  • PipPipPip
  • 62 posts

Posted 01 May 2013 - 03:33 PM

You don't connect to a single depot, per se. You connect to the server the depots live on. The depots are then "connected" to by mapping them in the workspace mappings.

So, let's say your server is local, so the server port is localhost:1666 (the default is 1666, but that could have been remapped). When you first create a workspace against the server with the depots you're describing above, would create a default mapping (view) that looks like:

//depot/... //workspaceName/depot/...
//Test_depot/... //workspaceName/Test_depot/...
//Test_depot2/... //workspaceName/Test_depot2/...
//streamsDepot/... //workspaceName/streamsDepot/...

So in essence, you're "connecting" to all of them. To only see one of them, you'll need to remove the mapping lines for the depots you don't want. So for the client that you only want to see //depot, you would make the view look like:

//depot/... //workspaceName/depot/...

Stripping out the other three lines.

Do the same for the other workspaces, only mapping in the line that pertains to the depot you want to work in.

Does that make sense?

#3 Tank

Tank

    Advanced Member

  • Members
  • PipPipPip
  • 112 posts

Posted 01 May 2013 - 03:34 PM

Upon creating a workspace or editing an existing one, you should see a big box at the bottom of the dialog, this either displays a depot tree or an editable text box, depending on which icon is selected above this box (tree or paper).

From here you can select which depots you want in your worspace by right clicking on one, include/exclude tree | include/exclude files and so forth (you can also expand the tree to fine grain it). So you should be-able to create a worksapce with multiple combination of depots.

#4 Tank

Tank

    Advanced Member

  • Members
  • PipPipPip
  • 112 posts

Posted 01 May 2013 - 03:34 PM

Dangit! :)

#5 rmack@int-bio.com

rmack@int-bio.com

    Newbie

  • Members
  • Pip
  • 3 posts

Posted 01 May 2013 - 04:31 PM

So, can someone please do an "Admin Getting Started" document to match the one for users? (This one: http://www.perforce....v-gs/p4v-gs.pdf is for users and *not* for a brand new admin).

First let's assume some work flow:
1) I am an author in addition to my day job, so let's assume I am going to do some work on some downloaded code for a software defined radio called HPSDR.  I want a sandbox repository for all of my play around code and a release repository for stuff for my readers. Trust me. I don't want to mingle code from the two different repositories.
2) I do a fresh install of Perforce on my Linux box @ 192.168.0.10:1666
3) I use P4Admin.exe on my Windows box to connect to the freshly installed server. I create two depots named HPSDR_sandbox and HPSDR_release.   I also create my user name of "Dad".  I exit (or minimize) P4Admin.
4) I need to create a directory for my local workspace on my Windows machine, so I create a directory called C:\HPSDR.
4) I start up P4V. I fill in the server address in the dialog: 192.168.0.10:1666,  User: Dad, Workspace: C:\HPSDR.  Now I click OK.

I *think* this is where things are screwed up on the Perforce side.  I *HAVE NOT* created a workspace called HPSDR located at C:\HPSDR (despite what the dialog would have you believe).  Instead, I  have created a connection to an as yet unamed workspace.  I *think* the label on the text box of the connection dialog should say "Workspace Root Directory" or "Workspace Root Folder" depending on how long you have been doing software.  Us old farts still call them directories.

If I understand correctly, I need to do one more step outside of P4V and create the directories C:\HPSDR\HPSDR_sandbox and C:\HPSDR\HPSDR_release so I have the linkage between my depot names and my actual workspaces.  The names HPSDR_sanbox and HPSDR_release correspond to my depot names and are required for the files to be stored in the actual depots I created in P4Admin.

*NOW*, I can use "Connection->New Workspace..." to actually create a workspace.  Until I do this step I *think* I do not actually have a workspace in P4V.  It is at this step that I use the dialog to make a connection between the directory on my disk and the depot on the server.

So now I have two files that I want to store in my HPSDR_sandbox depot.  I want the directory structure to be DSP_folder\main.c and DSP_folder\makefile.  If I understand correctly I need to copy main.c and makefile into the path C:\HPSDR\HPSRD_sandbox\DSP_folder\main.c and C:\HPSDR\HPSRD_sandbox\DSP_folder\makefile.  At this point I can mark both files for ADD and do a submit to actually store them into my depot.  They will have names of DSP_folder\main.c and DSP_folder\makefile in the depot.


Is all of the preceding correct?  Can someone please put that in a document that is at the top level of the web page?

#6 P4GabeW

P4GabeW

    Advanced Member

  • Members
  • PipPipPip
  • 62 posts

Posted 01 May 2013 - 11:15 PM

Try this, it should help:

http://www.perforce....s-and-setup-p4v

A lot of it will likely be redundant, but it explains the pieces of workspaces, and  how they interact with the server.

#7 rmack@int-bio.com

rmack@int-bio.com

    Newbie

  • Members
  • Pip
  • 3 posts

Posted 02 May 2013 - 05:27 PM

Staff:

Very instructive and pretty normal stuff if you are a user who is connecting to an existing set of code base and doing work.

I will reiterate.  I have been unable to find any instructions for a brand new administrator on how he would go about populating an empty server with one or more depots.  I seem to recall somewhere that there is a root called "depot" and all project repositories are supposed to go under that.  However, I was able to create depots with other names, so I am not sure.

One other concept that I think I have gleaned is that the client view is "workspace->depot_name->project_root folder->file" rather than "depot_name->workspace->project_root_folder->file" .  "depot_name->project_root_folder->file" is what is actually stored in the server.  Correct?

#8 P4GabeW

P4GabeW

    Advanced Member

  • Members
  • PipPipPip
  • 62 posts

Posted 02 May 2013 - 07:14 PM

http://www.perforce....r-setup-windows ?

You mean that?

At around 4:15 or so, it talks about adding files into the server itself (earlier it talks about setting up the workspace to use in order to add files to the server for the first time).





Also tagged with one or more of these keywords: workspace, depot

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users