Skip to content

No redo: an undone revision is visible in quilt log but unreachable #882

Description

@fiskus

quilt undo-commit (#860) moves the lineage pointer and prunes nothing — objects/ is never GC'd and the discarded revision's manifest stays under installed/. quilt log enumerates those manifests rather than walking a chain, so the undone revision keeps appearing, dated when this copy made it.

That is the intended reading of the log: an inventory of what this copy holds, not an account of what the package is. The bytes really are still there, so hiding the entry would under-report the copy's contents.

What is missing is the way back. A user can see the revision they undid and has no verb that returns to it.

Shape

The same primitive undo already introduces, pointed at a revision named by the user rather than at the parent: make the working tree match manifest M. Undo passes prev_hashes[0]; a redo would pass a hash the user supplies — quilt log already prints them.

The interesting part is not the apply, it is what redo does to the pending chain. Undo pops prev_hashes; a redo has to push back onto it, and the chain is a pending-push record rather than a history, so "the revision I undid" is only recoverable while the process remembers it or the user reads it off the log.

Worth settling before implementing:

  • does it take a hash argument, or only step forward one at a time?
  • how does it reconstruct prev_hashes — from the manifests on disk, which carry no parent pointer, or only from what the user names?
  • same guard as undo (refuse rather than overwrite anything uncommitted), presumably.

Related: #880 (nothing discards uncommitted work on a package with no remote), #841 (a package's published history is not available from the CLI).

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions