【发布时间】:2013-06-07 15:56:58
【问题描述】:
在 Cygwin bash 中,如何列出在当前工作区中打开的所有文件,按待处理的更改列表分组(忽略空的或搁置的更改列表)?
例如,如果我在以下更改列表中打开了以下文件,我希望以这种(或类似的)格式显示它:
1234: Changelist 1234's description
//path1/file1 1 add text
//path2/file2 2 edit text
5678: Changelist 5678's description
//path2/file3 3 edit xbinary
p4 opened|sed "s/\([-#()]\|change\)/ /g"|column -t|sort -k 4 按变更列表编号对它们进行分组:
//path1/file1 1 add 1234 text
//path2/file2 2 edit 1234 text
//path2/file3 3 edit 5678 xbinary
但我希望将每个更改列表编号和描述视为标题。
【问题讨论】:
-
为什么不使用真正的脚本语言呢?选择您最喜欢的(Perl、Python、Ruby 等)并为您的脚本语言使用 Perforce 绑定,让事情变得简单。
标签: bash cygwin perforce changelist