terminal user interface to jujutsu. Focused on speed and clarity
9
fork

Configure Feed

Select the types of activity you want to include in your feed.

fix branch and new rev commands

+16 -16
+14 -14
jj_tui/bin/graph_view.ml
··· 41 41 ; { 42 42 key = 'N' 43 43 ; description = "Make a new change and insert it after the selected rev" 44 - ; cmd = Cmd_with_revs (Active [ "new"; "--insert-after"]) 44 + ; cmd = 45 + Dynamic (fun () -> Cmd ([ "new"; "--insert-after" ] @ Vars.get_active_revs ())) 45 46 } 46 47 ; { 47 48 key = 'n' 48 - ; cmd = Cmd_with_revs (Active [ "new" ]) 49 + ; cmd = Cmd_with_revs (Active [ "new" ]) 49 50 ; description = "Make a new empty change as a child of the selected rev" 50 51 } 51 52 ; { ··· 72 73 ; cmd = 73 74 Fun 74 75 (fun _ -> 75 - let rev = Vars.get_hovered_rev() in 76 + let rev = Vars.get_hovered_rev () in 76 77 let source_msg, dest_msg = get_messages rev (rev ^ "-") in 77 78 let new_msg = 78 79 [ dest_msg; source_msg ] |> String.concat_non_empty "\n" ··· 310 311 branches_no_remote 311 312 ("Select the branch to set to rev: " ^ rev) 312 313 (fun branch -> 313 - Cmd 314 - [ "branch"; "set"; "-r"; get_hovered_rev (); "-B"; branch ])) 314 + Cmd [ "branch"; "set"; "-r"; get_hovered_rev (); "-B"; branch ])) 315 315 } 316 316 ; { 317 317 key = 't' ··· 320 320 branch_select_prompt 321 321 branches_remotes_not_tracked 322 322 "Select the branch to begin tracking" 323 - (fun branch -> Cmd [ "branch"; "track"; "-B"; branch ]) 323 + (fun branch -> Cmd [ "branch"; "track"; branch ]) 324 324 } 325 325 ; { 326 326 key = 'u' ··· 329 329 branch_select_prompt 330 330 branches_remotes_tracked 331 331 "Select the branch to untrack" 332 - (fun branch -> Cmd [ "branch"; "untrack"; "-B"; branch ]) 332 + (fun branch -> Cmd [ "branch"; "untrack"; branch ]) 333 333 } 334 334 ] 335 335 } ··· 425 425 let list_ui = 426 426 items 427 427 |> W.Lists.multi_selection_list_exclusions 428 - ~reset_selections:Vars.ui_state.reset_selection 428 + ~reset_selections:Vars.ui_state.reset_selection 429 429 ~on_selection_change:(fun ~hovered ~selected -> 430 430 (*Respond to change in selected revision*) 431 431 Lwd.set Vars.ui_state.hovered_revision hovered; 432 432 Lwd.set Vars.ui_state.selected_revisions selected; 433 433 (*If the files are focused we shouldn't send this*) 434 - if Focus.peek_has_focus focus then 435 - Show_view.(push_status (Graph_preview (Vars.get_hovered_rev ()))); 436 - 434 + (if Focus.peek_has_focus focus 435 + then Show_view.(push_status (Graph_preview (Vars.get_hovered_rev ())))); 437 436 [%log debug "Hovered revision: '%s'" (Global_vars.get_unique_id hovered)]; 438 437 Picos_std_structured.Flock.fork (fun () -> Global_funcs.update_views ())) 439 438 ~custom_handler:(fun ~selected ~selectable_items key -> handleKeys key) 440 439 in 441 440 let final_ui = 442 441 let$ list_ui = list_ui 443 - and$ _= Focus.status focus|>$(fun focus->if Focus.has_focus focus then 444 - Show_view.(push_status (Graph_preview (Vars.get_hovered_rev ()))); 445 - ) 442 + and$ _ = 443 + Focus.status focus |>$ fun focus -> 444 + if Focus.has_focus focus 445 + then Show_view.(push_status (Graph_preview (Vars.get_hovered_rev ()))) 446 446 and$ error = Lwd.get error_var in 447 447 match error with Some e -> e |> Ui.keyboard_area handleKeys | None -> list_ui 448 448 in
+2 -2
jj_tui/bin/jj_widgets.ml
··· 62 62 63 63 let branches_remotes_not_tracked = 64 64 get_branches_selectable 65 - @@ {|if(remote && !(remote.starts_with("git")&&remote.ends_with("git")) && !tracked, name++"|} 65 + @@ {|if(remote && !(remote.starts_with("git")&&remote.ends_with("git")) && !tracked, name++"@"++remote++"|} 66 66 ^ "\u{1C}" 67 67 ^ {|"++label("branch", name++" @"++remote) ++ if(present, format_ref_targets(self), " (deleted)")++ "\n")|} 68 68 ;; 69 69 70 70 let branches_remotes_tracked = 71 71 get_branches_selectable 72 - @@ {|if(remote && !(remote.starts_with("git")&&remote.ends_with("git")) && tracked, name++"|} 72 + @@ {|if(remote && !(remote.starts_with("git")&&remote.ends_with("git")) && tracked, name++"@"++remote++"|} 73 73 ^ "\u{1C}" 74 74 ^ {|"++label("branch", name++" @"++remote) ++ if(present, format_ref_targets(self), " (deleted)")++ "\n")|} 75 75 ;;