From acc048b4ee9aea7dc90395a091b0de5968047268 Mon Sep 17 00:00:00 2001 From: Ben Hutchings Date: Wed, 5 Aug 2020 20:14:38 +0100 Subject: lorry: Only log number of commits pruned from marks files Logging each pruned commit can result in very long logs for some repositories. This is a problem for Lorry Controller because job status updates result in copying the entire log and not just the new log lines. There's not much value in listing all the commit hashes, so log the number of commits instead. Update the test case accordingly. --- tests/hg-unnamed-head.script | 3 ++- tests/hg-unnamed-head.stdout | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) (limited to 'tests') diff --git a/tests/hg-unnamed-head.script b/tests/hg-unnamed-head.script index fa2693f..512938f 100755 --- a/tests/hg-unnamed-head.script +++ b/tests/hg-unnamed-head.script @@ -26,6 +26,7 @@ workdir="$DATADIR/work-dir" "${SRCDIR}/test-lorry" --verbose --pull-only --log="$logfile" --working-area="$workdir" \ "$DATADIR/hg-test-repo.lorry" > /dev/null 2> /dev/null +grep -o 'pruned [0-9]* unreachable commit' < "$logfile" || true # verify that the git repository was created correctly ( @@ -48,4 +49,4 @@ workdir="$DATADIR/work-dir" # that this involves pruning an unreachable commit "${SRCDIR}/test-lorry" --verbose --pull-only --log="$logfile" --working-area="$workdir" \ "$DATADIR/hg-test-repo.lorry" > /dev/null 2> /dev/null -grep -c 'pruning unreachable commit' < "$logfile" +grep -o 'pruned [0-9]* unreachable commit' < "$logfile" diff --git a/tests/hg-unnamed-head.stdout b/tests/hg-unnamed-head.stdout index 7354306..029b454 100644 --- a/tests/hg-unnamed-head.stdout +++ b/tests/hg-unnamed-head.stdout @@ -4,4 +4,4 @@ first line third line third commit first commit -1 +pruned 1 unreachable commit -- cgit v1.2.1