有没有办法列出 Phabricator 中的所有预览差异?也就是说,我使用 diff 创建了一个 diff arc diff --preview
,但是丢失了 diff URL 并且丢失了原始的本地 git 提交。我想使用 重新生成它们arc patch --diff
,但我不知道差异号
1 回答
arc diff preview is not intended for storing commits for later. Just create a revision and don't assign anyone it's the exact same thing.
You can't do anything through the UI to recover these as this was never the intention of --preview. If you have access to the database you can go into the *_user.user find your user phid then go into the *_differential.differential_diff table and select all users with this PHID. Or just have your DBA run this for you.
SELECT *
FROM phabricator_differential.differential_diff
WHERE authorPhid
IN (
SELECT phid
FROM phabricator_user.user
WHERE username = 'Kirby'
)
AND revisionID IS NULL;
From the id column in this list you can access your diffs at the following url. https://phabricator.com/differential/diff/{id}/
.
This is a very old ticket upstream that would likely be part of adding better diff support to the UI https://secure.phabricator.com/T1084. I haven't seen much interest in this ever though so i don't imagine it will be supported in the next year unless your company or yourself is willing to pay them to make it.