如何将Perforce仓库位置转换为客户端视图位置

如何将Perforce仓库位置转换为客户端视图位置

本文介绍了如何将Perforce仓库位置转换为客户端视图位置的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想知道如何出于脚本编写的目的将Perforce软件仓库位置转换为客户端视图位置.

I'd like to know how to convert Perforce depot locations to client view locations for the purpose of script writing.

我有一个脚本,该脚本首先检出要在perforce中进行编辑的文件,然后与该文件进行交互.我需要将仓库位置(即\ Projects \ Project6)转换为客户端视图位置. (即d:\ Projects \ Project6).

I have a script that first checks out a file for edit in perforce and then interacts with the file. I need to have the depot location (i.e. \Projects\Project6) converted to the client view location. (i.e. d:\Projects\Project6).

这可能吗?

推荐答案

为此,我一直使用 p4 where 命令.这是内置帮助的描述:

I have always used the p4 where command for this. Here is its description from the built-in help:

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.

这篇关于如何将Perforce仓库位置转换为客户端视图位置的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-21 10:11