Jump to content


Getting Started in P4V

P4V Errors UE4 Perforce

  • Please log in to reply
36 replies to this topic

#21 dtveraas

dtveraas

    Member

  • Members
  • PipPip
  • 27 posts

Posted 12 May 2020 - 09:50 PM

I must have been sent off on a tangent. Looking back at the tutorial, I did not actually execute it all. I'll go through that and get back to you. Thanks!

#22 dtveraas

dtveraas

    Member

  • Members
  • PipPip
  • 27 posts

Posted 13 May 2020 - 04:04 AM

I was running through the early steps, when this one snagged me:

"On UNIX and OS X, make the server and client binaries executable, if they aren’t already.
$ cd /usr/local/bin
$ chmod +x p4d
$ chmod +x p4"

After running the chmod ones, the console would return "chmod: cannot access 'p4d': No such file or directory". So I would "which p4d" and saw it was in /usr/bin rather than /usr/local/bin.

I tried to install it all again in /usr/local/bin. The console returned than nothing was installed because helix-p4d was already the newest version.

I know I just removed p4d and p4 and reinstalled, so I figured I would try it again. After removing them I tried to reinstall but I got the already installed message.

Which p4 and which p4d returns nothing now. What happened? How can it already be installed but also not be anywhere?


#23 dtveraas

dtveraas

    Member

  • Members
  • PipPip
  • 27 posts

Posted 13 May 2020 - 04:16 AM

I may have not actually removed it.

I'm not following the same steps as this thread: https://stackoverflo...ce-p4-on-ubuntu

#24 dtveraas

dtveraas

    Member

  • Members
  • PipPip
  • 27 posts

Posted 13 May 2020 - 04:24 AM

Everything appears to be back to before this chmod confusion. The p4d and p4 files are still in /usr/sbin and /usr/bin respectively. When in /usr/local/bin, chmod cannon access either p4 or p4d, but they seem to execute without that error if I cd to their respective locations. Hopefully, that is okay, but it is certainly different from the instructions.

#25 dtveraas

dtveraas

    Member

  • Members
  • PipPip
  • 27 posts

Posted 13 May 2020 - 04:45 AM

When doing this step: https://www.perforce...<br /> <br /> I get this error:
"Listen to localhost:1666 failed.
TCP listen on localhost:1666 failed.
bind: [IP]:1666: Address already in use"

I've been able to connect with p4v and my Unreal Engine 4 source control function, so hopefully this step is satisfied. Do you think that could be the case?

#26 dtveraas

dtveraas

    Member

  • Members
  • PipPip
  • 27 posts

Posted 13 May 2020 - 04:53 AM

I seemed to have enabled SSL at some point. Will that potentially be a problem?

#27 dtveraas

dtveraas

    Member

  • Members
  • PipPip
  • 27 posts

Posted 13 May 2020 - 04:56 AM

I think I figured out how to do the tutorial with ssl enabled. I'll press on.

#28 Sambwise

Sambwise

    Advanced Member

  • Members
  • PipPipPip
  • 1120 posts

Posted 13 May 2020 - 05:41 AM

View Postdtveraas, on 13 May 2020 - 04:24 AM, said:

Everything appears to be back to before this chmod confusion. The p4d and p4 files are still in /usr/sbin and /usr/bin respectively. When in /usr/local/bin, chmod cannon access either p4 or p4d, but they seem to execute without that error if I cd to their respective locations. Hopefully, that is okay, but it is certainly different from the instructions.

Yes, that's fine.  The instructions assumed that you just downloaded the binaries and don't assume that you already set the permissions on them.  I think when you install via the package thingy it takes care of that for you.

#29 Sambwise

Sambwise

    Advanced Member

  • Members
  • PipPipPip
  • 1120 posts

Posted 13 May 2020 - 05:42 AM

View Postdtveraas, on 13 May 2020 - 04:45 AM, said:

When doing this step: https://www.perforce.....<br /><br />I get this error:
"Listen to localhost:1666 failed.
TCP listen on localhost:1666 failed.
bind: [IP]:1666: Address already in use"

This means that you're trying to start the server when it's already running -- the port is already in use because there's an instance of the server already listening on it.  Again, this might be something the package installer did?  If the server's already running, you can skip the "start the server" step.

#30 dtveraas

dtveraas

    Member

  • Members
  • PipPip
  • 27 posts

Posted 01 June 2020 - 03:19 AM

