fix(hg): show clone errors, stable cwd; shrink timeline fonts

Remove /dev/null redirects in hg-ingest.sh so errors are visible.
cd to work dir before loop to prevent getcwd failures after rm.
Use $HOME instead of ~ for proper expansion in default values.

Reduce timeline entry title, subtitle, and body font sizes for a
more compact activity feed.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-05-05 14:45:26 +03:00
parent 3f3a1fb33e
commit 2da9461b44
2 changed files with 20 additions and 6 deletions

View File

@@ -15,11 +15,10 @@ set -euo pipefail
DATABASE_URL="${DATABASE_URL:-postgres://moments_rw@magrathea.kosherinata.internal:5432/moments?sslmode=verify-full&sslrootcert=/etc/pki/ca-trust/source/anchors/root-internal.pem&sslcert=/etc/pki/tls/misc/$(hostname -f).pem&sslkey=/etc/pki/tls/private/$(hostname -f).pem}" DATABASE_URL="${DATABASE_URL:-postgres://moments_rw@magrathea.kosherinata.internal:5432/moments?sslmode=verify-full&sslrootcert=/etc/pki/ca-trust/source/anchors/root-internal.pem&sslcert=/etc/pki/tls/misc/$(hostname -f).pem&sslkey=/etc/pki/tls/private/$(hostname -f).pem}"
HG_HOST="${HG_HOST:-hg-edge.mozilla.org}" HG_HOST="${HG_HOST:-hg-edge.mozilla.org}"
WORK_DIR="${HG_WORK_DIR:-~/hg}" WORK_DIR="${HG_WORK_DIR:-$HOME/hg}"
# Repos to clone (groups are expanded inline) # Repos to clone (groups are expanded inline)
REPOS=( REPOS=(
mozilla-central
integration/mozilla-inbound integration/mozilla-inbound
integration/autoland integration/autoland
integration/fx-team integration/fx-team
@@ -56,6 +55,7 @@ total=0
CLONE_DIR="$WORK_DIR/clone" CLONE_DIR="$WORK_DIR/clone"
CACHE_DIR="$WORK_DIR/cache" CACHE_DIR="$WORK_DIR/cache"
mkdir -p "$CACHE_DIR" mkdir -p "$CACHE_DIR"
cd "$WORK_DIR"
for repo in "${REPOS[@]}"; do for repo in "${REPOS[@]}"; do
cache_file="$CACHE_DIR/$(echo "$repo" | tr '/' '_').tsv" cache_file="$CACHE_DIR/$(echo "$repo" | tr '/' '_').tsv"
@@ -68,7 +68,7 @@ for repo in "${REPOS[@]}"; do
rm -rf "$CLONE_DIR" rm -rf "$CLONE_DIR"
echo "[hg-ingest] cloning $repo" echo "[hg-ingest] cloning $repo"
if ! hg clone --noupdate "https://$HG_HOST/$repo" "$CLONE_DIR" 2>/dev/null; then if ! hg clone --noupdate "https://$HG_HOST/$repo" "$CLONE_DIR"; then
echo "[hg-ingest] clone failed: $repo (skipping)" echo "[hg-ingest] clone failed: $repo (skipping)"
continue continue
fi fi
@@ -86,7 +86,7 @@ for repo in "${REPOS[@]}"; do
# Extract matching changesets to cache file # Extract matching changesets to cache file
hg log -R "$CLONE_DIR" -r "$revset" \ hg log -R "$CLONE_DIR" -r "$revset" \
--template '{node}\t{author}\t{date|hgdate}\t{desc|firstline}\n' \ --template '{node}\t{author}\t{date|hgdate}\t{desc|firstline}\n' \
> "$cache_file" 2>/dev/null || true > "$cache_file" || true
# Free disk immediately # Free disk immediately
rm -rf "$CLONE_DIR" rm -rf "$CLONE_DIR"
@@ -101,8 +101,7 @@ for repo in "${REPOS[@]}"; do
date_ts="${date_raw%% *}" date_ts="${date_raw%% *}"
# Build ISO timestamp from unix epoch # Build ISO timestamp from unix epoch
occurred_at=$(date -u -d "@${date_ts}" '+%Y-%m-%dT%H:%M:%SZ' 2>/dev/null || \ occurred_at=$(date -u -d "@${date_ts}" '+%Y-%m-%dT%H:%M:%SZ')
date -u -r "${date_ts}" '+%Y-%m-%dT%H:%M:%SZ' 2>/dev/null)
event_id="hg:${repo}:${node}" event_id="hg:${repo}:${node}"

View File

@@ -34,6 +34,21 @@ a.hot-pink {
color: #2c3e50; color: #2c3e50;
} }
.vertical-timeline-element-content h4.vertical-timeline-element-title {
font-size: 0.85rem;
}
.vertical-timeline-element-content h5.vertical-timeline-element-subtitle {
font-size: 0.75rem;
}
.vertical-timeline-element-content p,
.vertical-timeline-element-content ul,
.vertical-timeline-element-content li,
.vertical-timeline-element-content code {
font-size: 0.75rem;
}
.vertical-timeline-element-content a { .vertical-timeline-element-content a {
color: #1565c0; color: #1565c0;
} }