Skip to content

feat(workspace): add origin op log and origin undo - #111

Open
PiquelChips wants to merge 1 commit into
feat/eventsfrom
feat/events-undo
Open

PiquelChips wants to merge 1 commit into
feat/eventsfrom
feat/events-undo

Conversation

@PiquelChips

Copy link
Copy Markdown
Member

The op log records what every workspace did, but nothing showed it, and nothing could take back a command that moved the working copy somewhere unwanted.

origin op log [-n <count>] lists the latest operations of every workspace, newest first. Each comes with what its entries record, and this workspace's operations are marked.

origin undo moves only this workspace's working copy back to where it was before its latest operation that moved it, and checks it out. Records and targets stay, since others may have them already, so an undone land still landed. undo never takes back operations from other workspaces, nor other undos. Undoing again takes back the operation before. Sometimes the revision moved back to is no longer a head of its change, as after describe. The working copy then becomes a new revision with its contents and unresolved conflicts, so the change doesn't diverge.

Looking up a target's name by its id now reads that target's name file instead of listing every target.

Note

Written by Claude Opus 5.5 in Claude Code (via T3 Code)

@coderabbitai

coderabbitai Bot commented Nov 22, 2026 •

Copy link
Copy Markdown

Warning

Review limit reached

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Next included review available in 34 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available.

Learn how review limits work.

Review configuration:

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Organization UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: ae382cb9-e799-47f0-9478-260245a4a303
Commits

Reviewing files that changed from the base of the PR and between 8138a2c and 38a9b30.

Files selected for processing: 7

  • README.md
  • apps/origin-src/src/cli.rs
  • apps/origin-src/src/oplog.rs
  • apps/origin-src/src/targets.rs
  • apps/origin-src/src/workspace/mod.rs
  • apps/origin-src/src/workspace/ops.rs
  • apps/origin-src/tests/cli.rs
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

@PiquelChips
PiquelChips added this pull request to stack #165 November 22, 2026 14:59
@PiquelChips
PiquelChips force-pushed the feat/events-undo branch 2 times, most recently from ca6f5ea to 9419351 Compare November 22, 2026 18:54
The op log records what every workspace did, but nothing showed it, and
a command that moved the working copy somewhere unwanted couldn't be
taken back.

`origin op log [-n <count>]` lists the latest operations of every
workspace, newest first, each with what its entries record, marking this
workspace's.

`origin undo` moves this workspace's working copy back to where it was
before its latest operation that moved it, and checks it out. That is all
it does: records and targets stay, since others may have them already,
so an undone `land` still landed. Operations from other workspaces are
never undone, nor are undos; undoing again takes back the operation
before. If the revision moved back to is no longer a head of its change,
as after `describe`, the working copy becomes a new revision with its
contents and unresolved conflicts, so the change doesn't diverge.

Looking a target's name up by its id now reads the one name file instead
of listing every target.
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.

1 participant