replacement in libflorescence/src/repo.rs at line 158
[18.1642]→[18.1642:1667](∅→∅) + remote_channel: String,
replacement in libflorescence/src/repo.rs at line 205
[18.1761]→[18.1761:1786](∅→∅) + remote_channel: String,
replacement in libflorescence/src/repo.rs at line 213
[18.1908]→[18.1908:1933](∅→∅) + pub remote_channel: String,
replacement in libflorescence/src/repo.rs at line 628
[11.2032]→[18.1934:1988](∅→∅) − MsgIn::CompareRemote { remote, channel } => {
+ MsgIn::CompareRemote {
+ remote,
+ remote_channel,
+ } => {
replacement in libflorescence/src/repo.rs at line 633
[18.2013]→[18.2013:2091](∅→∅) − compare_remote(&mut internal_state, &remote, &channel).await;
+ compare_remote(&mut internal_state, &remote, &remote_channel)
+ .await;
replacement in libflorescence/src/repo.rs at line 638
[18.2200]→[18.2200:2225](∅→∅) replacement in libflorescence/src/repo.rs at line 1789
[18.2959]→[18.2959:2983](∅→∅) + remote_channel_name: &str,
replacement in libflorescence/src/repo.rs at line 1798
[18.3182]→[18.3182:3228](∅→∅) − .open_or_create_channel(channel_name)
+ .open_or_create_channel(¤t_channel(&internal_state.repo)?)
edit in libflorescence/src/repo.rs at line 1802
[18.3353]→[18.3353:3403](∅→∅) − let from_channel = libpijul::DEFAULT_CHANNEL;
replacement in libflorescence/src/repo.rs at line 1808
[18.3574]→[18.3574:3596](∅→∅) replacement in libflorescence/src/repo.rs at line 1874
[18.5332]→[18.5332:5375](∅→∅) − channel: channel_name.to_string(),
+ remote_channel: remote_channel_name.to_string(),
edit in inflorescence_view/src/view.rs at line 25
edit in inflorescence_view/src/view.rs at line 49
+ SubMenuCompareRemoteSelectRemote(String),
+ SubMenuCompareRemoteInputRemoteChannel(String),
edit in inflorescence_view/src/view.rs at line 103
+ model::SubMenu::CompareRemote {
+ opt: Some(opt),
+ remote: _,
+ remote_channel: _,
+ } => match opt {
+ model::CompareRemoteOption::SelectingRemote { remote } => {
+ return compare_remote_selecting_remote(
+ state,
+ *window_size,
+ allowed_actions,
+ report,
+ remote,
+ sub_menu,
+ );
+ }
+ model::CompareRemoteOption::InputingRemoteChannel {
+ channel: remote_channel,
+ } => {
+ return compare_remote_input_remote_channel(
+ *window_size,
+ allowed_actions,
+ report,
+ remote_channel,
+ sub_menu,
+ );
+ }
+ },
replacement in inflorescence_view/src/view.rs at line 133
[19.1213]→[19.1213:1408](∅→∅) − | model::SubMenu::InitRepo { .. }
− | model::SubMenu::ImportFromGit { .. }
− | model::SubMenu::Add { .. }
− | model::SubMenu::CompareRemote { .. } => {}
+ | model::SubMenu::InitRepo { path: _ }
+ | model::SubMenu::ImportFromGit { path: _ }
+ | model::SubMenu::Add { recursive: _ }
+ | model::SubMenu::CompareRemote { opt: None, .. } => {}
edit in inflorescence_view/src/view.rs at line 429
+ fn compare_remote_selecting_remote<'a>(
+ state: &'a model::State,
+ window_size: iced::Size,
+ allowed_actions: &'a [action::Binding],
+ report: &'a report::Container,
+ remote: &'a Option<String>,
+ sub_menu: &'a Option<model::SubMenu>,
+ ) -> Element<'a, Msg, Theme> {
+ view_selecting_remote(
+ state,
+ window_size,
+ allowed_actions,
+ report,
+ remote,
+ sub_menu,
+ Msg::SubMenuCompareRemoteSelectRemote,
+ )
+ }
+
+ fn compare_remote_input_remote_channel<'a>(
+ window_size: iced::Size,
+ allowed_actions: &'a [action::Binding],
+ report: &'a report::Container,
+ remote: &'a Option<String>,
+ sub_menu: &'a Option<model::SubMenu>,
+ ) -> Element<'a, Msg, Theme> {
+ view_input_remote_channel(
+ window_size,
+ allowed_actions,
+ report,
+ remote,
+ sub_menu,
+ Msg::SubMenuCompareRemoteInputRemoteChannel,
+ )
+ }
+
edit in inflorescence_view/src/view.rs at line 510
+
+ fn view_input_remote_channel<'a>(
+ window_size: iced::Size,
+ allowed_actions: &'a [action::Binding],
+ report: &'a report::Container,
+ channel: &'a Option<String>,
+ sub_menu: &'a Option<model::SubMenu>,
+ on_input: impl Fn(String) -> Msg + Copy + 'static,
+ ) -> Element<'a, Msg, Theme> {
+ let main = el(column([
+ view_header("Name of a remote channel:"),
+ el(text("Hint: to view a changes from e.g. a discussion number 42 enter \"name:42\".")),
+ el(text_input(
+ "",
+ channel
+ .as_ref()
+ .map(Cow::Borrowed)
+ .unwrap_or_default()
+ .as_ref(),
+ )
+ .on_input(on_input)),
+ ]));
+
+ let main = el(container(main).width(Length::Fill).height(Length::Fill));
edit in inflorescence_view/src/view.rs at line 535
+ add_actions_and_report(
+ None,
+ main,
+ window_size,
+ allowed_actions,
+ report,
+ sub_menu,
+ false,
+ )
+ }
+
replacement in inflorescence_view/src/view.rs at line 582
[19.3837]→[19.3837:3872](∅→∅),
[19.3872]→[20.2534:2596](∅→∅),
[20.2633]→[20.2633:2763](∅→∅) − model::SubMenu::Push {
− opt: _,
− remote: Some(remote),
− } => {
− actions_inner =
− actions_inner.push(el(text(format!("Remote: {remote}"))));
+ model::SubMenu::Push { opt: _, remote } => {
+ if let Some(remote) = remote {
+ actions_inner = actions_inner
+ .push(el(text(format!("Remote: {remote}"))));
+ }
replacement in inflorescence_view/src/view.rs at line 588
[20.2777]→[20.2777:2812](∅→∅) + model::SubMenu::Pull { opt: _, remote } => {
+ if let Some(remote) = remote {
+ actions_inner = actions_inner
+ .push(el(text(format!("Remote: {remote}"))));
+ }
+ }
+ model::SubMenu::CompareRemote {
replacement in inflorescence_view/src/view.rs at line 596
[19.3896]→[19.3896:3934](∅→∅) + remote,
+ remote_channel,
replacement in inflorescence_view/src/view.rs at line 599
[19.3953]→[19.3953:4064](∅→∅) − actions_inner =
− actions_inner.push(el(text(format!("Remote: {remote}"))));
+ if let Some(remote) = remote {
+ actions_inner = actions_inner
+ .push(el(text(format!("Remote: {remote}"))));
+ }
+ if let Some(channel) = remote_channel {
+ actions_inner = actions_inner
+ .push(el(text(format!("Remote channel: {channel}"))));
+ }
replacement in inflorescence_view/src/view.rs at line 608
[19.4078]→[19.4078:4132](∅→∅),
[19.4132]→[20.2851:2907](∅→∅),
[20.2907]→[19.4167:4404](∅→∅),
[19.4167]→[19.4167:4404](∅→∅) − model::SubMenu::Push { remote: None, .. }
− | model::SubMenu::Pull { remote: None, .. }
− | model::SubMenu::ResetChange
− | model::SubMenu::InitRepo { .. }
− | model::SubMenu::ImportFromGit { .. }
− | model::SubMenu::Add { .. }
− | model::SubMenu::CompareRemote { .. } => {}
+ model::SubMenu::ResetChange
+ | model::SubMenu::InitRepo { path: _ }
+ | model::SubMenu::ImportFromGit { path: _ }
+ | model::SubMenu::Add { recursive: _ } => {}
replacement in inflorescence_view/src/view.rs at line 654
[8.4551]→[18.5418:5443](∅→∅) replacement in inflorescence_view/src/view.rs at line 1683
[18.7605]→[18.7605:7891](∅→∅) − if let Some(record_dichotomy) =
− remotes.default.as_ref().and_then(|default_remote| {
− model::get_record_dichotomy(
− record_dichotomy,
− default_remote,
− channel,
− )
− })
+ if let selection::Unified::CompareRemote(Some(
+ selection::CompareRemote {
+ ix: _,
+ hash: _,
+ file: _,
+ remote,
+ remote_channel,
+ },
+ )) = selection
+ && let Some(record_dichotomy) = model::get_record_dichotomy(
+ record_dichotomy,
+ remote,
+ remote_channel,
+ )
replacement in inflorescence_view/src/view.rs at line 1722
[18.8977]→[18.8977:9021](∅→∅) replacement in inflorescence_view/src/view.rs at line 1805
[18.12101]→[18.12101:12148](∅→∅) − remote: _,
− channel: _,
+ remote,
+ remote_channel,
replacement in inflorescence_view/src/view.rs at line 1809
[18.12226]→[18.12226:12502](∅→∅) − remotes.default.as_ref().and_then(|default_remote| {
− model::get_record_dichotomy(
− record_dichotomy,
− default_remote,
− channel,
− )
− }) {
+ model::get_record_dichotomy(
+ record_dichotomy,
+ remote,
+ remote_channel,
+ ) {
replacement in inflorescence_view/src/view.rs at line 1895
[18.15846]→[18.15846:15870](∅→∅) replacement in inflorescence_view/src/view.rs at line 2176
[12.4692]→[18.16830:16897](∅→∅) − Job::CompareRemote { remote, channel } => el(text(format!(
+ Job::CompareRemote {
+ remote,
+ remote_channel: channel,
+ } => el(text(format!(
replacement in inflorescence_model/src/selection.rs at line 148
[18.17783]→[18.17783:17808](∅→∅) + pub remote_channel: String,
edit in inflorescence_model/src/model.rs at line 105
+ /// Confirmed remote selection
replacement in inflorescence_model/src/model.rs at line 107
[18.18131]→[18.18131:18164](∅→∅) − channel: Option<String>,
+ /// Confirmed remote channel selection
+ remote_channel: Option<String>,
+ opt: Option<CompareRemoteOption>,
edit in inflorescence_model/src/model.rs at line 129
+ #[derive(Clone, Debug, PartialEq, Eq, Hash)]
+ pub enum CompareRemoteOption {
+ SelectingRemote {
+ /// Set while selecting remote and discarded on cancel
+ remote: Option<String>,
+ },
+ InputingRemoteChannel {
+ /// Set while selecting channel and discarded on cancel
+ channel: Option<String>,
+ },
+ }
+
replacement in inflorescence_model/src/model.rs at line 177
[12.5181]→[18.18172:18231](∅→∅) − // Outer key is remote name, inner key is channel name
+ // Outer key is remote name, inner key is remote channel name
replacement in inflorescence_model/src/model.rs at line 188
[18.18482]→[18.18482:18501](∅→∅) replacement in inflorescence_model/src/model.rs at line 192
[18.18584]→[18.18584:18626](∅→∅) − .and_then(|map| map.get(channel))
+ .and_then(|map| map.get(remote_channel))
replacement in inflorescence_model/src/model.rs at line 268
[12.5258]→[20.4204:4250](∅→∅),
[20.4250]→[19.4998:5044](∅→∅),
[12.5288]→[19.4998:5044](∅→∅),
[19.5044]→[18.19259:19314](∅→∅),
[12.5318]→[18.19259:19314](∅→∅) − Pull { remote: String, channel: String },
− Push { remote: String, channel: String },
− CompareRemote { remote: String, channel: String },
+ Pull {
+ remote: String,
+ channel: String,
+ },
+ Push {
+ remote: String,
+ channel: String,
+ },
+ CompareRemote {
+ remote: String,
+ remote_channel: String,
+ },
edit in inflorescence_model/src/action.rs at line 60
+ SubMenuCompareRemoteOption(model::CompareRemoteOption),
edit in inflorescence_model/src/action.rs at line 132
+ (
+ SubMenuCompareRemoteOption(left),
+ SubMenuCompareRemoteOption(right),
+ ) => core::mem::discriminant(left) == core::mem::discriminant(right),
edit in inflorescence_model/src/action.rs at line 160
+ (SubMenuCompareRemoteOption(_), _) => false,
replacement in inflorescence_model/src/action.rs at line 290
[18.19390]→[18.19390:19418](∅→∅) + remote_channel: _,
+ opt,
replacement in inflorescence_model/src/action.rs at line 293
[18.19437]→[18.19437:20258](∅→∅) − // TODO select remote name
− // TODO select local and remote channel
− vec![
− Binding {
− keys_str: "Enter | S-c",
− keys: ModKeys::Two(
− ModKey {
− key: Key::Named(Named::Enter),
− mods: Mods::NONE,
− },
− ModKey {
− key: Key::Character("c".into()),
− mods: Mods::SHIFT,
− },
− ),
− label: "compare default remote",
− msg: Some(FilteredMsg::Confirm),
− },
− cancel(),
− ]
+ if let Some(opt) = opt {
+ let confirm_label = match opt {
+ model::CompareRemoteOption::SelectingRemote {
+ ..
+ } => "confirm remote selection",
+ model::CompareRemoteOption::InputingRemoteChannel {
+ ..
+ } => "confirm channel input",
+ };
+ vec![confirm(confirm_label), down(), up(), cancel()]
+ } else {
+ vec![
+ Binding {
+ keys_str: "Enter | S-c",
+ keys: ModKeys::Two(
+ ModKey {
+ key: Key::Named(Named::Enter),
+ mods: Mods::NONE,
+ },
+ ModKey {
+ key: Key::Character("c".into()),
+ mods: Mods::SHIFT,
+ },
+ ),
+ label: "compare remote",
+ msg: Some(FilteredMsg::Confirm),
+ },
+ select_remote(Some(
+ FilteredMsg::SubMenuCompareRemoteOption(
+ model::CompareRemoteOption::SelectingRemote {
+ remote: None,
+ },
+ ),
+ )),
+ select_remote_channel(Some(
+ FilteredMsg::SubMenuCompareRemoteOption(
+ model::CompareRemoteOption::InputingRemoteChannel {
+ channel: None,
+ },
+ ),
+ )),
+ cancel(),
+ ]
+ }
replacement in inflorescence_model/src/action.rs at line 850
[18.20715]→[18.20715:20750](∅→∅) + remote_channel: None,
+ opt: None,
replacement in inflorescence_model/src/action.rs at line 1243
[9.15165]→[18.22417:22442](∅→∅) replacement in inflorescence_model/src/action.rs at line 1523
[18.22619]→[18.22619:22959](∅→∅) − let has_any_diff = remotes
− .default
− .as_ref()
− .and_then(|default_remote| {
− model::get_record_dichotomy(
− record_dichotomy,
− default_remote,
− channel,
− )
− })
+ if let Some(selection::CompareRemote {
+ ix: _,
+ hash: _,
+ file,
+ remote,
+ remote_channel,
+ }) = compare_remote_selection
+ {
+ let has_any_diff = model::get_record_dichotomy(
+ record_dichotomy,
+ remote,
+ remote_channel,
+ )
edit in inflorescence_model/src/action.rs at line 1538
[18.23034]→[18.23034:23154](∅→∅) − if let Some(selection::CompareRemote { file, .. }) =
− compare_remote_selection
− {
replacement in inflorescence_model/src/action.rs at line 1566
[18.24374]→[18.24374:24408](∅→∅) edit in inflorescence_model/src/action.rs at line 1729
+ msg,
+ }
+ }
+
+ fn select_remote_channel(msg: Option<FilteredMsg>) -> Binding {
+ Binding {
+ keys_str: "c",
+ keys: ModKeys::One(ModKey {
+ key: Key::Character("c".into()),
+ mods: Mods::NONE,
+ }),
+ label: "select remote channel",
replacement in inflorescence/src/selection.rs at line 564
[18.25333]→[18.25333:25358](∅→∅) + remote_channel: channel,
replacement in inflorescence/src/selection.rs at line 586
[18.26176]→[18.26176:26213](∅→∅) + remote_channel: channel,
replacement in inflorescence/src/selection.rs at line 622
[18.27551]→[18.27551:27588](∅→∅) + remote_channel: channel,
replacement in inflorescence/src/selection.rs at line 1081
[18.29368]→[18.29368:29393](∅→∅) + remote_channel: channel,
replacement in inflorescence/src/selection.rs at line 1103
[18.30211]→[18.30211:30248](∅→∅) + remote_channel: channel,
replacement in inflorescence/src/selection.rs at line 1136
[18.31478]→[18.31478:31515](∅→∅) + remote_channel: channel,
replacement in inflorescence/src/selection.rs at line 1473
[18.33341]→[18.33341:33370](∅→∅) + remote_channel: channel,
replacement in inflorescence/src/selection.rs at line 1486
[18.33875]→[18.33875:33916](∅→∅) + remote_channel: channel,
replacement in inflorescence/src/selection.rs at line 1496
[18.34243]→[18.34243:34280](∅→∅) + remote_channel: channel,
replacement in inflorescence/src/selection.rs at line 1884
[18.35104]→[18.35104:35129](∅→∅) + remote_channel: channel,
replacement in inflorescence/src/selection.rs at line 1926
[18.37076]→[18.37076:37113](∅→∅) + remote_channel: channel,
replacement in inflorescence/src/selection.rs at line 1949
[18.37982]→[18.37982:38019](∅→∅) + remote_channel: channel,
replacement in inflorescence/src/selection.rs at line 1960
[18.38341]→[18.38341:38374](∅→∅) + remote_channel: channel,
replacement in inflorescence/src/selection.rs at line 2279
[18.39502]→[18.39502:39531](∅→∅) + remote_channel: channel,
replacement in inflorescence/src/selection.rs at line 2313
[18.40952]→[18.40952:40989](∅→∅) + remote_channel: channel,
replacement in inflorescence/src/selection.rs at line 2823
[18.43088]→[18.43088:43105](∅→∅) + remote_channel: channel,
replacement in inflorescence/src/main.rs at line 472
[20.6779]→[20.6779:6852](∅→∅) − | action::FilteredMsg::SubMenuPullOption(_) => Task::none(),
+ | action::FilteredMsg::SubMenuPullOption(_)
+ | action::FilteredMsg::SubMenuCompareRemoteOption(_) => {
+ Task::none()
+ }
replacement in inflorescence/src/main.rs at line 497
[20.6901]→[20.6901:6966](∅→∅) − | view::Msg::SubMenuPullSelectRemote(_) => Task::none(),
+ | view::Msg::SubMenuPullSelectRemote(_)
+ | view::Msg::SubMenuCompareRemoteSelectRemote(_)
+ | view::Msg::SubMenuCompareRemoteInputRemoteChannel(_) => Task::none(),
replacement in inflorescence/src/main.rs at line 1008
[20.7078]→[20.7078:7151](∅→∅) − | action::FilteredMsg::SubMenuPullOption(_) => Task::none(),
+ | action::FilteredMsg::SubMenuPullOption(_)
+ | action::FilteredMsg::SubMenuCompareRemoteOption(_) => {
+ Task::none()
+ }
replacement in inflorescence/src/main.rs at line 1029
[20.7200]→[20.7200:7265](∅→∅) − | view::Msg::SubMenuPullSelectRemote(_) => Task::none(),
+ | view::Msg::SubMenuPullSelectRemote(_)
+ | view::Msg::SubMenuCompareRemoteSelectRemote(_)
+ | view::Msg::SubMenuCompareRemoteInputRemoteChannel(_) => Task::none(),
replacement in inflorescence/src/main.rs at line 1102
[18.44236]→[18.44236:44274](∅→∅) replacement in inflorescence/src/main.rs at line 1107
[18.44451]→[18.44451:44492](∅→∅) replacement in inflorescence/src/main.rs at line 1165
[19.7943]→[19.7943:8017](∅→∅) − if let Some(model::SubMenu::Push { remote, .. }) = sub_menu {
+ if let Some(model::SubMenu::Push {
+ opt: Some(model::PushOption::SelectingRemote { remote }),
+ ..
+ }) = sub_menu
+ {
replacement in inflorescence/src/main.rs at line 1175
[20.7417]→[20.7417:7491](∅→∅) − if let Some(model::SubMenu::Pull { remote, .. }) = sub_menu {
+ if let Some(model::SubMenu::Pull {
+ opt: Some(model::PullOption::SelectingRemote { remote }),
+ ..
+ }) = sub_menu
+ {
+ *remote = Some(selection);
+ }
+ Task::none()
+ }
+ view::Msg::SubMenuCompareRemoteSelectRemote(selection) => {
+ if let Some(model::SubMenu::CompareRemote {
+ opt:
+ Some(model::CompareRemoteOption::SelectingRemote { remote }),
+ ..
+ }) = sub_menu
+ {
edit in inflorescence/src/main.rs at line 1192
+ }
+ Task::none()
+ }
+ view::Msg::SubMenuCompareRemoteInputRemoteChannel(input) => {
+ if let Some(model::SubMenu::CompareRemote {
+ opt:
+ Some(model::CompareRemoteOption::InputingRemoteChannel {
+ channel,
+ }),
+ ..
+ }) = sub_menu
+ {
+ *channel = Some(input);
replacement in inflorescence/src/main.rs at line 1255
[18.44685]→[18.44685:44799](∅→∅) − Some(model::SubMenu::CompareRemote { remote, channel }) => {
− if let Some(ReadyState {
+ Some(model::SubMenu::CompareRemote {
+ remote,
+ remote_channel,
+ opt,
+ }) => {
+ if let Some(opt) = opt {
+ match opt {
+ model::CompareRemoteOption::SelectingRemote {
+ remote,
+ } => {
+ *sub_menu = Some(model::SubMenu::CompareRemote {
+ remote: remote.clone(),
+ remote_channel: remote_channel.clone(),
+ opt: None,
+ });
+ Task::none()
+ }
+ model::CompareRemoteOption::InputingRemoteChannel {
+ channel,
+ } => {
+ *sub_menu = Some(model::SubMenu::CompareRemote {
+ remote: remote.clone(),
+ remote_channel: channel.clone(),
+ opt: None,
+ });
+ Task::none()
+ }
+ }
+ } else if let Some(ReadyState {
replacement in inflorescence/src/main.rs at line 1295
[18.45190]→[18.45190:45236](∅→∅) + let remote_channel = remote_channel
replacement in inflorescence/src/main.rs at line 1300
[18.45459]→[18.45459:45513](∅→∅) − channel: channel.clone(),
+ remote_channel: remote_channel.clone(),
replacement in inflorescence/src/main.rs at line 1309
[18.45917]→[18.45917:45975](∅→∅) − channel: channel.clone(),
+ remote_channel: remote_channel.clone(),
replacement in inflorescence/src/main.rs at line 1315
[18.46180]→[18.46180:46221](∅→∅) replacement in inflorescence/src/main.rs at line 1321
[18.46398]→[18.46398:46470](∅→∅) − "No default remote configured".to_string(),
+ "Missing remote configuration (check your `.pijul/config.toml`)".to_string(),
edit in inflorescence/src/main.rs at line 1325
+ Task::none()
+ } else {
+ Task::none()
edit in inflorescence/src/main.rs at line 1329
[18.46575]→[18.46575:46604](∅→∅) edit in inflorescence/src/main.rs at line 1426
+ remote,
+ opt: None,
+ });
+ return Task::none();
+ }
+ }
+ model::SubMenu::CompareRemote {
+ remote,
+ remote_channel,
+ opt,
+ } => {
+ if opt.is_some() {
+ *sub_menu = Some(model::SubMenu::CompareRemote {
edit in inflorescence/src/main.rs at line 1440
replacement in inflorescence/src/main.rs at line 1447
[20.9279]→[19.8993:9220](∅→∅),
[19.8993]→[19.8993:9220](∅→∅) − | model::SubMenu::InitRepo { .. }
− | model::SubMenu::ImportFromGit { .. }
− | model::SubMenu::Add { .. }
− | model::SubMenu::CompareRemote { .. } => {}
+ | model::SubMenu::InitRepo { path: _ }
+ | model::SubMenu::ImportFromGit { path: _ }
+ | model::SubMenu::Add { recursive: _ } => {}
replacement in inflorescence/src/main.rs at line 1484
[19.9310]→[19.9310:9353](∅→∅),
[19.9353]→[20.9280:9315](∅→∅),
[20.9357]→[19.9385:9452](∅→∅),
[19.9385]→[19.9385:9452](∅→∅) − model::SubMenu::Push {
− remote: _,
− opt: Some(opt),
− } => {
+ model::SubMenu::Push { opt: Some(opt), .. } => {
replacement in inflorescence/src/main.rs at line 1491
[20.9599]→[20.9599:9677](∅→∅),
[20.9719]→[20.9719:9786](∅→∅) − model::SubMenu::Pull {
− remote: _,
− opt: Some(opt),
− } => {
+ model::SubMenu::Pull { opt: Some(opt), .. } => {
replacement in inflorescence/src/main.rs at line 1498
[19.9795]→[19.9795:9843](∅→∅),
[19.9843]→[20.10157:10207](∅→∅) − model::SubMenu::Push { .. }
− | model::SubMenu::Pull { .. }
+ model::SubMenu::CompareRemote {
+ opt: Some(opt), ..
+ } => {
+ if let Some(ReadyState { repo, .. }) =
+ model::is_ready_mut(model)
+ {
+ return sub_menu_compare_remote_opt_selection(
+ msg, opt, repo,
+ );
+ }
+ }
+ model::SubMenu::Push { opt: _, remote: _ }
+ | model::SubMenu::Pull { opt: _, remote: _ }
+ | model::SubMenu::CompareRemote {
+ opt: _,
+ remote: _,
+ remote_channel: _,
+ }
replacement in inflorescence/src/main.rs at line 1517
[19.9936]→[19.9936:10163](∅→∅) − | model::SubMenu::InitRepo { .. }
− | model::SubMenu::ImportFromGit { .. }
− | model::SubMenu::Add { .. }
− | model::SubMenu::CompareRemote { .. } => {}
+ | model::SubMenu::InitRepo { path: _ }
+ | model::SubMenu::ImportFromGit { path: _ }
+ | model::SubMenu::Add { recursive: _ } => {}
replacement in inflorescence/src/main.rs at line 1539
[18.47120]→[18.47120:47158](∅→∅) replacement in inflorescence/src/main.rs at line 1544
[18.47335]→[18.47335:47376](∅→∅) edit in inflorescence/src/main.rs at line 1740
+ *opt = Some(new_opt);
+ }
+ Task::none()
+ }
+ action::FilteredMsg::SubMenuCompareRemoteOption(mut new_opt) => {
+ if let Some(model::SubMenu::CompareRemote {
+ opt,
+ remote,
+ remote_channel,
+ }) = sub_menu
+ {
+ let task = match &mut new_opt {
+ model::CompareRemoteOption::SelectingRemote {
+ remote: selecting_remote,
+ } => {
+ *selecting_remote = remote.clone();
+ Task::none()
+ }
+ model::CompareRemoteOption::InputingRemoteChannel {
+ channel: selecting_channel,
+ } => {
+ *selecting_channel = remote_channel.clone();
+ task::widget_focus_next()
+ }
+ };
edit in inflorescence/src/main.rs at line 1766
replacement in inflorescence/src/main.rs at line 1889
[18.47848]→[18.47848:47876](∅→∅) edit in inflorescence/src/main.rs at line 1948
+ remote_selection(msg, remote, remote_names)
+ }
+ }
+ }
+
+ fn sub_menu_compare_remote_opt_selection(
+ msg: selection::Msg,
+ opt: &mut model::CompareRemoteOption,
+ repo: &mut repo::State,
+ ) -> Task<Msg> {
+ match opt {
+ model::CompareRemoteOption::SelectingRemote { remote } => {
+ let repo::Remotes { default, other } = &repo.remotes;
+ let remote_names: Vec<_> = default.iter().chain(other).collect();
edit in inflorescence/src/main.rs at line 1963
+ }
+ model::CompareRemoteOption::InputingRemoteChannel { channel: _ } => {
+ // Remote channel is just a text input
+ Task::none()
replacement in inflorescence/src/main.rs at line 2355
[18.51748]→[18.51748:51769](∅→∅) replacement in inflorescence/src/main.rs at line 2362
[18.51942]→[18.51942:51971](∅→∅) replacement in inflorescence/src/main.rs at line 2371
[18.52285]→[18.52285:52334](∅→∅) + .insert(remote_channel, d);
replacement in inflorescence/src/main.rs at line 2376
[18.52434]→[18.52434:52554](∅→∅) − format!("Failed to compare with remote with {err:?}. Remote {remote:?}, channel: {channel:?}");
+ format!("Failed to compare with remote with {err:?}. Remote {remote:?}, channel: {remote_channel:?}");
replacement in inflorescence/src/main.rs at line 2381
[18.52717]→[18.52717:52792](∅→∅) − jobs.swap_remove(&Job::CompareRemote { remote, channel });
+ jobs.swap_remove(&Job::CompareRemote {
+ remote,
+ remote_channel,
+ });