Jump to content


How to add a new project to a server? Currently single depot single project...


  • Please log in to reply
9 replies to this topic

#1 roberteker

roberteker

    Member

  • Members
  • PipPip
  • 14 posts

Posted 13 February 2019 - 12:16 PM

I really don't want to mess this up, so I thought I'd ask first.

Here's how my current Perforce setup looks:

Capture.PNG

Now I wish to add a project to the same server, without disturbing the existing depot/workspaces.

What's the exact procedure to do this?

I also suspect the current project is just named "depot" instead of its proper project name (that is only visible in the individual workspaces, it seems)...

#2 Sambwise

Sambwise

    Advanced Member

  • Members
  • PipPipPip
  • 784 posts

Posted 13 February 2019 - 05:24 PM

Run:

p4 depot NEWPROJECTNAME

That will make a new depot ("project?") called NEWDEPOTNAME.

There isn't a concept of a "project" as such in Perforce; a project is just a set of files, and you might choose to group the files in a project in a top level folder within one depot, a subfolder (with the parent folder representing some other level of organization, like a codeline), depots within a repository, or you might even give each project its own repository (so that it has its own change numbers and can be completely isolated from other projects).  In your case it sounds like each project corresponds to a depot, though, so you just want to run "p4 depot" to make a new one.

#3 roberteker

roberteker

    Member

  • Members
  • PipPip
  • 14 posts

Posted 19 February 2019 - 02:32 PM

Thanks!

Turns out my old project was named "depot" on the server, now that I have two.

Anyway, now that I've done that, and created a new workspace pointing to the existing project that I want to add, I get "file(s) not in client view" whenever I try to add files.

Why is that?

#4 Sambwise

Sambwise

    Advanced Member

  • Members
  • PipPipPip
  • 784 posts

Posted 19 February 2019 - 03:56 PM

You didn't create your new workspace pointing to the new depot.  Look at the client view.  If it says something like:'

//depot/... //myworkspace/...

change it to:

//mynewdepot/... //myworkspace/...

If it maps both depots:

Root: C:\p4
View:
   //depot/... //myworkspace/depot/...
   //mynewdepot/... //myworkspace/mynewdepot/...

then the new depot is mapped to a folder under the root (in this case C:\p4\mynewdepot).  Either move your project files to the folder that corresponds to the place you want to add them, or change the View so that it maps the depot to the location where those files already are.

#5 roberteker

roberteker

    Member

  • Members
  • PipPip
  • 14 posts

Posted 20 February 2019 - 01:02 PM

Ok, I misunderstood that I had to right click and select "exclude tree" instead of just selecting which depot I wanted and click OK. Thank you for pointing that out to me.

Even so, now it says that there's no opened(?) files to add instead, in addition to the same warnings as before:

https://www.youtube....h?v=Rmo6I3cxY7A

EDIT: Not allowed to attach neither webm nor mp4 files in this forum. :(

#6 Sambwise

Sambwise

    Advanced Member

  • Members
  • PipPipPip
  • 784 posts

Posted 20 February 2019 - 04:30 PM

This is the exact situation I described in my previous post.  Here's the text of your workspace definition, aka client spec (he said, with a long pause as he squinted at the blurry first frame... I can't wait until ML gets to the point where textual information can be automatically extracted from .NORM data sources so I'll never again need to transcribe text from a pixel buffer like a medieval monk copying out manuscript pages)

Client: robert-z99-P42ml
Root: C:\Users\robert\Documents\Unreal Projects\P42MilitaryVR
View:
	//depot/... //robert-z99-P42ml/depot/...
	//P42ml/... //robert-z99-p42ml/P42ml/...
So that means that the files for your "P42ml" project want to be in the local directory:

C:\Users\robert\Documents\Unreal Projects\P42MilitaryVR\P42ml

I got this by looking at your View; the first part of the right side of the mapping (//robert-z99-p42ml/) corresponds to your Root, and there's a "P42ml" directory underneath that which is what maps to the //P42ml depot..  

I can also see in P4V's "workspace view" that all of your files are one level higher in the folder hierarchy (i.e. they're in your client root, NOT a folder called "p42ml" underneath your client root), so none of them are mapped into your new "p42ml" depot.

I have no idea how to use P4V's client view editor to actually edit the client view in a way that lets you modify the right hand side of the mapping to be what you need it to be, so just open a command prompt, run "p4 client", and change the View from:

	//depot/... //robert-z99-P42ml/depot/...
	//P42ml/... //robert-z99-p42ml/P42ml/...

to:

	//P42ml/... //robert-z99-p42ml/...

Now you'll be able to add everything under your client root and it will go into your P42ml depot.

#7 roberteker

roberteker

    Member

  • Members
  • PipPip
  • 14 posts

Posted 25 February 2019 - 11:57 AM

Thank you for trying to help me. I'm beginning to understand that sadly, the Perforce application isn't as full featured as the legacy command line options (which makes me feel like a medieval monk when I use it).

However, the text file that pops up when I type your command already seem to contain the view you are asking me to add:

View:
//P42mil/... //robert-z97/P42mil/...
//depot/... //robert-z97/depot/...

#8 Sambwise

Sambwise

    Advanced Member

  • Members
  • PipPipPip
  • 784 posts

Posted 25 February 2019 - 04:28 PM

Does it, though?  :)

