0

使用 perforce 的 API,我将查看所有更改列表的历史记录,并且我需要输出一个日志,其中包含在 perforce 中采取的所有操作。

对于分支和合并,我想记录操作的源和目标,但我似乎找不到它。不在 changelist 类中,也不在 FileMetaData 类中。

Perforce 将受更改影响的每个文件的数据保留在历史记录中,但我想获取已执行的一般操作。例如,从 //Main/Sample 分支到 //Main/Sample-Branch 或从 //Main/X 合并到 //Main/Releases/A。

我在哪里可以找到这些数据?

4

2 回答 2

1

您正在寻找的是由 Repository.GetSubmittedIntegrations 返回的更改列表中文件修订的FileIntegrationRecord ( s) ,或者可能是由Repository.GetFileHistory返回的RevisionIntegrationSummary

于 2015-08-25T20:57:26.630 回答
0

我不确定您使用的是哪个 API,但您会希望使用与“p4 filelog”命令等效的 API。

示例输出:

//depot/release/prototype1/docs/Test Plan Template_Baseline.doc
... #1 change 471 branch on 2011/11/15 by jenbottom@resource_portle_dev (binary) 'Integrating to the prototype1 b'
... ... branch from //depot/dev/docs/Test Plan Template_Baseline.doc#1
//depot/release/prototype1/docs/associations
... #1 change 471 branch on 2011/11/15 by jenbottom@resource_portle_dev (text) 'Integrating to the prototype1 b'
... ... branch from //depot/dev/docs/associations#1

查看更改列表 471,我们可以看到文件上的操作是什么,但看不到它们从哪里分支到哪里:

Change 471 by jenbottom@resource_portle_dev on 2011/11/15 22:04:33

        Integrating to the prototype1 branch in rel dir.

Affected files ...

... //depot/release/prototype1/docs/Test Plan Template_Baseline.doc#1 branch
... //depot/release/prototype1/docs/associations#1 branch
... //depot/release/prototype1/docs/changelog#1 branch

希望这会有所帮助,珍。

于 2015-08-25T10:34:55.977 回答