I have a stream I can now see on P4V. Now to get my data onto the server, I assume I have to follow these steps: https://www.perforce...<br /> <br /> Is that correct? Is that what the instructions mean by 'populate with files'? Or should I now use P4V to add my files to start source control?

#31 Sambwise

Sambwise

    Advanced Member

  • Members
  • PipPipPip
  • 1120 posts

Posted 01 June 2020 - 05:34 AM

The page you linked is talking about populating a new stream from the files in an existing stream.

For your first stream (the mainline), you want to "add" files.  The first step is to put the files in your workspace (you have a workspace associated with your stream, right?).
After that, open the files for add, and then submit them:

p4 add ...
p4 submit


#32 dtveraas

dtveraas

    Member

  • Members
  • PipPip
  • 27 posts

Posted 04 June 2020 - 02:34 AM

I defined a workspace with the step "Define a client workspace and bind it to the stream"

I'm not sure what you mean by open the files for add. How/where do I do that? Is this where P4V comes into play?


#33 Sambwise

Sambwise

    Advanced Member

  • Members
  • PipPipPip
  • 1120 posts

Posted 04 June 2020 - 08:03 PM

I gave you the exact commands to run.  You should be able to simply copy and paste them into the terminal.  Not sure how to clarify it any further.  Here they are again:

p4 add ...
p4 submit

"p4 add" opens the files for add.  The "..." parameter means "all files under this directory."

"p4 submit" submits open files.

This assumes that you have already defined the workspace, and that the files are already in that workspace (i.e. you have placed your project files within the Root of the workspace on the local filesystem, where you are running the above commands).

#34 Sambwise

Sambwise

    Advanced Member

  • Members
  • PipPipPip
  • 1120 posts

Posted 04 June 2020 - 08:12 PM

Here is the entire process of creating a new local Perforce server, adding files (which I will just create myself for demo purposes), and submitting them, from start to finish:

C:\Perforce\test2>p4 init
Matching server configuration from '':
case-sensitive (-C0), non-unicode (-n)
warning: your user 'bob' unknown at this server!
Server bob-dvcs-1591301437 saved.

C:\Perforce\test2>echo "this is one of my files" > foo

C:\Perforce\test2>echo "this is another one of my files" > bar

C:\Perforce\test2>echo "if I had real files I'd just copy them into this directory, of course" > ola

C:\Perforce\test2>p4 add ...
//stream/main/bar#1 - opened for add
//stream/main/foo#1 - opened for add
//stream/main/ola#1 - opened for add

C:\Perforce\test2>p4 submit
Change 1 created with 3 open file(s).
Submitting change 1.
Locking 3 files ...
add //stream/main/bar#1
add //stream/main/foo#1
add //stream/main/ola#1
Change 1 submitted.

The "p4 init" command creates a server, a stream depot, a //stream/main stream, and a workspace, all in one shot, so once you've done that you can just skip straight to adding and submitting the files.  Above you can see me running the "p4 add" and "p4 submit" commands, and what they do -- the "p4 add" command opens the files for add, and "p4 submit" submits them to the depot.

#35 Sambwise

Sambwise

    Advanced Member

  • Members
  • PipPipPip
  • 1120 posts

Posted 04 June 2020 - 08:17 PM

Here is the entire process of creating an empty server via the p4d daemon and setting up a depot, stream, and workspace from scratch.  It's not that much longer:

C:\Perforce\test3>p4 set P4PORT=1666

C:\Perforce\test3>mkdir p4root

C:\Perforce\test3>p4d -r p4root
Perforce db files in 'p4root' will be created if missing...
Perforce Server starting...

(the server will keep running in that terminal window, now I'll open up another terminal to set up the client workspace in a different directory)

C:\Perforce\test3>mkdir ws

C:\Perforce\test3>cd ws

C:\Perforce\test3\ws>p4 depot -t stream stream
Depot stream saved.

C:\Perforce\test3\ws>p4 stream -t mainline //stream/main
Stream //stream/main saved.

C:\Perforce\test3\ws>p4 client -S //stream/main
Client COMPY386 saved.

C:\Perforce\test3\ws>echo "this is a test file" > foo

C:\Perforce\test3\ws>echo "this is another test file" > bar

C:\Perforce\test3\ws>echo "again, this is not a thing you actually have to do if you have real files!" > ola

C:\Perforce\test3\ws>p4 add ...
//stream/main/bar#1 - opened for add
//stream/main/foo#1 - opened for add
//stream/main/ola#1 - opened for add

C:\Perforce\test3\ws>p4 submit
Change 1 created with 3 open file(s).
Submitting change 1.
Locking 3 files ...
add //stream/main/bar#1
add //stream/main/foo#1
add //stream/main/ola#1
Change 1 submitted.

Not counting creating the test data, that's a total of 10 commands.  It's that simple to get a Perforce server and workspace fully up and running if there are no additional complications from package managers, editor plugins, or P4V.  At no point during either of these sessions did I have to go and do anything else, beyond already having the p4 and p4d commands installed.  There is no hidden magic!  :)

