簡體   English   中英

如何將Perforce depot位置轉換為客戶端視圖位置

[英]How to convert Perforce depot locations to client view locations

我想知道如何將Perforce depot位置轉換為客戶端視圖位置以進行腳本編寫。

我有一個腳本,首先在perforce中檢出文件以進行編輯,然后與文件進行交互。 我需要將庫位置(即\\ Projects \\ Project6)轉換為客戶端視圖位置。 (即d:\\ Projects \\ Project6)。

這可能嗎?

我總是使用p4 where命令。 以下是內置幫助中的描述:

 where -- Show how file names map through the client view p4 where [ file ... ] Where shows how the named files map through the client view. For each argument, three names are produced: the name in the depot, the name on the client in Perforce syntax, and the name on the client in local syntax. If no file is given, the mapping for '...' (all files in the current directory and below) is shown. Note that 'p4 where' does not determine where any real files are. It only computes where they should be according to the client view. 

我會使用p4 fstat命令。 我發現它的格式比p4稍微容易解析。 此外,如果您在python中編寫腳本,則可以使用-G選項將返回值編組為python詞典。

還需要注意的是,您可以鍵入p4 help命令以查看命令列表以及它們的功能的簡短說明。

查看p4 have命令。 您給它無論是倉庫位置客戶端文件名,它可以讓你的倉庫位置,客戶端文件名, 你有該文件的版本。

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM