[PATCH 5/5] dim: Improve the error output when rebuild-nightly fails

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Joonas rightly complained that the current output is useless and just
confuses.

v2: Bikeshed stuff some more.

Cc: Joonas Lahtinen <joonas.lahtinen@xxxxxxxxxxxxxxx>
Signed-off-by: Daniel Vetter <daniel.vetter@xxxxxxxxx>
---
 dim | 30 ++++++++++++++++--------------
 1 file changed, 16 insertions(+), 14 deletions(-)

diff --git a/dim b/dim
index 30aa8485e50b..16235642ef19 100755
--- a/dim
+++ b/dim
@@ -261,18 +261,18 @@ function update_linux_next
 {
 	cd $DIM_PREFIX/drm-intel-nightly
 
-	local remote=${drm_tip_repos[drm-intel]}
+	local nightly_origin=${drm_tip_repos[drm-intel]}
 
 	# always update drm-intel-fixes
 	echo -n "Pushing drm-intel-fixes to for-linux-next-fixes... "
-	git push $DRY_RUN $remote +$remote/drm-intel-fixes:for-linux-next-fixes >& /dev/null
+	git push $DRY_RUN $nightly_origin +$nightly_origin/drm-intel-fixes:for-linux-next-fixes >& /dev/null
 	echo "Done."
 
-	if git merge-base --is-ancestor $remote/drm-intel-next-fixes $remote/drm-intel-fixes ; then
+	if git merge-base --is-ancestor $nightly_origin/drm-intel-next-fixes $nightly_origin/drm-intel-fixes ; then
 		# -fixes has caught up to dinf, i.e. we're out of the merge
 		# window. Push the next queue.
 		echo -n "Out of merge window. Pushing drm-intel-next-queued to for-linux-next... "
-		git push $DRY_RUN $remote +$remote/drm-intel-next-queued:for-linux-next >& /dev/null
+		git push $DRY_RUN $nightly_origin +$nightly_origin/drm-intel-next-queued:for-linux-next >& /dev/null
 		echo "Done."
 	else
 		# dinf is ahead of -fixes, i.e. drm-next has already closed for
@@ -280,17 +280,19 @@ function update_linux_next
 		# for the current -next cycle. Push dinf
 
 		echo -n "Pushing drm-intel-next-fixes to for-linux-next... "
-		git push $DRY_RUN $remote +$remote/drm-intel-next-fixes:for-linux-next >& /dev/null
+		git push $DRY_RUN $nightly_origin +$nightly_origin/drm-intel-next-fixes:for-linux-next >& /dev/null
 		echo "Done."
 	fi
 }
 
-function check_conflicts
+function check_conflicts # tree
 {
-	if git diff | grep '\(<<<<<<<\|=======\|>>>>>>>\||||||||\)' ; then
-		if [ -n "$1" ]; then
-			echo $*
-		fi
+	if git diff | grep '\(<<<<<<<\|=======\|>>>>>>>\||||||||\)' &> /dev/null ; then
+		# we need an empty line to make it look pretty
+		echoerr ""
+		echoerr "FAILURE: Could not merge $1"
+		echoerr "See the section \"Resolving Conflicts when Rebuilding drm-intel-nightly\""
+		echoerr "in the drm-intel.rst documentation for how to handle this situation."
 		exit 1
 	fi
 	true
@@ -388,7 +390,7 @@ function dim_rebuild_nightly
 				echo -n "Applying manual fixup patch for $integration_branch merge... "
 				patch -p1 -i $fixup_file
 			fi
-			check_conflicts "Fail: conflict merging $tree"
+			check_conflicts "$repo/$branch"
 			git add -u
 
 			# because we filter out fast-forward merges there will
@@ -408,10 +410,10 @@ function dim_rebuild_nightly
 	git commit --quiet -m "$integration_branch: $time integration manifest"
 	echo "Done."
 
-	local nightly_remote=${drm_tip_repos[drm-intel]}
+	local nightly_origin=${drm_tip_repos[drm-intel]}
 
 	echo -n "Pushing $integration_branch... "
-	git push $DRY_RUN $nightly_remote +HEAD >& /dev/null && echo "Done."
+	git push $DRY_RUN $nightly_origin +HEAD >& /dev/null && echo "Done."
 
 	echo -n "Updating rerere cache... "
 	cd $rerere
@@ -426,7 +428,7 @@ function dim_rebuild_nightly
 			echo -n "Nothing changed. "
 		fi
 		echo -n "Pushing rerere cache... "
-		git push $DRY_RUN $nightly_remote HEAD >& /dev/null && echo "Done."
+		git push $DRY_RUN $nightly_origin HEAD >& /dev/null && echo "Done."
 	else
 		echo "Fail: Branch setup for the rerere-cache is borked."
 		exit 1
-- 
2.10.2

_______________________________________________
Intel-gfx mailing list
Intel-gfx@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/intel-gfx




[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]
  Powered by Linux