summaryrefslogtreecommitdiff
path: root/lib-src/mr/config
blob: ea2a0b8ed71abb5e6c999e2cf92d7663d5d2133a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
# -*- mode: conf -*-

[DEFAULT]

# --- global settings

# avoid hangs due to SSH connection sharing
jobs = 1

# custom actions to be configured repository-by-repository, that do
# nothing by default
git_sync = :
git_rebase = :
git_autoci = :

# avoid pushing non-matching branches, while trying to avoid errors
# from trying to push to read-only remotes
git_push = git push-all "$@"

# find dirty working directories, i.e., uncommitted changes, untracked
# files and stashes
git_isclean = git is-clean

git_clean = git clean -xdff

stow = hstow stow "$MR_REPO"
unstow = hstow unstow "$MR_REPO"
restow = hstow restow "$MR_REPO"
adopt = hstow adopt "$MR_REPO"

# --- Plugin for dgit repos

# actually shipped with upstream mr, but use an include command that
# will always work
include = cat ~/src/dotfiles/lib-src/mr/dgit

# --- git-svn

# include = [ -e "/usr/share/mr/git-svn" ] && cat /usr/share/mr/git-svn

# --- Sensible pulls

# Redefine git_update to avoid an unconditional `git pull`, which can
# result in unwanted merge commits all over $HOME (this has to come
# after we include the dgit lib, which also redefines git_update)
git_update = git pull-safe

# --- joeyh's code for specifying what machine we're on for repo skip
# --- tests, plus my code for detecting Git-on-Windows

lib =
    win32() {
        test "$(perl -e 'print $^O')" = "msys"
    }
    #
    if win32; then
       hostname=$(hostname)
    else
       hostname=$(hostname -s)
    fi
    #
    whoami="$(whoami)"
    # cut off the machine name on Windows
    win32 && whoami=${whoami##*\\}
    #
    on() {
        for host in $@; do
            if [ "${host%@*}" != "${host#*@}" ]; then
                if [ "$whoami" != "${host%@*}" ]; then
                    continue
                fi
                host="${host#*@}"
            fi
            if [ "$hostname" = "$host" ]; then
                return 0
            fi
        done
        return 1
    }
    workstation() {
        on swhitton@zephyr spwhitton@melete spwhitton@erebus
    }
    mine() {
        workstation || on spwhitton@athena
    }
    # tucson() {
    #     on artemis shortgeese athena hephaestus iris melete
    # }

# --- run a command on athena in a sane environment

# lib =
#     athena_cmd () {
#         # here we rely on the fact that ssh already passes argument
#         # through `/bin/sh -c' (note use of single-quotes in this
#         # function)
#         ssh athena 'cd $HOME/'"$1"' && . $HOME/.profile && '"$2"
#     }

# --- standard procedures

lib =
    # export plain text Org agenda in post_ hooks of ~/doc repo (not currently used)
    export_org_agenda () {
        if on athena; then
            emacs --batch -l ~/.emacs.d/init.el -eval '(org-batch-agenda "a")' 2>/dev/null \
                >~/local/priv/agenda.txt
        else
            emacs --batch -l ~/.emacs.d/init.el -eval '(org-batch-agenda "a")' 2>/dev/null \
                | ssh athena "cat >/home/spwhitton/local/priv/agenda.txt"
        fi
    }

# --- primary dotfiles repository

[src/dotfiles]
checkout = git clone https://git.spwhitton.name/dotfiles.git dotfiles
# We have a script to update master, and all other branches should be checked
# out and committed to on only a single host, so no need to pull them, and
# they'll always be rebaseable.
update = git dotfiles-update-master
push = git dotfiles-rebase
# Restowing is expensive, and most dangling symlinks into ~/.STOW do no harm,
# so we leave it to be run manually -- bstraph stows but does not restow.
# Possibly restowing could be done by locmaint, or we could have hstow skip
# annex/ and src/, into which I don't stow anything.
fixups = bstraph

# --- private dotfiles repositories

[lib/priv]
checkout = git clone athenag:libpriv.git priv
update = git annex sync --content cloud origin
push = git annex sync --content cloud origin
post_update =
    hstow stow ~/lib/priv
    load-trustdb
sync = mr autoci && git annex sync --no-commit --content cloud origin
skip = lazy

post_checkout =
    cd priv
    git annex init
    git annex enableremote cloud
    git annex group . backup
    # Delete any pubring.kbx created by INSINUATE-DOTFILES Consfigurator
    # property / 'insinuate-dotfiles' shell script: don't want to adopt it.
    rm -f ~/.gnupg/pubring.kbx
    hstow stow ~/lib/priv
    load-trustdb

fixups =
    chmod 600 .passwddb.pet \
          .gnupg/*.kbx \
          .gnupg/private-keys-v1.d/*.key \
          .ssh/id_*
    #
    git config push.default nothing
    git config remote.origin.gcrypt-publish-participants true
    git config remote.origin.gcrypt-participants 0x0F56D0553B6D411B
    git config annex.startupscan false
    git config annex.autocommit true # needed for `git annex sync`
    git config remote.origin.annex-ignore true
    git config unpushed-tags.ignore true
    #
    git config annex.gitaddtoannex false # see README
    git config annex.addunlocked true    # see README
    #
    git config mrrepo.review-unused false

autoci =
        hstow stow ~/lib/priv	# to perform adoptions
        git annex add .passwddb.pet .labbook.gpg .gnupg/pubring.kbx
        git commit -a -m \
            "auto passwddb, pubring and labbook commit on $(hostname -s)" || true
pre_update = mr autoci

[src/athpriv]
checkout = git clone demeterp:athpriv athpriv
pre_update = on athena || git annex sync origin athenah
pre_push = on athena || git annex sync --content origin athenah
post_update = hstow stow ~/src/athpriv
post_checkout = hstow stow ~/src/athpriv
skip = ! mine

post_checkout =
    cd athpriv
    git annex init
    on athena || git remote add athenah athenah:src/athpriv
    git annex group . backup

fixups =
    git config remote.origin.annex-ignore true
    git config unpushed-tags.ignore true
    git config annex.addunlocked true
    git config annex.synconlyannex true
    #
    # TODO Use git-annex-whereused to systematically drop old News/*.
    git config mrrepo.review-unused false

# We also ran:
#   % git annex config --set annex.largefiles "include=*.SCORE or include=*.ADAPT"

autoci =
    git annex add News/*
    git commit News -m"auto commit of Gnus score files" ||:

# --- hosts configuration

[src/propellor]
checkout = git clone demeter:propellor propellor --branch spw3conf
post_checkout =
    cd propellor
    # get new release tags for merging into 'spw3conf' and 'debian' branches
    git remote add -f upstream https://git.joeyh.name/git/propellor.git
    # This hook sets up .dir-locals.el to make it easier to follow
    # Propellor's coding style.  We have to use a hook because
    # .dir-locals.el and the cabal sandbox must be nuked when working
    # with dgit on the 'debian' branch
    install-git-hooks propellor
    echo ".dir-locals.el" >>.git/info/exclude
fixups =
    # check that the link isn't already in place before making the link
    # because otherwise we get an infinite loop of links that breaks propellor
    [ -L ~/.propellor ] || ln -sf ~/src/propellor ~/.propellor
    # my preferences when using propellor for configuring my own machines
    git config propellor.spin-branch spw3conf
    git config propellor.forbid-dirty-spin true
    git config --local sendemail.to "Joey Hess <propellor@joeyh.name>"
skip = lazy

# --- personal website source

[src/wiki]
checkout = git clone demeter:wiki
skip = ! mine

# --- misc. source repos with special config (e.g. installation of git
# --- hooks)

[src/dgit]
checkout = git clone salsa:dgit-team/dgit
post_checkout =
    cd dgit
    git remote add -f demeter demeter:dgit
    dgit setup-new-tree
    install-git-hooks dgit
skip = lazy

# [src/ublock-origin]
# checkout = git clone 'https://anonscm.debian.org/git/pkg-mozext/ublock-origin.git' 'ublock-origin'
# # beta, rc and alpha tags get deleted by upstream so there will very
# # often be unpushed tags
# push = git push-all --no-tags
# skip = lazy

[src/grml-live]
checkout = git clone demeter:grml-live -b spw/std
post_checkout =
    cd grml-live
    git remote add -f upstream github:grml/grml-live
fixups = git config commit.gpgsign true
skip = lazy

[src/mailscripts]
checkout = git clone 'demeter:mailscripts' 'mailscripts'
post_checkout =
    cd mailscripts
    install-git-hooks mailscripts
    git config branch.buster-bpo.signOffOptional true
    dgit fetch buster-backports; dgit fetch sid
skip = lazy

[src/p5-Git-Annex]
checkout = git clone demeter:p5-Git-Annex p5-Git-Annex
post_checkout =
    cd p5-Git-Annex
    install-git-hooks p5-Git-Annex
    git remote add -f salsa salsa:perl-team/modules/packages/libgit-annex-perl
    git branch --track debian salsa/master
    git config branch.debian.signOffOptional true
    git config branch.buster-bpo.signOffOptional true
skip = lazy

[src/p5-API-GitForge]
checkout = git clone demeter:p5-API-GitForge p5-API-GitForge
post_checkout =
    cd p5-API-GitForge
    install-git-hooks p5-API-GitForge
    git remote add -f salsa salsa:perl-team/modules/packages/libapi-gitforge-perl
    git branch --track debian salsa/master
    git config branch.debian.signOffOptional true
skip = lazy

[src/org-d20]
checkout = git clone 'demeter:org-d20' 'org-d20'
post_checkout =
    cd org-d20
    install-git-hooks org-d20
skip = lazy

[src/haskell-tab-indent]
checkout = git clone 'demeter:haskell-tab-indent' 'haskell-tab-indent'
post_checkout =
    cd haskell-tab-indent
    install-git-hooks haskell-tab-indent
skip = lazy

[src/git-remote-gcrypt]
checkout = git clone 'demeter:git-remote-gcrypt' 'git-remote-gcrypt'
post_checkout =
    cd git-remote-gcrypt
    install-git-hooks git-remote-gcrypt
skip = lazy

[src/pandoc-citeproc-preamble]
checkout = git clone 'demeter:pandoc-citeproc-preamble' 'pandoc-citeproc-preamble'
post_checkout =
    cd pandoc-citeproc-preamble
    install-git-hooks pandoc-citeproc-preamble
skip = lazy

# "master" branch: just for installing changes to upstream master
#
# "$(hostname -s)" branch:
#
#     Rebased onto sv.gnu.org's master branch.  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
#         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.
#
#     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.
#
# "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:
#
#       - providing byte-compiled Lisp /usr/share/emacs-snapshot/site-lisp/elpa
#         to builds from the "$(hostname -s)" branch
#
#       - direct use on machines other than my development laptop where I want
#         something more current than the stable release of Emacs but not with
#         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
#
#     % cd ~/src/emacs-snapshot
#     % debian/merge-snapshot
#     % dgit sbuild --no-run-lintian
#     % cp ../emacs-snapshot_29~git202*amd64.deb<TAB> ~/local/develacc/tmp
#     % sudo virsh start develacc.melete.silentflame.com
#     % cd /ssh:root@develacc:/home/spwhitton/tmp
#     % apt-get install ./emacs-snapshot_29~git202*amd64.deb<TAB>
#     % rm emacs-snapshot_29~git202*amd64.deb<TAB>
#     % cd //ssh:develacc:src/dotfiles
#     % mr up
#
#     C-i s develacc RET
#       $ /opt/emacs-snapshot/bin/emacs -nw --debug-init
#
#     % cd ~//src/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
#
#     It is important to test local installability of the new .deb, probably
#     in develacc or a sid chroot, before adding to demeter-apt, because
#     running the rebased "melete" branch doesn't detect any byte compilation
#     issues against my current selection of elpa-* packages.
#
# "athena/CODENAME-bpo" branch:
#
#     Backported from athena/unstable.  Automatically updated by
#     reprepro-rebuilder when updating athena/unstable as described above.
#
# See also bin/emacsclient wrapper script in dotfiles.git.
[src/emacs]
checkout = git clone https://git.savannah.gnu.org/git/emacs.git emacs
post_clean = ./autogen.sh autoconf
post_checkout =
    cd emacs
    git remote add -f demeter demeter:emacs
    git 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"
    git config branch.master.rebase true
    git config branch."$hostname".rebase true
    # Set push remote in case we do need to make a backup of localhost's branch.
    git config branch."$hostname".pushRemote demeter
    git config --replace-all remote.demeter.push ":" "^:$"
    git config --replace-all remote.demeter.push \
        "+${hostname}:${hostname}" "^\+${hostname}:${hostname}$"
    git config branch.deb/emacs/d/sid/master.dpmUpstreamBranch deb/emacs/d/sid/upstream
    git config branch.deb/emacs/d/sid/master.dpmPatchedBranch deb/emacs/d/sid/patched
    git config branch.deb/emacs-non-dfsg/d/sid/master.dpmUpstreamBranch \
    	deb/emacs-non-dfsg/d/sid/upstream
    git config branch.deb/emacs-non-dfsg/d/sid/master.dpmPatchedBranch \
    	deb/emacs-non-dfsg/d/sid/patched
# 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
# upstream, we have this definition.  "pull" not "update" because we want to
# update from upstream master deliberately, not as part of automated updates.
pull = git checkout "$hostname" \
    && git pull --rebase --autostash origin master
skip = lazy || ( [ "$1" = pull ] \
    && [ -z "$(git for-each-ref '[r]efs/heads/'$hostname)" ] )

# myrepos git_status assumes a separate registration for each worktree.
# Empty update action to prevent fetching from remotes over and over again.

[src/emacs-snapshot]
checkout = git -C "$HOME/src/emacs" worktree add -b athena/unstable \
    "$HOME/src/emacs-snapshot" demeter/athena/unstable
update = :
skip = ! workstation || ! [ -d "$HOME/src/emacs" ]

[src/emacs-dfsg]
checkout = git -C "$HOME/src/emacs" worktree add -b deb/emacs/d/sid/master \
    "$HOME/src/emacs-dfsg" debian/deb/emacs/d/sid/master
update = :
skip = ! workstation || ! [ -d "$HOME/src/emacs" ]

[src/emacs-non-dfsg]
checkout = git -C "$HOME/src/emacs" worktree add -b deb/emacs-non-dfsg/d/sid/master \
    "$HOME/src/emacs-non-dfsg" debian/deb/emacs-non-dfsg/d/sid/master
update = :
skip = ! workstation || ! [ -d "$HOME/src/emacs" ]

[src/elpa]
checkout = git clone https://git.savannah.gnu.org/git/emacs/elpa.git elpa
post_checkout = cd elpa && make setup
skip = lazy

[src/nongnu-elpa]
checkout = git clone https://git.savannah.gnu.org/git/emacs/nongnu.git nongnu-elpa
post_checkout = cd elpa && make
skip = lazy

[src/org-mode]
checkout = git clone https://git.savannah.gnu.org/git/emacs/org-mode.git org-mode
skip = lazy

[src/cl/consfigurator]
checkout = git clone 'demeter:consfigurator' 'consfigurator'
post_checkout =
    cd consfigurator
    install-git-hooks consfigurator
skip = lazy

[src/notmuch]
checkout = git clone 'https://git.notmuchmail.org/git/notmuch' 'notmuch'
fixups = git config --local sendemail.to notmuch@notmuchmail.org
skip = lazy

[src/linux]
checkout = git clone https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git linux
skip = lazy

[src/sbcl]
checkout = git -c fetch.fsckobjects=false clone https://git.code.sf.net/p/sbcl/sbcl
skip = lazy

# --- radicale collections

[lib/radicale]
checkout = git clone demeterp:radicale radicale
skip = ! on spwhitton@athena

# could use /usr/share/mr/git-annex helper to simplify the following
# configuration of annexes (overriding its update definition to avoid
# --content) but probably not flexible enough for all that's going on
# in the below

# --- primary git annex

[lib/annex]
checkout = git clone athenag:annex.git annex
post_checkout =
    cd annex
    git annex init
    git annex enableremote athena rsyncurl=athena:local/rsync/annex
skip = lazy

update = git annex sync --no-content origin
# disabled because required yubikey
# sync = git annex sync --no-content origin
push = git annex sync --content origin athena
fixups =
    git config push.default matching
    git config remote.origin.gcrypt-publish-participants true
    git config remote.origin.gcrypt-participants 0x0F56D0553B6D411B
    # git config gcrypt.publish-participants true
    # git config gcrypt.participants 0x0F56D0553B6D411B
    git config annex.startupscan false
    git config annex.autocommit true # needed for `git annex sync`
    git config remote.origin.annex-ignore true
    git config unpushed-tags.ignore true

[annex]
checkout = git clone athenag:annex19.git annex
update = git annex sync --no-content origin
push = git annex sync --content cloud origin
skip = lazy

post_checkout =
    cd annex
    git annex init
    git annex enableremote cloud

fixups =
    git config push.default nothing
    git config remote.origin.gcrypt-publish-participants true
    git config remote.origin.gcrypt-participants 0x0F56D0553B6D411B
    git config annex.startupscan false
    git config annex.autocommit true # needed for `git annex sync`
    git config remote.origin.annex-ignore true
    git config unpushed-tags.ignore true

# --- personal website big files annex

[lib/wikiannex]
checkout = git clone demeter:wikiannex.git
post_checkout =
    cd wikiannex
    git annex init
    git config remote.origin.annex-ignore false
    # ^ the git-annex-init sets this wrong

    # if workstation; then
    #     git remote add bkupsd /media/${USER}/bkupsd/git/demeter/wikiannex.git
    #     git remote add m3 /media/${USER}/m3/git/demeter/wikiannex.git
    # fi
update = git annex sync --no-content
push = git annex sync --content
skip = lazy
fixups =
    git config unpushed-tags.ignore true
    if [ "$(hostname -s)" = "demeter" ]; then
        git annex adjust --hide-missing --unlock
    fi

# --- git annex for podcasts

[lib/podcasts]
checkout = git clone demeterp:podcasts
post_checkout =
    cd podcasts
    git annex init
update = ./update-and-sync
push = git annex --no-content sync
# origin remote is just for keeping a backup copy of metadata.  We don't sync
# annexed content between repos at all, just run update-and-sync and download
# episodes as want to listen to them.  For archival, for podcasts for which
# that's wanted, annex-to-annex the files into ~/annex instead of 'git rm'.
fixups =
    git config push.default matching
    git config annex.startupscan false
    git config annex.autocommit true # needed for ga sync
    git config remote.origin.annex-ignore true
    git config annex.genmetadata true
skip = lazy

# --- git annex for use with rtorrent

# [lib/rt]
# checkout = git clone athenag:rt.git rt
# post_checkout =
#     cd rt
#     git annex init
#     if [ -d "$(hostname -s)" ]; then
#         mkdir -p $HOME/local/rt
#         cd $HOME/local/rt
#         touch .duplicity-ignore
#         mkdir -p session incomplete
#         if ! [ -e "complete" ]; then
#             ln -s $HOME/lib/rt/complete complete
#         fi
#         if ! [ -e "watch" ]; then
#             ln -s $HOME/lib/rt/$(hostname -s) watch
#         fi
#     fi
# status = git annex status --fast
# update = git annex sync --no-content origin
# push = git annex sync --no-content origin
# autoci = (git annex add . && git commit -m "auto commit on $(hostname -s)") || true
# fixups =
#     git config push.default matching
#     # git config gcrypt.publish-participants true
#     git config remote.origin.gcrypt-publish-participants true
#     git config remote.origin.gcrypt-participants 0x0F56D0553B6D411B
#     git config annex.startupscan false
#     git config annex.autocommit true # needed for `git annex sync`
#     git config remote.origin.annex-ignore true
#     git config unpushed-tags.ignore true

# skip = lazy
# pre_update = mr autoci

# --- git annex for athena's apt repository

[lib/athena-apt]
checkout = git clone demeter:athena-apt athena-apt
post_checkout =
    cd athena-apt
    git annex init --version=7
    git annex enableremote demeter rsyncurl=demeter:/srv/www/debian
    git annex get .
skip = lazy

update = git annex sync --no-content
push =
    git annex add
    git annex unlock db
    git annex sync --content demeter
    git annex sync origin
    ssh demeter find /srv/www/debian -type f -exec chmod 644 '{}' +
    ssh demeter find /srv/www/debian -type d -exec chmod 755 '{}' +
fixups =
    git config push.default matching
    git config annex.startupscan false
    git config annex.autocommit true # needed for `git annex sync`
    git config remote.origin.annex-ignore true
    git config annex.thin true
    git config annex.addunlocked true
    git config mrrepo.review-unused false
    git config remote.demeter.annex-tracking-branch master
    git config unpushed-tags.ignore true

# The git-diff-files(1) call in ~/bin/git-is-clean fails in v7
# git-annex repos with unlocked empty files, which this repo often
# has: empty Packages files.  So can't use that script in this repo
isclean =
    output="$(git annex status)"
    test -z "$output" || ( echo $output && exit 1 )

[lib/realloc]
checkout = git clone demeterp:realloc realloc
skip = ! mine

# --- my personal documents.  Override my global update command back
# --- to the myrepos default so that git automatically pulls and
# --- merges.  Skipped on non-local hosts

[doc]
checkout = git clone demeterp:doc doc
update = git pull --no-edit "$@"
skip = ! mine

# Set mtimes to last commit, for Howm; doing so only in post_checkout, and not
# fixups, should be sufficient for summary buffer ordering purposes.
post_checkout = git utime

# before pulling, automatically commit in the same way that my cron job does
pre_update = win32 || doccheckin
# ... and let me do it manually
autoci = doccheckin || true

# quick syncs
sync = doccheckin && git pull --no-edit && git push

# --- static websites on web host boxes

[public_html]
clone = git clone https://git.spwhitton.name/sageweb public_html
skip = ! on spwhitton@sage

[html]
clone = git clone https://git.spwhitton.name/sdfweb html
skip = ! [ "$(domainname)" = "SDF" ]

# --- my offline e-mail (& machine's postfix queue)

[.fmail]
checkout =
    mkdir ~/.fmail
    movemymail
sync = movemymail
update = movemymail
push = movemymail
status = :
clean = :
commit = :
record = :
fetch = :
diff = :
log = :
grep = :
autoci = :
isclean = :
skip = ! [ -e "$HOME/local/auth/fmailsyncpass" ]

# this is slower than other repos for which sync is defined, so have
# it go last
order = 12