All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/2] dim: Move all rerere updating into helpers
@ 2017-07-12 12:12 Daniel Vetter
  2017-07-12 12:12 ` [PATCH 2/2] dim: Try to gc the rr-cache Daniel Vetter
  2017-07-13 20:14 ` [PATCH 1/2] dim: Move all rerere updating into helpers Sean Paul
  0 siblings, 2 replies; 6+ messages in thread
From: Daniel Vetter @ 2017-07-12 12:12 UTC (permalink / raw)
  To: DRI Development; +Cc: Daniel Vetter, Intel Graphics Development, Daniel Vetter

Just prep work.

Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
---
 dim | 61 ++++++++++++++++++++++++++++++++++---------------------------
 1 file changed, 34 insertions(+), 27 deletions(-)

diff --git a/dim b/dim
index ca11287535cc..b788edd29653 100755
--- a/dim
+++ b/dim
@@ -493,11 +493,41 @@ function rr_cache_dir
 
 function update_rerere_cache
 {
-	cd $DIM_PREFIX/drm-rerere/
+	echo -n "Updating rerere cache... "
+
 	git pull
 	mkdir $(rr_cache_dir) &> /dev/null || true
-	cp rr-cache/* $(rr_cache_dir) -r
+	cp rr-cache/* $(rr_cache_dir) -r --preserve=timestamps
 	cd - > /dev/null
+
+	echo "Done."
+}
+
+function commit_rerere_cache
+{
+	echo -n "Updating rerere cache... "
+
+	cd $DIM_PREFIX/drm-rerere/
+	if git_is_current_branch rerere-cache ; then
+		remote=$(branch_to_remote rerere-cache)
+
+		git pull >& /dev/null
+		rm $(rr_cache_dir)/rr-cache -Rf &> /dev/null || true
+		cp $(rr_cache_dir)/* rr-cache -r
+		git add ./*.patch >& /dev/null || true
+		git add rr-cache/* > /dev/null
+		git rm rr-cache/rr-cache &> /dev/null || true
+		if git commit -m "$time: $integration_branch rerere cache update" >& /dev/null; then
+			echo -n "New commit. "
+		else
+			echo -n "Nothing changed. "
+		fi
+		echo -n "Pushing rerere cache... "
+		git push $DRY_RUN $remote HEAD >& /dev/null && echo "Done."
+	else
+		echo "Fail: Branch setup for the rerere-cache is borked."
+		exit 1
+	fi
 }
 
 function dim_revert_rerere
@@ -528,9 +558,7 @@ function dim_rebuild_tip
 		warn_or_fail "integration configuration file $integration_config not commited"
 	fi
 
-	echo -n "Updating rerere cache... "
-	update_rerere_cache >& /dev/null
-	echo "Done."
+	update_rerere_cache
 
 	echo -n "Reloading $integration_config... "
 	read_integration_config
@@ -618,28 +646,7 @@ function dim_rebuild_tip
 	echo -n "Pushing $integration_branch... "
 	git push $DRY_RUN $remote +HEAD >& /dev/null && echo "Done."
 
-	echo -n "Updating rerere cache... "
-	cd $rerere
-	if git_is_current_branch rerere-cache ; then
-		remote=$(branch_to_remote rerere-cache)
-
-		git pull >& /dev/null
-		rm $(rr_cache_dir)/rr-cache -Rf &> /dev/null || true
-		cp $(rr_cache_dir)/* rr-cache -r
-		git add ./*.patch >& /dev/null || true
-		git add rr-cache/* > /dev/null
-		git rm rr-cache/rr-cache &> /dev/null || true
-		if git commit -m "$time: $integration_branch rerere cache update" >& /dev/null; then
-			echo -n "New commit. "
-		else
-			echo -n "Nothing changed. "
-		fi
-		echo -n "Pushing rerere cache... "
-		git push $DRY_RUN $remote HEAD >& /dev/null && echo "Done."
-	else
-		echo "Fail: Branch setup for the rerere-cache is borked."
-		exit 1
-	fi
+	commit_rerere_cache
 }
 
 # additional patch checks before pushing, e.g. for r-b tags
-- 
2.13.2

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

^ permalink raw reply related	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2017-07-14 13:46 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-07-12 12:12 [PATCH 1/2] dim: Move all rerere updating into helpers Daniel Vetter
2017-07-12 12:12 ` [PATCH 2/2] dim: Try to gc the rr-cache Daniel Vetter
2017-07-13 20:16   ` Sean Paul
2017-07-14  9:57     ` Jani Nikula
2017-07-14 13:46       ` Daniel Vetter
2017-07-13 20:14 ` [PATCH 1/2] dim: Move all rerere updating into helpers Sean Paul

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.