All of lore.kernel.org
 help / color / mirror / Atom feed
From: Daniel Vetter <daniel.vetter@ffwll.ch>
To: Intel Graphics Development <intel-gfx@lists.freedesktop.org>
Cc: Daniel Vetter <daniel.vetter@ffwll.ch>,
	DRI Development <dri-devel@lists.freedesktop.org>,
	Daniel Vetter <daniel.vetter@intel.com>
Subject: [PATCH] dim: symbolic link for the rr-cache
Date: Mon,  7 Aug 2017 10:55:52 +0200	[thread overview]
Message-ID: <20170807085552.12151-1-daniel.vetter@ffwll.ch> (raw)

After about a month and a few attempts it's clear that my rr-cache gc
logic is busted. When copying stuff back&forth between the git branch
and git's rr-cache dir, something somewhere (or maybe it's git rerere
itself) touches all files and wreaks the timestamps.

End result is that over this month, every time when someone gc'ed a
few files, they've been resurrected a few days later by someone else.

I think the only way to fix this is by dropping the copying and
replacing git's rr-cache with a symbolic link. That way, when we
delete an rr-cache entry in the git branch, it won't be able to
resurrect. I hope at least ...

This also makes dim revert-rerere no longer needed, delete it.

v2: Unfunny the ln option placement (Jani).

Acked-by: Jani Nikula <jani.nikula@linux.intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
---
 dim     | 22 +++++++---------------
 dim.rst |  9 ---------
 2 files changed, 7 insertions(+), 24 deletions(-)

diff --git a/dim b/dim
index d52510529fa2..f8be76df4952 100755
--- a/dim
+++ b/dim
@@ -504,8 +504,13 @@ function update_rerere_cache
 
 	cd $DIM_PREFIX/drm-rerere/
 	git pull &> /dev/null
-	mkdir $(rr_cache_dir) &> /dev/null || true
-	cp rr-cache/* $(rr_cache_dir) -r --preserve=timestamps
+	if [ -d $(rr_cache_dir) ] ; then
+		rm -Rf $(rr_cache_dir)
+	fi
+	if [ ! -L $(rr_cache_dir) ] ; then
+		ln -s "$DIM_PREFIX/drm-rerere/rr-cache" $(dirname $(rr_cache_dir))
+	fi
+
 	cd - > /dev/null
 
 	echo "Done."
@@ -519,8 +524,6 @@ function commit_rerere_cache
 	if git_is_current_branch rerere-cache ; then
 		remote=$(branch_to_remote rerere-cache)
 
-		rm $(rr_cache_dir)/rr-cache -Rf &> /dev/null || true
-		cp $(rr_cache_dir)/* rr-cache -r --preserve=timestamps
 		git pull >& /dev/null
 		git add ./*.patch >& /dev/null || true
 		for file  in $(git ls-files); do
@@ -543,17 +546,6 @@ function commit_rerere_cache
 	fi
 }
 
-function dim_revert_rerere
-{
-	local commit
-
-	commit=${1:?$usage}
-
-	cd $DIM_PREFIX/drm-rerere/
-	git revert $commit
-	rm $(rr_cache_dir)/* -Rf
-}
-
 dim_alias_rebuild_nightly=rebuild-tip
 function dim_rebuild_tip
 {
diff --git a/dim.rst b/dim.rst
index f012a831da74..a2c110a054ee 100644
--- a/dim.rst
+++ b/dim.rst
@@ -247,15 +247,6 @@ Rebuild and push the integration tree.
 ADVANCED COMMANDS FOR COMMITTERS AND MAINTAINERS
 ================================================
 
-revert-rerere *rerere-cache-commit-ish*
----------------------------------------
-When a stored conflict resolution in the integration tree is wrong, this command
-can be used to fix up the mess. First figure out which commit in the
-*rerere-cache* branch contains the bogus conflict resolution, then revert it
-using this command. This ensures the resolution is also purged from any local
-caches, to make sure it doesn't get resurrected. Then run *rebuild-tip* to redo
-the merges, correctly.
-
 cat-to-fixup
 ------------
 Pipes stdin into the fixup patch file for the current drm-tip merge.
-- 
2.13.3

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

                 reply	other threads:[~2017-08-07  8:55 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20170807085552.12151-1-daniel.vetter@ffwll.ch \
    --to=daniel.vetter@ffwll.ch \
    --cc=daniel.vetter@intel.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=intel-gfx@lists.freedesktop.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.