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.

updated to use bookmark instead of branch

+40 -40
+40 -40
jj_tui/bin/graph_view.ml
··· 13 13 open Process 14 14 open Jj_tui.Process_wrappers.Make (Process) 15 15 16 - let branch_select_prompt get_branch_list name func = 16 + let bookmark_select_prompt get_bookmark_list name func = 17 17 Selection_prompt 18 18 ( name 19 - , (fun () -> get_branch_list () |> Lwd.pure) 20 - , (fun x branch_name -> branch_name |> Base.String.is_substring ~substring:x) 19 + , (fun () -> get_bookmark_list () |> Lwd.pure) 20 + , (fun x bookmark_name -> bookmark_name |> Base.String.is_substring ~substring:x) 21 21 , func ) 22 22 ;; 23 23 ··· 173 173 } 174 174 ; { 175 175 key = 'b' 176 - ; description = "Rebase revision and all other revissions on its branch" 176 + ; description = "Rebase revision and all other revissions on its bookmark" 177 177 ; cmd = 178 178 Dynamic_r 179 179 (fun rev -> 180 180 Prompt 181 - ( "Dest rev for branch including " ^ rev 181 + ( "Dest rev for bookmark including " ^ rev 182 182 , [ "rebase"; "-b"; rev; "-d" ] )) 183 183 } 184 184 ] ··· 246 246 } 247 247 ; { 248 248 key = 'b' 249 - ; description = "Branch commands" 249 + ; description = "Bookmark commands" 250 250 ; cmd = 251 251 SubCmd 252 252 [ 253 253 { 254 254 key = 'c' 255 - ; description = "Create new branch" 255 + ; description = "Create new bookmark" 256 256 ; cmd = 257 257 PromptThen 258 - ( "Branch name to create" 258 + ( "Bookmark name to create" 259 259 , fun x -> 260 260 Cmd_r 261 - ([ "branch"; "create" ] 261 + ([ "bookmark"; "create" ] 262 262 @ [ x |> String.map (fun c -> if c = ' ' then '_' else c) ]) ) 263 263 } 264 264 ; { 265 265 key = 'd' 266 - ; description = "Delete branch" 266 + ; description = "Delete bookmark" 267 267 ; cmd = 268 - branch_select_prompt 268 + bookmark_select_prompt 269 269 branches_no_remote 270 - "Branch to delete" 271 - (fun branch -> 272 - Cmd [ "branch"; "delete"; branch ] 270 + "Bookmark to delete" 271 + (fun bookmark -> 272 + Cmd [ "bookmark"; "delete"; bookmark ] 273 273 |> confirm_prompt 274 274 (Printf.sprintf 275 - "delete the branch: '%s' This will also delete it on the \ 275 + "delete the bookmark: '%s' This will also delete it on the \ 276 276 remote next \"git push\"." 277 - branch)) 277 + bookmark)) 278 278 } 279 279 ; { 280 280 key = 'f' 281 - ; description = "Forget branch" 281 + ; description = "Forget bookmark" 282 282 ; cmd = 283 - branch_select_prompt 283 + bookmark_select_prompt 284 284 branches_no_remote 285 - "Branch to forget" 286 - (fun branch -> 287 - Cmd [ "branch"; "forget"; branch ] 285 + "Bookmark to forget" 286 + (fun bookmark -> 287 + Cmd [ "bookmark"; "forget"; bookmark ] 288 288 |> confirm_prompt 289 289 (Printf.sprintf 290 - "orget the branch: '%s' . This will not delete it on the \ 290 + "forget the bookmark: '%s' . This will not delete it on the \ 291 291 remote." 292 - branch)) 292 + bookmark)) 293 293 } 294 294 ; { 295 295 key = 'r' 296 - ; description = "Rename branch" 296 + ; description = "Rename bookmark" 297 297 ; cmd = 298 - branch_select_prompt 298 + bookmark_select_prompt 299 299 branches_no_remote 300 - "Select the branch to rename (only local/tracked branches are shown)" 300 + "Select the bookmark to rename (only local/tracked bookmarks are shown)" 301 301 (fun curr_name -> 302 - Prompt ("New branch name", [ "branch"; "rename"; curr_name ])) 302 + Prompt ("New bookmark name", [ "bookmark"; "rename"; curr_name ])) 303 303 } 304 304 ; { 305 305 key = 's' 306 - ; description = "Set branch to this change" 306 + ; description = "Set bookmark to this change" 307 307 ; cmd = 308 308 Dynamic_r 309 309 (fun rev -> 310 - branch_select_prompt 310 + bookmark_select_prompt 311 311 branches_no_remote 312 - ("Select the branch to set to rev: " ^ rev) 313 - (fun branch -> 314 - Cmd [ "branch"; "set"; "-r"; get_hovered_rev (); "-B"; branch ])) 312 + ("Select the bookmark to set to rev: " ^ rev) 313 + (fun bookmark -> 314 + Cmd [ "bookmark"; "set"; "-r"; get_hovered_rev (); "-B"; bookmark ])) 315 315 } 316 316 ; { 317 317 key = 't' 318 - ; description = "track given remote branch" 318 + ; description = "track given remote bookmark" 319 319 ; cmd = 320 - branch_select_prompt 320 + bookmark_select_prompt 321 321 branches_remotes_not_tracked 322 - "Select the branch to begin tracking" 323 - (fun branch -> Cmd [ "branch"; "track"; branch ]) 322 + "Select the bookmark to begin tracking" 323 + (fun bookmark -> Cmd [ "bookmark"; "track"; bookmark ]) 324 324 } 325 325 ; { 326 326 key = 'u' 327 - ; description = "untrack given remote branch" 327 + ; description = "untrack given remote bookmark" 328 328 ; cmd = 329 - branch_select_prompt 329 + bookmark_select_prompt 330 330 branches_remotes_tracked 331 - "Select the branch to untrack" 332 - (fun branch -> Cmd [ "branch"; "untrack"; branch ]) 331 + "Select the bookmark to untrack" 332 + (fun bookmark -> Cmd [ "bookmark"; "untrack"; bookmark ]) 333 333 } 334 334 ] 335 335 }