(This is why it boggled my mind that the YouTube video you linked on "version control fundamentals" was 2 hours long.  The above took me all of twenty seconds.  Granted, I already know what I'm doing, but there's just not that much "fundamental" ground to cover!  WTF did that video talk about that took 2 hours???)

From what you've told me, you've done everything before the "p4 add" part (perhaps with a bunch of detours along the way, but hopefully you've arrived at the same place) -- that is, you've already set up the server, created a stream, and created a workspace that has your files in it.  Just do the final two steps of "p4 add ..." and "p4 submit".  That's it!

#36 dtveraas

dtveraas

    Member

  • Members
  • PipPip
  • 27 posts

Posted 09 June 2020 - 04:40 AM

Thank you very much for putting up with me.

The way you put it does seem rather simple. I have already discovered that that 2 hour video I was following has skipped over all these steps to talk about P4V and Unreal Source Control management.

I'm still a bit confused. Let's say I have a file on my local machine at C:\folder\file, how do I get that file on my Perforce server?

Please help me with my understanding. The echo command makes files, but they sort of start out like empty shells, is that right?

Once I run the commands, the Perforce server and workspace will be up and running, so I should be able to see workspaces once I connect with Unreal Engine 4, in theory, correct?

#37 Sambwise

Sambwise

    Advanced Member

  • Members
  • PipPipPip
  • 1120 posts

Posted 09 June 2020 - 01:57 PM

View Postdtveraas, on 09 June 2020 - 04:40 AM, said:

I'm still a bit confused. Let's say I have a file on my local machine at C:\folder\file, how do I get that file on my Perforce server?

"p4 add" and "p4 submit".

The "p4 add" command "opens" the file, which means you're telling the server "hey, here is a file that I'm going to do something with".  You can "open" a file for "add" or "edit" or "delete" -- if it's a new file, you're opening it for "add", because you're "adding" it.

Your client view is what associates your local file with the depot; you can only open a file if it's in your client view.  When you say "p4 add C:\folder\file", the server looks at your client view.  If your Root is C:\folder and your View is //depot/... //your-client/... then the local file will be opened for add with the depot path //depot/file.  If the file is not in your view at all (like say your Root is C:\some\other\folder), you'll get an error like "file not in client view".

When you submit, all the open files become new revisions on the server.

Obviously, this takes much longer to explain than it does to just run the commands and watch what happens!  :)


Quote

Please help me with my understanding. The echo command makes files, but they sort of start out like empty shells, is that right?

Ignore that part.  You already have files to add.  Add those instead.  I only created files with echo + redirect because I don't have any actual files to add but I wanted to demonstrate the concepts.  :)

Alternatively -- go to an empty directory and just run all the exact commands I did, starting with that "p4 init"!  It'll only take a minute, and then you will have a local Perforce repository that you can just mess around with, independently of your "real" files.  You'll be able to look at those test files and see exactly what they contain -- the output redirection operator (>) takes output from a command (in this case the echo command, which just repeats whatever you tell it) and puts it into the named file (that's how I get my "foo", "bar", and "ola" files to play with).  This isn't a Perforce thing, it's just an easy way to create a file at the command line.  You could do the same thing by opening an editor, typing some stuff into it, and hitting "Save".

Quote

Once I run the commands, the Perforce server and workspace will be up and running, so I should be able to see workspaces once I connect with Unreal Engine 4, in theory, correct?

Yes, once you have a workspace set up then I think you should be able to see it in other client apps.  I'd recommend playing around with the very basic commands (add, submit, sync, edit) just to get an understanding of the core concepts before you try the plugin, so that when you see something happening in the plugin you'll be able to connect it to what's going on behind it (e.g. "oh, my files aren't here, that means I need to sync them").





Also tagged with one or more of these keywords: P4V, Errors, UE4, Perforce

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users