Skip to content

Commit

Permalink
WIP: run: Request the to be used working-copies from the WorkingCopyS…
Browse files Browse the repository at this point in the history
…tore backend.

NOTE: This should after its child, as the caching backend is not clear yet.

This also cleans up the `revisions: Vec<RevisionArg>` to a `RevisionArg` which was a leftover 
from a previous patch.
  • Loading branch information
PhilipMetzger committed Jun 20, 2024
1 parent 411d43c commit d099dfd
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions cli/src/commands/run.rs
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ pub struct RunArgs {
shell_command: String,
/// The revisions to change.
#[arg(long, short, default_value = "@")]
revisions: Vec<RevisionArg>,
revisions: RevisionArg,
/// A no-op option to match the interface of `git rebase -x`.
#[arg(short = 'x', hide = true)]
unused_command: bool,
Expand All @@ -52,7 +52,7 @@ pub fn cmd_run(ui: &mut Ui, command: &CommandHelper, args: &RunArgs) -> Result<(
let workspace_command = command.workspace_helper(ui)?;
let _resolved_commits: Vec<_> = workspace_command
.parse_union_revsets(&args.revisions)?
.evaluate_to_commits()?
.evaluate_to_commits()
.try_collect()?;
// Jobs are resolved in this order:
// 1. Commandline argument iff > 0.
Expand All @@ -65,5 +65,9 @@ pub fn cmd_run(ui: &mut Ui, command: &CommandHelper, args: &RunArgs) -> Result<(
}
// Fallback to a single user-visible job.
.unwrap_or(1usize);

let repo = workspace_command.repo();
let cache_backend = repo.working_copy_store();
let _wc_copies = cache_backend.get_or_create_stores(_resolved_commits)?;
Err(user_error("This is a stub, do not use"))
}

0 comments on commit d099dfd

Please sign in to comment.