首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >无法强制添加文件

无法强制添加文件
EN

Stack Overflow用户
提问于 2014-06-26 16:58:18
回答 2查看 4.5K关注 0票数 0

据我所知,我的客户设置正确:

代码语言:javascript
复制
$ 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/...

这些档案存在:

代码语言:javascript
复制
$ pwd
/home/stephen/Code/SpamView-URI
$ ls mainline/EBUILD_VERSION mainline/package.sh mainline/ebuild
mainline/ebuild  mainline/EBUILD_VERSION  mainline/package.sh

但是当我尝试添加它们时,它会抱怨:

代码语言:javascript
复制
$ 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签出了该文件,如果这有区别的话。

EN

回答 2

Stack Overflow用户

回答已采纳

发布于 2014-06-27 01:27:05

正如你注意到的,你的客户规格是不对的。用这两行,

//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/...移到最后一行,你会没事的。

票数 0
EN

Stack Overflow用户

发布于 2014-06-26 17:52:19

检查客户端工作区规范中的" view“行,以确认Perforce命令中使用的文件规范(或出现在错误消息中)是否在工作区视图中。例如,如果您看到试图添加文件时出错,则可能需要检查映射以确认该文件驻留在客户端视图中的目录中。

参见“Client视图”下的一节:Article/Common-Permissions-and-File-Access-Problems

下面的文件就在这个目录结构下吗?

代码语言:javascript
复制
  /home/stephen/Code/SpamView-URI/mainline/EBUILD_VERSION
  /home/stephen/Code/SpamView-URI/mainline/package.sh
  /home/stephen/Code/SpamView-URI/mainline/ebuild

从以下第一视图映射行判断:

代码语言:javascript
复制
  //depot/labs/products/component/SpamView-URI/... //stephen-dev1-stephen/SpamView-URI/...

我想这就是他们应该走的路。如果您在‘/home/stephen/Code/SpamView/mainline’目录中添加“cd”,那么您能够添加这些文件吗?

票数 1
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/24436238

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档