update jj and some more

This commit is contained in:
Jana Dönszelmann 2026-01-10 17:17:26 +01:00
parent 39f102602d
commit 9e783c7478
No known key found for this signature in database
4 changed files with 82 additions and 83 deletions

8
flake.lock generated
View file

@ -1007,11 +1007,11 @@
"nixpkgs": "nixpkgs_5"
},
"locked": {
"lastModified": 1767620081,
"narHash": "sha256-dUV88Imqgv0qsLbHUoDinzm+JAfSNKxfkozwBO8BqsQ=",
"lastModified": 1767634075,
"narHash": "sha256-dusZCtuQ0rlu0gKD+zknHRnd74OoyX6KWAMYGYDTxkE=",
"ref": "refs/heads/main",
"rev": "290582a3463260181697a1e9f7cf9e490f8e8ed6",
"revCount": 2,
"rev": "1c9882a2cb6e9cbd4ba2ec0f47866c6117641c63",
"revCount": 7,
"type": "git",
"url": "ssh://forgejo@git.donsz.nl/jana/pipethon.git"
},

View file

@ -3,10 +3,11 @@
calc = "${pkgs.custom.pipethon}/bin/python -i ${pkgs.writeText "init.py" ''
import sys
sys.path.append("${../../scriptlib}")
sys.path.append("${pkgs.python313Packages.numpy}/lib/python3.13/site-packages/")
from scriptlib import *
''} ";
# sys.path.append("${pkgs.python314Packages.numpy}/lib/python3.14/site-packages/")
cp-media =
name: media:
let

View file

@ -42,12 +42,11 @@
fsmonitor.backend = "watchman";
fsmonitor.watchman.register-snapshot-trigger = true;
revsets.log = "@ | ancestors(tronk()..(visible_heads() & mine()), 2) | tronk()";
revsets.log = "@ | ancestors(trunk()..(visible_heads() & mine()), 2) | trunk()";
# revsets.log = "trunk()..@ | @..trunk() | trunk() | @:: | fork_point(trunk() | @)";
# revsets.log = "trunk() | ancestors(trunk()..heads(((trunk()..visible_heads()) & my() | @)::), 2)";
revset-aliases = {
"tronk()" = ''latest((present(main) | present(master)) & remote_bookmarks())'';
"my()" = "user(\"${config.programs.jujutsu.settings.user.email}\")";
"user(x)" = "author(x) | committer(x)";
current = ''bookmarks() & my() & ~immutable()'';
@ -56,81 +55,7 @@
template-aliases = {
"format_timestamp(timestamp)" = "timestamp.ago()";
};
aliases =
let
util = script: [
"util"
"exec"
"--"
"bash"
"-c"
script
];
in
{
tug = [
"bookmark"
"move"
"--from"
"closest_bookmark(@-)"
"--to"
"@-"
];
tugg = [
"bookmark"
"move"
"--from"
"closest_bookmark(@-)"
"--to"
"@"
];
catchup = [
"rebase"
"-b"
"all:current"
"-d"
"tronk()"
"--skip-emptied"
];
pull = util ''
jj git fetch
jj catchup
'';
ch = [
"show"
"--stat"
];
move = [
"rebase"
"-r"
];
ll = [
"log"
"-T"
"builtin_log_compact"
];
mdiff = [
"diff"
"--from"
"tronk()"
];
};
templates = {
log_node = ''
label("node",
coalesce(
if(!self, label("elided", "~")),
if(current_working_copy, label("working_copy", "@")),
if(conflict, label("conflict", "×")),
if(immutable, label("immutable", "*")),
label("normal", "·")
)
)
'';
log = ''
log_oneline = ''
if(root,
format_root_commit(self),
label(if(current_working_copy, "working_copy"),
@ -154,6 +79,79 @@
)
)
'';
status_summary = "'\n' ++ self.diff().summary() ++ '\n'";
log_oneline_with_status_summary = "log_oneline ++ if(self.current_working_copy() && self.diff().files().len() > 0, status_summary)";
};
aliases =
let
util = script: [
"util"
"exec"
"--"
"bash"
"-c"
script
];
in
{
tug = [
"bookmark"
"move"
"--from"
"heads(::@- & bookmarks())"
"--to"
"coalesce(@ & ~empty(), @-)"
];
catchup = [
"rebase"
"-b"
"bookmarks() & mine() & ~immutable()"
"-d"
"trunk()"
"--skip-emptied"
];
pull = util ''
jj git fetch
jj catchup
'';
ch = [
"show"
"--stat"
];
move = [
"rebase"
"-r"
];
push = [
"git"
"push"
];
ll = [
"log"
"-T"
"builtin_log_compact"
];
mdiff = [
"diff"
"--from"
"trunk()"
];
};
templates = {
log_node = ''
label("node",
coalesce(
if(!self, label("elided", "~")),
if(current_working_copy, label("working_copy", "@")),
if(conflict, label("conflict", "×")),
if(immutable, label("immutable", "*")),
label("normal", "·")
)
)
'';
log = "log_oneline_with_status_summary";
git_push_bookmark = ''"jdonszelmann/" ++ change_id.short()'';
};

View file

@ -1,5 +1,5 @@
from math import *;
import numpy as np
# import numpy as np
from pathlib import Path
import subprocess
import os