Skip to contentSkip to conversation

dim: fix update-branches to fetch all available nightly repos

PATCH In review Jani Nikula 2 participants 2 messages Nov 28, 2016

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 dim: fix update-branches to fetch all available nightly repos

Update all nightly repos that have a corresponding local remote.

---
 dim | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)
dim +8 -1
index a709342572ab..3dd2d1dec796 100755
@@ -1255,8 +1255,15 @@ function dim_update_branches
 	local repo remote
 
 	cd $DIM_PREFIX/$DIM_DRM_INTEL
-	for remote in $DIM_DRM_INTEL_REMOTE `url_to_remote $drm_upstream_git` origin; do
+	for repo in "${!drm_tip_repos[@]}"; do
+		url=${drm_tip_repos[$repo]}
+		if ! remote=$(url_to_remote $url 2>/dev/null); then
+			continue
+		fi
+		echo -n "Fetching $repo (local remote $remote)... "
+		# git fetch returns 128 if there's nothing to be fetched
 		git fetch -q $remote || true
+		echo "Done."
 	done
 
 	assert_repo_clean
Signature · 6 lines
2.1.4

_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Tested-by on v1 1/1
#1 lore raw
Quoted 4 lines · Jani Nikula

Update all nightly repos that have a corresponding local remote.

Quoted 26 lines
---
 dim | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)
dim +8 -1
index a709342572ab..3dd2d1dec796 100755
@@ -1255,8 +1255,15 @@ function dim_update_branches
 	local repo remote
 
 	cd $DIM_PREFIX/$DIM_DRM_INTEL
-	for remote in $DIM_DRM_INTEL_REMOTE `url_to_remote $drm_upstream_git` origin; do
+	for repo in "${!drm_tip_repos[@]}"; do
+		url=${drm_tip_repos[$repo]}
+		if ! remote=$(url_to_remote $url 2>/dev/null); then
+			continue
+		fi
+		echo -n "Fetching $repo (local remote $remote)... "
+		# git fetch returns 128 if there's nothing to be fetched
 		git fetch -q $remote || true
+		echo "Done."
 	done
 
 	assert_repo_clean
Signature · 6 lines
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum,
a Linux Foundation Collaborative Project
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx