Perforce无法发布到新的仓库

时间:2018-10-14 14:46:18

标签: perforce

好的,所以我必须承认我对Perforce和Helix非常陌生。但是我正在尝试为我的一个同事创建一个新的仓库,以与此工作空间一起使用。 (这样他就不会干扰我们的默认软件仓库)

但是,我无法向其中上传任何内容:(

我的设置

我有一个Ubuntu cloud serverDigital ocean上运行,我的客户端是从Windows计算机(每个同事的本地计算机)运行的。

我的工作流程

我首先登录服务器并运行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/...

此后,我进入本地计算机上的admin view,以检查是否确实创建了软件仓库:

enter image description here

很好,现在我进入client并创建一个新的工作空间,其中仅包含新创建的仓库testdepot

enter image description here

请注意,我已排除了default depot

我按OK

它会将我切换到新的workspace。首先,我尝试创建一个文件夹,但它告诉我无法执行该操作。我发现这是因为根文件夹不存在。

所以我转到该文件夹​​并创建实际的文件夹testingNewDepot

然后我创建一个名为txt的{​​{1}}文件,并返回到客户端,然后按test

在这里我得到第一个警告:

  

警告已报告

     

d:\ UnityProjects \ testingNewDepot \ test.txt-文件不在客户端视图中。

所以我无法向此mark for add上传任何内容。

如果我返回服务器并尝试在depot中使用ls查找实际的软件仓库,我似乎找不到应该存放该软件仓库的文件夹。

我也尝试过实际创建文件夹,但是没有运气。

有人可以在这里帮助我解决我的问题吗? :)

对不起,很长的帖子,我只是想确保我提供了尽可能多的信息。

1 个答案:

答案 0 :(得分:2)

您的客户视图将您的测试软件仓库映射到d:\UnityProjects\testingNewDepot\testdepot

您尝试添加的路径d:\UnityProjects\testingNewDepot\test.txt不在客户视图中。

要解决此问题,请更改您的客户端视图以适应要添加的文件(例如,将客户端的地图一半从//testingNewDepot/testdepot/...更改为//testingNewDepot/... -或将文件移动到当前客户端视图中映射的客户端文件夹(例如,尝试在d:\UnityProjects\testingNewDepot\testdepot\test.txt下添加文件)。

在命令行中,所有这些东西比试图通过IMO的P4V对话框导航要容易得多;每当我尝试使用P4V中的客户端视图生成器时,它一直都是噩梦。这是整个“添加测试文件”工作流程,从头到尾包括登录,配置环境,创建新软件仓库,创建工作空间目录以及设置客户端工作空间:

# 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."
相关问题