sl-submit-diff

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

Submit Diff (Sapling + Phabricator)

提交Diff(Sapling + Phabricator)

Submit commits to Phabricator for code review using
jf submit
(Meta).
<EXTREMELY_IMPORTANT>
Windows Note: Use the full path to
sl.exe
to avoid conflicts with PowerShell's built-in
sl
alias for
Set-Location
. </EXTREMELY_IMPORTANT>
使用
jf submit
(Meta工具)将提交发送到Phabricator进行代码评审。
<EXTREMELY_IMPORTANT>
Windows注意事项: 请使用
sl.exe
的完整路径,避免与PowerShell内置的
Set-Location
命令的
sl
别名冲突。 </EXTREMELY_IMPORTANT>

What This Skill Does

技能功能

  1. If there are uncommitted changes, first run
    /commit
    to create a commit
  2. Submit commits to Phabricator using
    jf submit --draft
    . Submit for review using DRAFT mode
  3. Each commit in the stack becomes a separate Phabricator diff (D12345)
  4. Commit messages are updated with
    Differential Revision:
    link
  1. 如果存在未提交的变更,首先运行
    /commit
    创建一个提交
  2. 使用
    jf submit --draft
    将提交发送到Phabricator,以草稿模式提交供评审
  3. 提交栈中的每个提交都会生成独立的Phabricator diff(例如D12345)
  4. 提交信息会被更新,添加
    Differential Revision:
    链接

Commands to Use

使用命令

  • sl status
    - Check for uncommitted changes
  • jf submit --draft
    - Submit commits to Phabricator in DRAFT mode
  • sl diff --since-last-submit
    - View changes since last submission
  • sl status
    - 检查未提交的变更
  • jf submit --draft
    - 以草稿模式将提交发送到Phabricator
  • sl diff --since-last-submit
    - 查看上次提交后的变更内容

Common Operations

常用操作

TaskCommand
Submit current commit
jf submit --draft
Update diff after amend
sl amend && jf submit --draft
任务命令
提交当前提交
jf submit --draft
amend后更新diff
sl amend && jf submit --draft

Diff Status Values

Diff状态值

  • Needs Review
    - Awaiting reviewer feedback
  • Accepted
    - Ready to land
  • Needs Revision
    - Reviewer requested changes
  • Committed
    - Diff has been landed
  • Abandoned
    - Diff was closed without landing
  • Needs Review
    - 等待评审人反馈
  • Accepted
    - 已通过评审,可合入
  • Needs Revision
    - 评审人要求修改
  • Committed
    - Diff已合入
  • Abandoned
    - Diff已关闭,未合入

Stacked Diffs

堆叠Diff

Sapling naturally supports stacked commits. When submitting:
  • Each commit gets its own Phabricator diff (D12345, D12346, D12347)
  • Diffs are linked with proper dependency relationships
  • Reviewers can review each diff independently
Sapling原生支持堆叠提交。提交时:
  • 每个提交都会生成独立的Phabricator diff(D12345、D12346、D12347)
  • 各Diff之间会建立正确的依赖关系
  • 评审人可独立评审每个Diff

Important Notes

重要注意事项

  • Unlike GitHub PRs, Phabricator diffs are tied to commits via
    Differential Revision:
  • Use
    sl diff --since-last-submit
    to see what changed since last submission
  • The ISL (Interactive Smartlog) web UI also supports submitting diffs
  • 与GitHub PR不同,Phabricator diff通过
    Differential Revision:
    字段与提交绑定
  • 使用
    sl diff --since-last-submit
    可查看上次提交后的变更内容
  • ISL(交互式智能日志)网页UI也支持提交Diff