Skip to content

run: Support labeled revisions. - #10051

Open
matts1 wants to merge 2 commits into
jj-vcs:mainfrom
matts1:push-xuztvnnknmsr
Open

run: Support labeled revisions.#10051
matts1 wants to merge 2 commits into
jj-vcs:mainfrom
matts1:push-xuztvnnknmsr

Conversation

@matts1

@matts1 matts1 commented Aug 25, 2026

Copy link
Copy Markdown
Contributor

This allows users to easily perform comparisons between builds. For example:
jj run -r before=trunk() -r after=@ -- "build && cp out/main /tmp/$JJ_LABEL"

Would generate /tmp/before and /tmp/after

Checklist

If applicable:

  • I have updated CHANGELOG.md
  • I have updated the documentation (README.md, docs/, demos/)
  • I have updated the config schema (cli/src/config-schema.json)
  • I have added/updated tests to cover my changes
  • I fully understand the code that I am submitting (what it does,
    how it works, how it's organized), including any code drafted by an LLM.
  • For any prose generated by an LLM, I have proof-read and copy-edited with
    an eye towards deleting anything that is irrelevant, clarifying anything
    that is confusing, and adding details that are relevant. This includes,
    for example, commit descriptions, PR descriptions, and code comments.

@matts1
matts1 requested a review from a team as a code owner August 25, 2026 01:15
@matts1
matts1 force-pushed the push-xuztvnnknmsr branch from b910d9b to a89813a Compare August 25, 2026 02:14
Comment thread CHANGELOG.md
Comment thread CHANGELOG.md Outdated
Comment thread cli/src/commands/run.rs Outdated
@matts1
matts1 force-pushed the push-xuztvnnknmsr branch from a89813a to 01322c2 Compare August 25, 2026 05:35

@PhilipMetzger PhilipMetzger left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. While the mechanism is great we should find better ways to integrate this cc @hooper for a better opinion and the metadata on snapshot proposal

Comment thread CHANGELOG.md Outdated
Comment thread cli/src/commands/run.rs
@josephlou5

Copy link
Copy Markdown
Contributor

Also what happens if multiple labels apply to some revision, such as -r label1=@ -r label2=@? I don't see a test for this and haven't really dug into the code, but feels like should be documented.

@matts1

matts1 commented Aug 25, 2026

Copy link
Copy Markdown
Contributor Author

Also what happens if multiple labels apply to some revision, such as -r label1=@ -r label2=@? I don't see a test for this and haven't really dug into the code, but feels like should be documented.

Good point. I'm not yet sure I understand exactly what we want this to look like, so I'll update this then

Comment thread cli/src/commands/run.rs
@matts1
matts1 force-pushed the push-xuztvnnknmsr branch 2 times, most recently from db700e7 to 8cd97bf Compare August 28, 2026 02:59
This allows users to easily perform comparisons between builds. For example:
`jj run -r before=trunk() -r after=@ -- "build && cp out/main /tmp/$JJ_LABEL"`
Would generate `/tmp/before` and `/tmp/after`
@matts1
matts1 force-pushed the push-xuztvnnknmsr branch from 8cd97bf to ff34f00 Compare August 28, 2026 03:23
Comment thread cli/src/commands/run.rs Outdated
Comment thread cli/src/commands/run.rs
Previously, `jj run -j2 -r before=main@origin -r after=@` would run the
two commits in workspaces 0 and 1 (assuming no other run command was
running), but in no particular order.

This meant that you could run jj run to build your artifact, then rerun
it again and it would potentially swap around the workspaces, requiring
a rebuild despite nothing having changed.
@matts1
matts1 force-pushed the push-xuztvnnknmsr branch from ff34f00 to 34c59e1 Compare August 30, 2026 23:56
@matts1

matts1 commented Aug 31, 2026

Copy link
Copy Markdown
Contributor Author

Looks like the formatter is broken globally

@josephlou5

Copy link
Copy Markdown
Contributor

Looks like the formatter is broken globally

See #10081.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants