在 Perforce 中,按用户列出所有变更集

发布于 2024-08-29 10:55:09 字数 53 浏览 2 评论 0原文

在 Perforce 中,如何列出给定用户的所有变更集? 可以通过单个“p4”命令来完成吗?

In Perforce, how do I list all changesets for a given user?
Can that be done via a single "p4" command?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(5

书间行客 2024-09-05 10:55:09

是的。

p4 changes -u <username>

Yes.

p4 changes -u <username>
层林尽染 2024-09-05 10:55:09

在 Powershell 2.0 中:

p4 users 
    | select-string "^\w+(.\w+)?" | %{$_.Matches} | %{$_.Value} 
    | %{p4 changes -u $_}

第一行显示所有用户,第二行从输出中解析出用户名,第三行将该输入发送到 p4changes

编辑:正则表达式假设您的用户名是单个单词或名字.姓氏格式。您可能需要针对不同的格式进行编辑。

EDIT2:哦,对于给定用户来说。屁股。

编辑3:更短的powershell:

p4 users 
    | select-string "^\w+(.\w+)?" | %{$_.Matches} 
    | %{p4 changes -u $_.Value }

编辑4:更短的powershell:

p4 users | % { p4 changes -u $_.Split()[0] }

In Powershell 2.0:

p4 users 
    | select-string "^\w+(.\w+)?" | %{$_.Matches} | %{$_.Value} 
    | %{p4 changes -u $_}

The first line shows all users, the second line parses out the username from the output, adn the third line sends that input to p4 changes.

EDIT: The regex assumes your usernames are either a single word or a firstname.lastname format. You may need to edit it for different formats.

EDIT2: Ooooh for a given user. Arse.

EDIT3: Shorter powershell:

p4 users 
    | select-string "^\w+(.\w+)?" | %{$_.Matches} 
    | %{p4 changes -u $_.Value }

EDIT4: even shorter powershell:

p4 users | % { p4 changes -u $_.Split()[0] }
海螺姑娘 2024-09-05 10:55:09

有关每个更改列表的更改的详细信息,请使用:

p4 changes -u <user_name> | %{p4 describe $_.Split()[1]}

如果不需要文件差异,请使用 -s 选项进行描述。

For details of the changes for each changelist use:

p4 changes -u <user_name> | %{p4 describe $_.Split()[1]}

Use -s option for describe if you don't need the file diff.

迷乱花海 2024-09-05 10:55:09

p4 更改 -m 1 -L -t -u

p4 changes -m 1 -L -t -u

你是年少的欢喜 2024-09-05 10:55:09
p4 -u <username>

尝试过“Rev. P4V/NTX64/2019.1/1797168”

p4 -u <username>

Tried on "Rev. P4V/NTX64/2019.1/1797168"

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文