diff --git a/client/web-sveltekit/src/lib/repo/HistoryPanel.gql b/client/web-sveltekit/src/lib/repo/HistoryPanel.gql index 9c5a69ebf984..5e2e40eca7e7 100644 --- a/client/web-sveltekit/src/lib/repo/HistoryPanel.gql +++ b/client/web-sveltekit/src/lib/repo/HistoryPanel.gql @@ -11,6 +11,10 @@ fragment HistoryPanel_HistoryConnection on GitCommitConnection { ...Avatar_Person } } + perforceChangelist { + cid + canonicalURL + } canonicalURL } pageInfo { diff --git a/client/web-sveltekit/src/lib/repo/HistoryPanel.svelte b/client/web-sveltekit/src/lib/repo/HistoryPanel.svelte index 61e0a457da3f..faa849ae8537 100644 --- a/client/web-sveltekit/src/lib/repo/HistoryPanel.svelte +++ b/client/web-sveltekit/src/lib/repo/HistoryPanel.svelte @@ -61,13 +61,17 @@
{#each $history.data as commit (commit.id)} {@const selected = commit.abbreviatedOID === selectedRev || commit.oid === selectedRev} + {@const isPerforceDepot = commit.perforceChangelist !== null} + {@const revURL = isPerforceDepot ? commit.perforceChangelist?.canonicalURL : commit.canonicalURL} + {@const revID = isPerforceDepot ? commit.perforceChangelist?.cid : commit.abbreviatedOID} +