在 VSTS(现在是 Azure DevOps)中,可以将多个更新推送到拉取请求 (PR)。您可以将任何更新与其之前的更新进行比较,并且您可以在进行任何更改之前将所有更新的汇总视图与原始代码进行比较。但是我如何比较两个任意的、非顺序的更新?
我的情况是 PR 有相当多的来回,总共推送了 8 个更新。我上次查看了更新 5,但现在还有 3 个更新。我不想回顾 6-5、7-6、8-7 或所有更新,我只想回顾 8-5。我怎么做?
A workaround (in the absence of any user interface to configure two non-sequential updates to be compared) is to edit the iteration=xxxand base=xxx query string parameters in the url, e.g.:
https://xxx.visualstudio.com/xxx/_git/xxx/pullrequest/123?iteration=8&base=5&_a=files
This updates the UI as shown below:
I discovered this because I received an automated email from VSTS notifying me about the latest pushed updates. The email included a "View pull request" button. I clicked the button which took me to the PR in VSTS (I think to the Overview section). There was a notification banner towards the top of the page with a link about comparing update 5 with update 8 which I had never seen before. This sounded promising, so I clicked the link and it took me to the Files section and showed the differences between update 5 and 8 which is exactly what I wanted!
However, subsequent visits to the page (or clicking the "View pull request" button in the email again) don't show that link again, and I can't find anywhere in the UI that lets me define the two updates to compare. So this seems like a one-time opportunity. Miss it, and it's gone forever. I'd still like to know if there's a way to define two non-sequential updates to be compared in the UI, however, the poor man's url hack is a viable workaround for now.
| 归档时间: |
|
| 查看次数: |
233 次 |
| 最近记录: |