diff options
author | Sean Whitton <spwhitton@spwhitton.name> | 2022-12-27 11:53:02 -0700 |
---|---|---|
committer | Sean Whitton <spwhitton@spwhitton.name> | 2022-12-27 11:53:02 -0700 |
commit | 025ee35dadf207f72691cf55a573dd897728bb00 (patch) | |
tree | 7cbf8e95ef10f835497178ab61872f4e9c510d09 /lib-src | |
parent | 04ead44c46cc71c9d6f076e84da1e11f9e5d8864 (diff) | |
download | dotfiles-025ee35dadf207f72691cf55a573dd897728bb00.tar.gz |
more Emacs linked working trees, attempt a number of simplifications
Diffstat (limited to 'lib-src')
-rw-r--r-- | lib-src/git/includes | 4 | ||||
-rw-r--r-- | lib-src/git/src/emacs/trunk (renamed from lib-src/git/src/emacs) | 0 | ||||
-rw-r--r-- | lib-src/mr/config | 71 |
3 files changed, 44 insertions, 31 deletions
diff --git a/lib-src/git/includes b/lib-src/git/includes index e971702d..6f8114af 100644 --- a/lib-src/git/includes +++ b/lib-src/git/includes @@ -18,8 +18,8 @@ path = ~/src/dotfiles/lib-src/git/src/cl/consfigurator [includeIf "gitdir:~/src/dotfiles/"] path = ~/src/dotfiles/lib-src/git/src/dotfiles -[includeIf "gitdir:~/src/emacs/"] - path = ~/src/dotfiles/lib-src/git/src/emacs +[includeIf "gitdir:~/src/emacs/trunk/"] + path = ~/src/dotfiles/lib-src/git/src/emacs/trunk [includeIf "gitdir:~/src/notmuch/"] path = ~/src/dotfiles/lib-src/git/src/notmuch [includeIf "gitdir:~/src/p5-API-GitForge/"] diff --git a/lib-src/git/src/emacs b/lib-src/git/src/emacs/trunk index 11868dd6..11868dd6 100644 --- a/lib-src/git/src/emacs +++ b/lib-src/git/src/emacs/trunk diff --git a/lib-src/mr/config b/lib-src/mr/config index e5622594..91f2bd53 100644 --- a/lib-src/mr/config +++ b/lib-src/mr/config @@ -313,14 +313,16 @@ isclean = # own usage, on this machine or in general # # - WIP patches of my own -- this branch is used for my own development -# work, at least where that doesn't require long-lived feature branches. +# work, at least where that doesn't require long-lived feature +# branches, or when we are rebasing onto master but need to commit to +# emacs-NN and they're too different to cherry-pick across, etc.. # # A key advantage of using these development builds is that references to -# files in *Help* buffers will be to ~/src/emacs, not to somewhere owned -# by root. Another reason for having a branch for localhost is to keep -# track of what upstream commit we want to be running on this host, and -# which upstream branch we want to rebase onto, e.g. emacs-29 vs. master, -# or some feature branch we want to test here. +# files in *Help* buffers will be to ~/src/emacs/primary, not to somewhere +# owned by root. Another reason for having a branch for localhost is to +# keep track of what upstream commit we want to be running on this host, +# and which upstream branch we want to rebase onto, e.g. emacs-29 +# vs. master, or some feature branch we want to test here. # # This branch doesn't usually need to be pushed anywhere, but if we do # need to push it somewhere for backup purposes, we execute @@ -347,7 +349,7 @@ isclean = # than my development laptop. To do that, first "melete" is updated using # "mr pull", and then I run that build for a day or so. Then # -# % cd ~/src/emacs-snapshot +# % cd ~/src/deb/emacs-snapshot # % debian/merge-snapshot # % dgit sbuild --no-run-lintian # % cp ../emacs-snapshot_29~git202*amd64.deb<TAB> ~/local/develacc/tmp @@ -362,11 +364,12 @@ isclean = # $ /opt/emacs-snapshot/bin/emacs -nw --debug-init # # % sudo virsh destroy develacc.melete.silentflame.com -# % cd ~//src/emacs-snapshot +# % cd ~//src/deb/emacs-snapshot # % reprepro-rebuilder --release # if develacc test was successful # # If need to back out before reprepro-rebuilder: -# % cd ~/src/emacs-snapshot && git reset --hard demeter/athena/unstable +# % cd ~/src/deb/emacs-snapshot +# % git reset --hard demeter/athena/unstable # # It is important to test local installability of the new .deb, probably # in develacc or a sid chroot, before adding to demeter-apt, because @@ -380,7 +383,8 @@ isclean = # # See also bin/emacsclient wrapper script in dotfiles.git. -[src/emacs] +# This worktree: usually the master branch, sometimes some feature branch. +[src/emacs/trunk] checkout = git clone https://git.savannah.gnu.org/git/emacs.git post_clean = ./autogen.sh autoconf post_checkout = @@ -388,18 +392,18 @@ post_checkout = git remote add -f demeter demeter:emacs ||: git -c fetch.fsckObjects=false \ remote add -f debian https://salsa.debian.org/rlb/deb-emacs.git/ ||: - # We might want a branch for localhost on non-workstations, but we only - # automatically create one on workstations. - if workstation; then - if [ -n "$(git for-each-ref '[r]efs/remotes/demeter/'$hostname)" ]; then - git checkout -b "$hostname" demeter/"$hostname" --no-track - else - git checkout -b "$hostname" --no-track - fi - fi ./autogen.sh all -fixups = git rev-parse "$hostname"@{upstream} >/dev/null 2>&1 \ - && git branch --unset-upstream "$hostname" +skip = lazy + +# This worktree: either a detached HEAD or the "$hostname" branch. +[src/emacs/primary] +checkout = git_worktree_checkout "$HOME/src/emacs/trunk" \ + -b "$hostname" --no-track \ + "$(if [ -n "$(git -C $HOME/src/emacs/trunk \ + for-each-ref '[r]efs/remotes/demeter/'"$hostname")" ] + then echo demeter/"$hostname"; else echo master; fi)" +post_clean = ./autogen.sh autoconf +post_checkout = cd primary; ./autogen.sh autoconf # We don't have the "$(hostname -s)" branch's upstream set to origin/master to # avoid accidentally pushing personal commits to Savannah (push.default cannot # help here). So for convenient updates of "$(hostname -s)" to its conceptual @@ -410,21 +414,30 @@ pull = git checkout "$hostname" \ "${1:-$(git reflog $hostname -1 --pretty='%gs' \ --grep-reflog='^pull --rebase --autostash origin ' \ | awk '{print $5}')}" -skip = lazy || ( [ "$MR_ACTION" = pull ] \ - && [ -z "$(git for-each-ref '[r]efs/heads/'$hostname)" ] ) +skip = lazy || git_worktree_skip + +[src/emacs/release] +checkout = git_worktree_checkout "$HOME/src/emacs/trunk" \ + -b emacs-29 origin/emacs-29 +post_clean = ./autogen.sh autoconf +post_checkout = cd release; ./autogen.sh autoconf +skip = lazy || git_worktree_skip + +# src/deb/ contains repos/worktrees used only, or almost only, for packaging +# work, and not for working upstream. -[src/emacs-snapshot] -checkout = git_worktree_checkout "$HOME/src/emacs" \ +[src/deb/emacs-snapshot] +checkout = git_worktree_checkout "$HOME/src/emacs/trunk" \ -b athena/unstable demeter/athena/unstable skip = ! workstation || git_worktree_skip -[src/emacs-dfsg] -checkout = git_worktree_checkout "$HOME/src/emacs" \ +[src/deb/emacs] +checkout = git_worktree_checkout "$HOME/src/emacs/trunk" \ -b deb/emacs/d/sid/master debian/deb/emacs/d/sid/master skip = ! workstation || git_worktree_skip -[src/emacs-non-dfsg] -checkout = git_worktree_checkout "$HOME/src/emacs" \ +[src/deb/emacs-non-dfsg] +checkout = git_worktree_checkout "$HOME/src/emacs/trunk" \ -b deb/emacs-non-dfsg/d/sid/master debian/deb/emacs-non-dfsg/d/sid/master skip = ! workstation || git_worktree_skip |