[SCM]源碼管理 – perforce基本操作

來源:互聯網
上載者:User

以下的p4的基本操作是基於P4V,p4V是跨平台的p4 visual client。

 

1) 登入和環境變數。server,等於環境變數P4PORT的值,表示p4 server的地址; user,等於環境變數P4USER的值,為p4的使用者名稱,唯一標識一個使用者;workspace,等於P4CLINT的值,表示server與本地的目錄的對應。

 

 

2) workspace, 也稱為client spec,表示了server與本地的源碼的目錄對應關係。

 

 

3) 增加新的檔案,操作為workspace->在檔案或檔案夾上右鍵 -> mark for add

 

 

4)刪除檔案,操作為depot-> 在檔案或檔案夾上右鍵 -> mark for delete

 

 

5) 修改某些檔案,操作為depot-> 在檔案或檔案夾上右鍵 -> checkout

 

 

6)changelist, 每次submit提交都會對應唯一的一個changelist。

 

 

7) 一次提交,操作為pending -> default ( pending change list) -> submit

 

submit 如:

 

 

8) 比較檔案或檔案夾的不同,操作為在檔案或檔案夾上右鍵->diffagainst

 

 

9)檔案的修改曆史,操作為depot-> 選擇檔案或檔案件-> file history(folder history)

 

 

10) 同步代碼,操作為depot -> 在檔案或檔案夾右鍵 -> get latest revision(get revision)

 

 

完!

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.