31

来自 GIT 和 SVN 背景,我在 Windows 中设置了我的 P4V,设法将我的存储库的内容放入我的本地文件夹(不知何故),但是一旦我在本地文件夹中进行了修改并创建了新文件,我就无法提交它回到 Perforce。它给出了错误:

//depot/main/p4config.txt - 警告:无法从非流客户端提交 没有要提交的文件。提交失败——修复上述问题,然后使用“p4 submit -c 6”。

我的仓库层次结构:

C:\Perforce\kernelpanic\main>p4 client -S //depot/main -o
# A Perforce Client Specification.
#
#  Client:      The client name.
#  Update:      The date this specification was last modified.
#  Access:      The date this client was last used in any way.
#  Owner:       The user who created this client.
#  Host:        If set, restricts access to the named host.
#  Description: A short description of the client (optional).
#  Root:        The base directory of the client workspace.
#  AltRoots:    Up to two alternate client workspace roots.
#  Options:     Client options:
#                      [no]allwrite [no]clobber [no]compress
#                      [un]locked [no]modtime [no]rmdir
#  SubmitOptions:
#                      submitunchanged/submitunchanged+reopen
#                      revertunchanged/revertunchanged+reopen
#                      leaveunchanged/leaveunchanged+reopen
#  LineEnd:     Text file line endings on client: local/unix/mac/win/share.
#  ServerID:    If set, restricts access to the named server.
#  View:        Lines to map depot files into the client workspace.
#  Stream:      The stream to which this client's view will be dedicated.
#               (Files in stream paths can be submitted only by dedicated
#               stream clients.) When this optional field is set, the
#               View field will be automatically replaced by a stream
#               view as the client spec is saved.
#
# Use 'p4 help client' to see more about client views and options.

Client: kernelpanic

Update: 2012/10/04 15:35:16

Access: 2012/10/04 15:59:39

Owner:  me.kernelpanic

Host:   kernelpanic

Description:
        Created by me.kernelpanic.

Root:   C:/Perforce/kernelpanic

Options:        noallwrite noclobber nocompress unlocked nomodtime normdir

SubmitOptions:  submitunchanged

LineEnd:        local

View:
        //depot/... //kernelpanic/...
        //depot/main/doc/... //kernelpanic/main/doc/...
        //depot/* //kernelpanic/*
        //depot/main/* //kernelpanic/main/*

如果可能的话,我想在 C:\Perforce\kernelpanic\main\src 中添加文件......请帮助,我无法理解 Perforce。我尝试在进行修改之前或之后进行检查,但两种方式都未能将更改提交到服务器。我很想坚持使用 GIT,但我们的客户正在使用 Perforce,所以我们必须与他们相处融洽。非常感谢你的帮助!

4

2 回答 2

70

P4V 可能已指导您创建流库和主线,但以某种方式为您创建了非流工作区。据我所知,由于设置中的某些原因,初次使用 P4V 的用户很可能会发生这种情况。

要查看是否是问题所在,请转到连接/编辑工作区并查看“流”字段。是空的吗?如果是这样,请使用浏览来选择流。这会将您当前的工作空间变成流工作空间。

于 2012-10-04T17:04:59.550 回答
0

如果您更喜欢使用命令行,可以向客户端添加流,如下所示:

显示可用的流:

$ p4 streams
Stream //stream/...1
Stream //stream/...2
Stream //stream/...3
…

检查您当前的客户端配置:

$ p4 client -o
...

就我而言,那里没有提到流。然后编辑客户端配置:

$ p4 client

并添加:

Stream: //stream/...1

通过重新运行检查它是否有效p4 client -o

现在重试p4 submit

于 2022-01-21T11:30:20.467 回答