-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
This merges PR martinvonz#3191 (OpenSSH) and PR martinvonz#2845 (Gerrit) in order to build from the combination.
- Loading branch information
Showing
13 changed files
with
704 additions
and
28 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -22,7 +22,7 @@ include = [ | |
"/tests/", | ||
"!*.pending-snap", | ||
"!*.snap*", | ||
"/tests/[email protected]" | ||
"/tests/[email protected]", | ||
] | ||
|
||
[[bin]] | ||
|
@@ -64,6 +64,7 @@ esl01-renderdag = { workspace = true } | |
futures = { workspace = true } | ||
git2 = { workspace = true } | ||
gix = { workspace = true } | ||
hex = { workspace = true } | ||
indexmap = { workspace = true } | ||
indoc = { workspace = true } | ||
itertools = { workspace = true } | ||
|
@@ -74,6 +75,7 @@ once_cell = { workspace = true } | |
pest = { workspace = true } | ||
pest_derive = { workspace = true } | ||
pollster = { workspace = true } | ||
rand = { workspace = true } | ||
rayon = { workspace = true } | ||
regex = { workspace = true } | ||
rpassword = { workspace = true } | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
// Copyright 2024 The Jujutsu Authors | ||
// | ||
// Licensed under the Apache License, Version 2.0 (the "License"); | ||
// you may not use this file except in compliance with the License. | ||
// You may obtain a copy of the License at | ||
// | ||
// https://www.apache.org/licenses/LICENSE-2.0 | ||
// | ||
// Unless required by applicable law or agreed to in writing, software | ||
// distributed under the License is distributed on an "AS IS" BASIS, | ||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
// See the License for the specific language governing permissions and | ||
// limitations under the License. | ||
|
||
use std::fmt::Debug; | ||
|
||
use clap::Subcommand; | ||
|
||
use crate::cli_util::CommandHelper; | ||
use crate::command_error::CommandError; | ||
use crate::commands::gerrit; | ||
use crate::ui::Ui; | ||
|
||
/// Interact with Gerrit Code Review. | ||
#[derive(Subcommand, Clone, Debug)] | ||
pub enum GerritCommand { | ||
/// Send changes to Gerrit for code review, or update existing changes. | ||
/// | ||
/// Sending in a set of revisions to Gerrit creates a single "change" for | ||
/// each revision included in the revset. This change is then available for | ||
/// review on your Gerrit instance. | ||
/// | ||
/// This command modifies each commit in the revset to include a `Change-Id` | ||
/// footer in its commit message if one does not already exist. Note that | ||
/// this ID is NOT compatible with jj IDs, and is Gerrit-specific. | ||
/// | ||
/// If a change already exists for a given revision (i.e. it contains the | ||
/// same `Change-Id`), this command will update the contents of the existing | ||
/// change to match. | ||
/// | ||
/// Note: this command takes 1-or-more revsets arguments, each of which can | ||
/// resolve to multiple revisions; so you may post trees or ranges of | ||
/// commits to Gerrit for review all at once. | ||
Send(gerrit::send::SendArgs), | ||
} | ||
|
||
pub fn cmd_gerrit( | ||
ui: &mut Ui, | ||
command: &CommandHelper, | ||
subcommand: &GerritCommand, | ||
) -> Result<(), CommandError> { | ||
match subcommand { | ||
GerritCommand::Send(review) => gerrit::send::cmd_send(ui, command, review), | ||
} | ||
} | ||
|
||
mod send; |
Oops, something went wrong.