Helix Coreサーバユーザーガイド (2019.1)

ファイルを削除する

ファイルを削除する手順は、ファイルシステムのファイルを削除する場合の手順よりも複雑です。最初に、p4 deleteコマンドを使用して、ファイルを削除用としてマークする必要があります。ここでは、ヘッダファイルだけを削除します。

$ p4 delete *.h

Helixサーバに以下の出力が表示されます。

//JamCode/main/file1.h#1 - opened for delete
//JamCode/main/file2.h#1 - opened for delete
//JamCode/main/file3.h#1 - opened for delete

ファイルを編集するで使用したp4 submitコマンドをここでも使用して、削除による影響をディポ内のファイルに適用します。

$ p4 submit

Helixサーバでは、change specificationがエディタ内で以下のように表示されます。

# A Perforce Change Specification.
#
#  Change:      The change number. 'new' on a new changelist.
#  Date:        The date this specification was last modified.
#  Client:      The client on which the changelist was created.  Read-only.
#  User:        The user who created the changelist.
#  Status:      Either 'pending' or 'submitted'. Read-only.
#  Type:        Either 'public' or 'restricted'. Default is 'public'.
#  Description: Comments about the changelist.  Required.
#  ImportedBy:  The user who fetched or pushed this change to this server.
#  Identity:    Identifier for this change.
#  Jobs:        What opened jobs are to be closed by this changelist.
#               You may delete jobs from this list.  (New changelists only.)
#  Files:       What opened files from the default changelist are to be added
#               to this changelist.  You may delete files from this list.
#               (New changelists only.)

Change: new

Client: jschaffer_ws

User:   jschaffer

Status: new

Description:
        <enter description here>

Files:
        //JamCode/main/file1.h # delete
        //JamCode/main/file2.h # delete
        //JamCode/main/file3.h # delete

Description」行の下に説明を入力してから、変更を保存します。この操作により、変更内容がHelixサーバのディポに格納されます。以下のような出力が表示されます。

Change 3 created with 3 open file(s).
Submitting change 3.
Locking 3 files ...
delete //JamCode/main/file1.h#2
delete //JamCode/main/file2.h#2
delete //JamCode/main/file3.h#2
Change 3 submitted.