Reputation: 20555
I am very new to Perforce and Helix. But I am trying to make a new depot for one of my co-workers to use with this workspace. (So that he does not interfere with our default depot).
However, I am unable to upload anything to it.
My setup
I have an Ubuntu Cloud server running on Digital Ocean. My clients are running from a Windows machine (each of my co-worker's local machines).
My workflow
I start by logging into my server and running sudo p4 depot testdepot
# A Perforce Depot Specification.
#
# Depot: The name of the depot.
# Owner: The user who created this depot.
# Date: The date this specification was last modified.
# Description: A short description of the depot (optional).
# Type: Whether the depot is 'local', 'remote',
# 'stream', 'spec', 'archive', 'tangent',
# 'unload' or 'graph'. Default is 'local'.
# Address: Connection address (remote depots only).
# Suffix: Suffix for all saved specs (spec depot only).
# StreamDepth: Depth for streams in this depot (stream depots only).
# Map: Path translation information (must have ... in it).
# SpecMap: For spec depot, which specs should be recorded (optional).
#
# Use 'p4 help depot' to see more about depot forms.
Depot: testdepot
Owner: root
Date: 2018/10/14 14:32:58
Description:
Created by root.
Type: local
Address: local
Suffix: .p4s
StreamDepth: //testdepot/1
Map: testdepot/...
After that I go to my admin view
on my local machine to check that the depot is in fact created:
Great now I go to my client
and create a new workspace where I only include the newly created depot testdepot
:
Note here that I have excluded the default depot
I press OK
.
And it switches me to the new workspace
. First, I try to create a folder but it tells me that I am unable to. I figured that this is because the root folder does not exist.
So i go to the folder and create the actual folder testingNewDepot
I then create a txt
file named test
go back into my client and press mark for add
Here I get the first warning:
warning reported
d:\UnityProjects\testingNewDepot\test.txt - file(s) not in client view.
So I am unable to upload anything to this depot
.
If I go back to my server and try to find the actual depot using ls
in the /opt/perforce/servers
, I can't seem to find the folder that should hold the depot.
I have also tried to actually create the folder but without luck. What can I try next?
Upvotes: 1
Views: 957
Reputation: 71454
Your client view maps your test depot to d:\UnityProjects\testingNewDepot\testdepot
.
The path you have tried to add, d:\UnityProjects\testingNewDepot\test.txt
, is not in your client view.
To fix this, either change your client view to accomodate the file that you're trying to add (e.g. change the client half of the map from //testingNewDepot/testdepot/...
to just //testingNewDepot/...
-- that seems to be what you were aiming for) or move your file to a client folder that's mapped in the current client view (e.g. try adding a file under d:\UnityProjects\testingNewDepot\testdepot\test.txt
).
All of this stuff is much easier from the command line than trying to navigate through P4V dialogs IMO; the client view generator in P4V in particular has always been sort of a nightmare whenever I've tried to use it. Here's the entire "adding a test file" workflow, from start to finish including logging in, configuring the environment, creating the new depot, creating the workspace directory, and setting up the client workspace:
# Login (P4V probably already did this for you, but here's how you do it...)
# Your username needs to have "super" permissions to let you create the depot.
p4 set P4PORT=ssl:178.62.85.150:1666
p4 set P4USER=MarcRasm
p4 login
# Making the depot is easy, just use the defaults.
# Note that you can do this from a client host; you don't need to use sudo on the server.
p4 depot -o testdepot | p4 depot -i
# Switch to the test directory. If it already exists and you're there skip this.
D:
mkdir D:\UnityProjects\testingNewDepot
cd D:\UnityProjects\testingNewDepot
# Create your new client spec called "testingNewDepot" and set up its view correctly.
p4 set P4CLIENT=testingNewDepot
p4 --field "View=//testdepot/... //testingNewDepot/..." client -o | p4 client -i
# Create and add a test file.
echo asdf > test.txt
p4 add test.txt
p4 submit -d "Adding test file."
Upvotes: 2