//P42mil/... //robert-z97/P42mil/...
//depot/... //robert-z97/depot/...

//P42mil/... //robert-z97/...


https://www.youtube....h?v=rsRjQDrDnY8

(Reread either of my previous two posts for the explanation of why the right-hand side of the view matters -- or just copy and paste and marvel as it works by magic!)

#9 roberteker

roberteker

    Member

  • Members
  • PipPip
  • 14 posts

Posted 14 March 2019 - 09:11 AM

View PostSambwise, on 25 February 2019 - 04:28 PM, said:

(Reread either of my previous two posts for the explanation of why the right-hand side of the view matters -- or just copy and paste and marvel as it works by magic!)

I still get the same error, "not in view", because if the right side that you mention represents the actual folder structure on my local drive, then it should look like this:

Root: C:\Users\robert\Documents\Unreal Projects
View:
//P42mil/... //robert-z97/P42MilitaryVR/...
//depot/... //robert-z97/MyUnrealProject/...

But it can't be a 1:1 representation, because the first time I opened up that text file, it said my root was c:\users\robert and that's missing several levels of folders for it to be a complete path, yet it worked with my first project.

EDIT: I actually now updated that text file to look exactly like what I posted above, and it seems I can still submit files to my original project, despite the big change in root and depot, yet my new project is still stuck at the same error. So that's really weird. Original project worked, despite lacking vital path information, and now after adding that correct path information, original project still works yet the new one also still complains. Oh, and there was never any folder called "depot" on my local drive, so I don't understand how that ever worked.

EDIT 2: One more weird thing, when choosing the new non-working workspace, I can go to a Depot tab in P4V and apparently switch between depots. Yet the only thing that visibly changes is the icons on some of the files. It doesn't hide my original depot, or place my active one at the top or anything, which is super confusing:

Untitled-1.jpg

EDIT 3: Ok, I spotted something now. It says Z99 in the P4V screenshot when it should say Z97. Where did that come from? How do I change it? Not in that text file, that one is correct. If I go into Workspaces and choose Edit Workspace I'm not allowed to change its name. And something called "client expression" also reads Z99 and I can't change that either...

EDIT: So I nuked the "problematic" workspace and created a new one, and the suggested workspace root in P4V seems to completely ignore that text file. It's not really the greatest, coherent piece of software this. Oh, and still the same error.

#10 Sambwise

Sambwise

    Advanced Member

  • Members
  • PipPipPip
  • 784 posts

Posted 14 March 2019 - 05:48 PM

Sounds like you're using two different client specs when you probably want to just use one?

At the command line you can run "p4 set P4CLIENT=clientname" to set the client you want to use, which it sounds like is "robert-Z99"?  Or maybe you want to tell P4V that you're using the "robert-Z97" workspace?  (I forget now what that looks like in P4V, I think it's "choose workspace" or something like that, or maybe it's a right-click option on the list of workspaces that you can see somewhere.)

Use the one where you've actually synced files successfully in both places, and just delete the "extra" one you created.  Then the next time you go to edit your client spec, make sure the names match!  :)




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users