summaryrefslogtreecommitdiff
path: root/lib-src
diff options
context:
space:
mode:
authorSean Whitton <spwhitton@spwhitton.name>2022-11-29 12:31:54 -0700
committerSean Whitton <spwhitton@spwhitton.name>2022-11-30 14:20:59 -0700
commit981f8fc5b6dc8ffc4deb94b6243ec6c7cac06249 (patch)
tree05f021eeb756b3f798a2cee198ac3cf858990621 /lib-src
parenta991c88e7ae39d7c94c8733e4bc0d36099b0a626 (diff)
downloaddotfiles-981f8fc5b6dc8ffc4deb94b6243ec6c7cac06249.tar.gz
make 'mr pull' for ~/src/emacs able to update from other branches
Diffstat (limited to 'lib-src')
-rw-r--r--lib-src/mr/config28
1 files changed, 17 insertions, 11 deletions
diff --git a/lib-src/mr/config b/lib-src/mr/config
index 48e5e0d7..1cf3fa82 100644
--- a/lib-src/mr/config
+++ b/lib-src/mr/config
@@ -335,7 +335,7 @@ skip = lazy
#
# "$(hostname -s)" branch:
#
-# Rebased onto sv.gnu.org's master branch. It has
+# Rebased onto a branch from sv.gnu.org, usually master. It has
#
# - bug fixes, reversions etc., (cleaned up versions of) which have not
# yet made it onto sv.gnu.org's master, but which are required for my
@@ -345,8 +345,11 @@ skip = lazy
# work, at least where that doesn't require long-lived feature branches.
#
# 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.
+# 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.
#
# This branch doesn't usually need to be pushed anywhere, but if we do
# need to push it somewhere for backup purposes, we execute
@@ -357,9 +360,9 @@ skip = lazy
#
# "athena/unstable" branch:
#
-# Merges from sv.gnu.org's master branch only. .deb packages produced from
-# this branch are available from <http://silentflame.com/debian>. There are
-# two purposes:
+# Merges from sv.gnu.org's master branch or the latest emacs-NN release
+# branch, only. .deb packages produced from this branch are available from
+# <http://silentflame.com/debian>. There are two purposes:
#
# - providing byte-compiled Lisp /usr/share/emacs-snapshot/site-lisp/elpa
# to builds from the "$(hostname -s)" branch
@@ -369,9 +372,9 @@ skip = lazy
# my current WIP.
#
# Updated only when new fixes, features or reversions on sv.gnu.org's
-# master branch are wanted on machines other 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
+# master branch or the latest emacs-NN branch are wanted on machines other
+# 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
# % debian/merge-snapshot
@@ -437,9 +440,12 @@ fixups =
# avoid accidentally pushing personal commits to Savannah (push.default cannot
# help here). So for convenient updates of "$(hostname -s)" to its conceptual
# upstream, we have this definition. "pull" not "update" because we want to
-# update from upstream master deliberately, not as part of automated updates.
+# update from upstream deliberately, not as part of automated updates.
pull = git checkout "$hostname" \
- && git pull --rebase --autostash origin master
+ && git pull --rebase --autostash origin \
+ "${1:-$(git reflog $hostname -1 --pretty='%gs' \
+ --grep-reflog='^pull --rebase --autostash origin ' \
+ | awk '{print $5}')}"
skip = lazy || ( [ "$1" = pull ] \
&& [ -z "$(git for-each-ref '[r]efs/heads/'$hostname)" ] )