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.

make absorb work

+39 -7
+27 -2
jj_tui/bin/file_commands.ml
··· 102 102 } 103 103 ; { 104 104 id = "absorb" 105 - ; description = "Absorb changes from index to working copy" 105 + ; description = "Move changes from this revision to the nearest parent that modified the same linesq" 106 106 ; sorting_key = 5.0 107 107 ; make_cmd = 108 108 (fun () -> ··· 116 116 ^ rev) 117 117 (Cmd (["absorb"; "--from"; rev] @ selected)))) 118 118 } 119 + ; { 120 + id = "absorb-into" 121 + ; description = "Absorb changes from index to working copy" 122 + ; sorting_key = 5.0 123 + ; make_cmd = 124 + (fun () -> 125 + PromptThen 126 + ( "Revision to move file to" 127 + , fun dest -> 128 + Dynamic_r 129 + (fun rev -> 130 + let selected = Lwd.peek active_files in 131 + confirm_prompt 132 + ("absorb all changes to:\n" 133 + ^ (selected |> String.concat "\n") 134 + ^ "\nin rev " 135 + ^ rev) 136 + (Cmd (["absorb"; "--from"; rev;"--to"; dest] @ selected))))) 137 + } 138 + ; { 139 + id = "undo" 140 + ; sorting_key = 7.0 141 + ; description = "Undo the last operation" 142 + ; make_cmd = (fun () -> Cmd [ "undo" ]) 143 + } 119 144 ] 120 145 |> List.to_seq 121 146 |> Seq.map (fun x -> x.id, x) 122 147 |> Hashtbl.of_seq 123 - end 148 + end
+4 -4
jj_tui/bin/graph_commands.ml
··· 82 82 (fun () -> 83 83 Cmd ([ "new"; "--no-edit"; "--insert-after" ] @ Vars.get_active_revs ()))) 84 84 } 85 - ; { 85 + ; { 86 86 id = "new_before" 87 87 ; sorting_key = 6.0 88 88 ; description = "Make a new change and insert it before the selected rev" ··· 273 273 [ 274 274 { 275 275 key = Key.key_of_string_exn "y" 276 - ; sort_key = 0.0 276 + ; sort_key = 0.0 277 277 ; description = "proceed" 278 278 ; cmd = 279 279 Cmd ··· 460 460 ; description = 461 461 "Absorb: Move changes of each file in this commit into the closest mutable \ 462 462 parent that modified that file" 463 - ; make_cmd = (fun () -> Cmd_r [ "absorb"; "--from"; ]) 463 + ; make_cmd = (fun () -> Dynamic_r (fun r -> Cmd [ "absorb"; "--from"; r ])) 464 464 } 465 465 ] 466 466 |> List.to_seq 467 467 |> Seq.map (fun x -> x.id, x) 468 468 |> Hashtbl.of_seq 469 469 ;; 470 - end 470 + end
+8 -1
jj_tui/lib/key_map.ml
··· 217 217 ; cmd "N" "move_to_child" 218 218 ; cmd "P" "move_to_parent" 219 219 ; cmd "a" "abandon" 220 - ; cmd "A" "absorb" 220 + ; sub 221 + "A" 222 + "absorb" 223 + [ 224 + cmd "a" "absorb" 225 + ; cmd "t" "absorb-into" 226 + ] 227 + ; cmd "u" "undo" 221 228 ] 222 229 } 223 230 ;;