This is a prep step to eventually split out the drm-misc branches all
into their own repo. To get there we first need to split out the
integration tree mangling.

Since dim doesn't auto-update and since the transition is a good
reason to switch over to worktrees and it's tricky it's not scripted.
The following needs to be done when dim rebuild-nightly fails:

- Make sure you have the latest dim version.

- Good to also check you have a recent-ish git. Latest dim supports
  git worktree to save on disk space needed for .git metadata. It's
  much more robust than the git alternates storage trick we've used
  thus far. Note that git worktree is still optional (but that's not a
  recommended setup).

- Delete $DIM_PREFIX/{drm-intel-rerere,drm-intel-nightly,maintainer-tools}
  It's not strictly needed to kill the maintainer-tools checkout too,
  but might as well switch it over to git worktree too.

- Make sure you don't have any branches left over for drm-intel-rerere
  and drm-intel-nightly anywhere (since they need to switch their

- run dim setup and enjoy the new awesomeness.

If it breaks, I'm guilty ;-)

Signed-off-by: Daniel Vetter <>
 dim | 22 +++++++++++++++-------
 1 file changed, 15 insertions(+), 7 deletions(-)

diff --git a/dim b/dim
index 92841b046c2c..d8f8a87b95c2 100755
--- a/dim
+++ b/dim
@@ -78,6 +78,7 @@ dim=$(basename $0)
 today=`date +%Y-%m-%d`
@@ -506,6 +507,8 @@ function dim_apply_next_fixes
 function dim_cherry_pick
+       local nightly_remote=`get_remote_name $drm_nightly_ssh`
        if [[ "x$1" = "x" ]]; then
                echo "usage: $dim $subcommand commit-ish"
                exit 1
@@ -514,9 +517,9 @@ function dim_cherry_pick
        # need latest -nightly
-       git fetch $DIM_DRM_INTEL_REMOTE
+       git fetch $nightly_remote
        echo Possible fixup patches for your cherry-pick:
-       git log --grep=$sha_short --pretty=oneline 
+       git log --grep=$sha_short --pretty=oneline 
        $DRY git cherry-pick -s -x -e $1
@@ -885,15 +888,17 @@ function dim_for_each_workdirs
 function dim_update_next
+       local nightly_remote=`get_remote_name $drm_nightly_ssh`
        assert_branch drm-intel-next-queued
        git pull --ff-only
-       if ! git branch --merged $DIM_DRM_INTEL_REMOTE/drm-intel-nightly | grep 
drm-intel-fixes &> /dev/null ; then
+       if ! git branch --merged $nightly_remote/drm-intel-nightly | grep 
drm-intel-fixes &> /dev/null ; then
                echo "drm-intel-fixes not merged into -nigthly, please update!"
                exit 2
-       if ! git branch --merged $DIM_DRM_INTEL_REMOTE/drm-intel-nightly | grep 
drm-intel-next-queued &> /dev/null ; then
+       if ! git branch --merged $nightly_remote/drm-intel-nightly | grep 
drm-intel-next-queued &> /dev/null ; then
                echo "drm-intel-next-queued not merged into -nigthly, please 
                exit 2
@@ -915,6 +920,8 @@ function dim_update_next
 function dim_update_next_continue
+       local nightly_remote=`get_remote_name $drm_nightly_ssh`
        assert_branch drm-intel-next-queued
        git push $DRY_RUN -f $DIM_DRM_INTEL_REMOTE 
@@ -923,7 +930,7 @@ function dim_update_next_continue
        git push $DRY_RUN -f $DIM_DRM_INTEL_REMOTE $tag
        echo "Updating -testing to latest -nightly"
-       git push $DRY_RUN $DIM_DRM_INTEL_REMOTE 
+       git push $DRY_RUN $DIM_DRM_INTEL_REMOTE 
        $DRY git tag -f drm-intel-testing-$today 
        $DRY git push -f $DIM_DRM_INTEL_REMOTE drm-intel-testing-$today
@@ -1129,15 +1136,16 @@ function dim_setup
        # check remote configuration
        remote=`get_remote_name $linux_upstream_git`
        remote=`get_remote_name $drm_intel_ssh`
+       remote=`get_remote_name $drm_nightly_ssh`
        remote=`get_remote_name $drm_upstream_git`
        cd ..
        setup_aux_checkout maintainer-tools $drm_intel_ssh maintainer-tools
-       setup_aux_checkout rerere-cache $drm_intel_ssh drm-intel-rerere
+       setup_aux_checkout rerere-cache $drm_nightly_ssh drm-intel-rerere
-       setup_aux_checkout drm-intel-nightly $drm_intel_ssh drm-intel-nightly
+       setup_aux_checkout drm-intel-nightly $drm_nightly_ssh drm-intel-nightly
        cd drm-intel-nightly
        if git remote | grep drm-upstream > /dev/null ; then
                git config remote.drm-upstream.url $drm_upstream_git

Intel-gfx mailing list

Reply via email to