据我所知,我的客户端设置正确:
$ p4 client -o
# A Perforce Client Specification.
# ...
Client: stephen-dev1-stephen
Update: 2014/06/26 17:41:14
Access: 2014/06/26 17:45:47
Owner: StephenRasku
Host: stephen-dev1
Description:
Created by StephenRasku.
Root: /home/stephen/Code
Options: noallwrite noclobber nocompress unlocked nomodtime rmdir
SubmitOptions: submitunchanged
LineEnd: local
View:
//depot/labs/products/component/SpamView-URI/... //stephen-dev1-stephen/SpamView-URI/...
//version/... //stephen-dev1-stephen/version/...
//thirdparty/... //stephen-dev1-stephen/thirdparty/...
//starteam/... //stephen-dev1-stephen/starteam/...
//specs/... //stephen-dev1-stephen/specs/...
//release/... //stephen-dev1-stephen/release/...
//projects/... //stephen-dev1-stephen/projects/...
//main/... //stephen-dev1-stephen/main/...
//features/... //stephen-dev1-stephen/features/...
//dev/... //stephen-dev1-stephen/dev/...
//depot/... //stephen-dev1-stephen/depot/...
文件存在:
$ pwd
/home/stephen/Code/SpamView-URI
$ ls mainline/EBUILD_VERSION mainline/package.sh mainline/ebuild
mainline/ebuild mainline/EBUILD_VERSION mainline/package.sh
但是当我尝试添加它们时它会抱怨:
$ p4 add mainline/EBUILD_VERSION mainline/package.sh mainline/ebuild
mainline/EBUILD_VERSION - file(s) not in client view.
mainline/package.sh - file(s) not in client view.
mainline/ebuild - file(s) not in client view.
问题是什么?我使用git p4 clone
检出了文件,如果这有所不同。
答案 0 :(得分:1)
检查"查看"客户端工作空间规范中的行以确认 Perforce命令中使用的文件规范(或出现在错误消息中) 落在工作区视图中。如果您在尝试添加文件时看到错误, 例如,您可能想检查您的映射以确认 文件驻留在客户端视图中的目录中。
请参阅'客户端工作区视图'下的部分: http://answers.perforce.com/articles/KB_Article/Common-Permissions-and-File-Access-Problems
下面这个确切的目录结构下的文件是什么?
/home/stephen/Code/SpamView-URI/mainline/EBUILD_VERSION
/home/stephen/Code/SpamView-URI/mainline/package.sh
/home/stephen/Code/SpamView-URI/mainline/ebuild
根据第一个View映射行判断:
//depot/labs/products/component/SpamView-URI/... //stephen-dev1-stephen/SpamView-URI/...
我猜这是他们应该遵循的道路。 如果你' cd'进入' / home / stephen / Code / SpamView-URI / mainline' 目录是否可以添加这些文件?
答案 1 :(得分:0)
您的客户端规范不正确,正如您所注意到的那样。有了这两行,
//depot/labs/products/component/SpamView-URI/... //stephen-dev1-stephen/SpamView-URI/...
//depot/... //stephen-dev1-stephen/depot/...
您尝试将// depot / labs / products / component / SpamView-URI / ...下的文件映射到// stephen-dev1-stephen / SpamView-URI / ...和// stephen-dev1 -stephen / depot / labs / products / component / SpamView-URI / ...由于perforce从上到下读取,它将使用第二个映射覆盖您的第一个映射,基本上删除第二个映射。 \
将//depot/labs/products/component/SpamView-URI/... //stephen-dev1-stephen/SpamView-URI/...
移到最后一行,你应该没问题。