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 remotes). - run dim setup and enjoy the new awesomeness. If it breaks, I'm guilty ;-) Signed-off-by: Daniel Vetter <daniel.vetter at intel.com> --- dim | 22 +++++++++++++++------- 1 file changed, 15 insertions(+), 7 deletions(-) diff --git a/dim b/dim index 3792abe4d190..85e5de92a13e 100755 --- a/dim +++ b/dim @@ -78,6 +78,7 @@ dim=$(basename $0) today=`date +%Y-%m-%d` drm_intel_ssh=ssh://git.freedesktop.org/git/drm-intel +drm_nightly_ssh=ssh://git.freedesktop.org/git/drm-nightly drm_intel_git=git://anongit.freedesktop.org/drm-intel drm_upstream_git=git://people.freedesktop.org/~airlied/linux linux_upstream_git=git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git @@ -511,6 +512,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 @@ -519,9 +522,9 @@ function dim_cherry_pick sha_short=${sha:0:8} # 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 $sha..$DIM_DRM_INTEL_REMOTE/drm-intel-nightly + git log --grep=$sha_short --pretty=oneline $sha..$nightly_remote/drm-intel-nightly $DRY git cherry-pick -s -x -e $1 } @@ -890,15 +893,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 fi - 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 update!" exit 2 fi @@ -920,6 +925,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 drm-intel-next-queued:drm-intel-next @@ -928,7 +935,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 +$DIM_DRM_INTEL_REMOTE/drm-intel-nightly:drm-intel-testing + git push $DRY_RUN $DIM_DRM_INTEL_REMOTE +$nightly_remote/drm-intel-nightly:drm-intel-testing $DRY git tag -f drm-intel-testing-$today $DIM_DRM_INTEL_REMOTE/drm-intel-testing $DRY git push -f $DIM_DRM_INTEL_REMOTE drm-intel-testing-$today @@ -1134,15 +1141,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 -- 2.9.3