Merge lp:~robru/bileto/persevere-bzr-missing into lp:bileto

Proposed by Robert Bruce Park
Status: Merged
Merged at revision: 603
Proposed branch: lp:~robru/bileto/persevere-bzr-missing
Merge into: lp:bileto
Diff against target: 46 lines (+8/-8)
1 file modified
scripts/vcs.sh (+8/-8)
To merge this branch: bzr merge lp:~robru/bileto/persevere-bzr-missing
Reviewer Review Type Date Requested Status
CU2D maintainers Pending
Review via email: mp+301402@code.launchpad.net

Description of the change

bzr missing seems to suffer from flaky connection issues, so retry it a few times for extra fault tolerance.

To post a comment you must log in.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'scripts/vcs.sh'
2--- scripts/vcs.sh 2016-07-28 03:21:24 +0000
3+++ scripts/vcs.sh 2016-07-28 16:27:10 +0000
4@@ -63,7 +63,7 @@
5 stdout() {
6 # Echo a command before running it, but keep it on stdout for processing
7 echo + "$@" 1>&2
8- "$@" 2>&1
9+ "$@"
10 }
11
12 parsechangelog() {
13@@ -273,11 +273,11 @@
14 }
15
16 bzr_do_fill_local_cache() {
17- message="Failed to update local $BRANCH cache."
18+ failure="Failed to update local $BRANCH cache."
19 if ! persevere loudly bzr pull --directory "$CACHE" --overwrite; then
20- loudly bzr branch "$BRANCH" "$CACHE.$$.tmp" || die "$message"
21- loudly rm --recursive --force "$CACHE" || die "$message"
22- loudly mv --verbose "$CACHE.$$.tmp" "$CACHE" || die "$message"
23+ loudly bzr branch "$BRANCH" "$CACHE.$$.tmp" || die "$failure"
24+ loudly rm --recursive --force "$CACHE" || die "$failure"
25+ loudly mv --verbose "$CACHE.$$.tmp" "$CACHE" || die "$failure"
26 fi
27 touch --no-create "$CACHE"
28 }
29@@ -346,14 +346,14 @@
30 target_has="$WORKPARENT/$$-bzr.target.has"
31 missing="$WORKPARENT/$$-bzr.missing"
32 # Step 1: Identify commits that the target trunk has that the input branch doesn't (these will be ignored)
33- stdout bzr missing --show-ids --directory "$target_cache" "$BRANCH" --mine-only | tee "$target_has.tmp" 1>&2
34+ persevere stdout bzr missing --show-ids --directory "$target_cache" "$BRANCH" --mine-only | tee "$target_has.tmp" 1>&2
35 ignore_translators <"$target_has.tmp" >"$target_has"
36 # Step 2: Identify new commits that require building.
37- stdout bzr missing --show-ids --directory "$our_cache" "$BRANCH" --theirs-only | tee "$missing" 1>&2
38+ persevere stdout bzr missing --show-ids --directory "$our_cache" "$BRANCH" --theirs-only | tee "$missing" 1>&2
39 ignore_translators <"$missing"
40 # Step 3: Identify commits that have been deleted from the input branch
41 # (commits missing from input branch that aren't already on target trunk, or committed by me)
42- stdout bzr missing --show-ids --directory "$our_cache" "$BRANCH" --mine-only | tee "$missing.tmp" 1>&2
43+ persevere stdout bzr missing --show-ids --directory "$our_cache" "$BRANCH" --mine-only | tee "$missing.tmp" 1>&2
44 ignore_translators <"$missing.tmp" | egrep --invert-match "$me" >"$missing"
45 loudly cat "$missing"
46 loudly cat "$target_has"

Subscribers

People subscribed via source and target branches