[PATCH 3/3] dim: Move drm-intel-next specifics to its caller.

Daniel Vetter daniel at ffwll.ch
Mon Aug 27 07:15:23 UTC 2018


On Mon, Aug 27, 2018 at 09:12:59AM +0200, Daniel Vetter wrote:
> On Fri, Aug 24, 2018 at 02:43:36PM -0700, Rodrigo Vivi wrote:
> > By expanding the usage of new dim_pull_request_tags
> > we can move the drm-intel-next specific parts to
> > dim_pull_request_next and simplify the dim_pull_request
> > limiting it to only create the tags.
> > 
> > Cc: Daniel Vetter <daniel.vetter at ffwll.ch>
> > Cc: Jani Nikula <jani.nikula at intel.com>
> > Signed-off-by: Rodrigo Vivi <rodrigo.vivi at intel.com>
> 
> tbh I'd just rip out all the drm-intel-next/testing stuff by now. Not
> worth the bother, and with the tag-branch/pull-request-tag combo we
> essentially have all the useful stuff implemented, but in a generic way.

btw some history on why it's called drm-intel-next-queued: Back when I was
the only committer for feature stuff I did occasionally rebase
drm-intel-next..drm-intel-next-queued patches. Only drm-intel-next was
really frozen history. So standard patch queue like other maintainers
still have it.

But with commit rights there's no rebasing (except when someone totally
wreaks it all), so the entire -queued suffix stopped making sense about 3
years ago. If we ditch the drm-intel-next special casing we might also
want to rename that. But could upset too many people's scripts and
workflows perhaps.
-Daniel

> > ---
> >  dim     | 44 ++++++++++++++------------------------------
> >  dim.rst |  7 +++----
> >  2 files changed, 17 insertions(+), 34 deletions(-)
> > 
> > diff --git a/dim b/dim
> > index b4d7996a1072..6e927850624a 100755
> > --- a/dim
> > +++ b/dim
> > @@ -1930,48 +1930,32 @@ function dim_pull_request_tags
> >  # dim_pull_request branch upstream
> >  function dim_pull_request
> >  {
> > -	local branch upstream remote repo req_file url_list git_url tag
> > +	local branch upstream remote repo url_list git_url tag
> >  
> >  	branch=${1:?$usage}
> >  	upstream=${2:?$usage}
> >  	remote=$(branch_to_remote $branch)
> >  	repo=$(branch_to_repo $branch)
> > -	req_file=$(mktemp)
> > -
> > -	if [ "$branch" != "drm-intel-next" ]; then
> > -		assert_branch $branch
> > -	else
> > -		cd $DIM_PREFIX/$DIM_REPO
> > -	fi
> >  
> > -	git_fetch_helper ${upstream%%/*}
> > -	echo "Using $upstream as the upstream"
> > -
> > -	if [ "$branch" = "drm-intel-next" ]; then
> > -		# drm-intel-next pulls have been tagged using dim update-next
> > -		drm_intel_next_tags=$(git log "$branch@{upstream}" ^$upstream --decorate | grep "(.*tag: drm-intel-next-" | sed -e "s/^.*(.*tag: \(drm-intel-next-[^ ,]*\).*)$/\1/")
> > -		prep_pull_mail $req_file $drm_intel_next_tags
> > -		tag=$(git describe --all --exact "$branch@{upstream}")
> > -	else
> > -		tag=$(tag_name "$branch")
> > -		gitk --first-parent "$branch" ^$upstream &
> > -		tag_branch $tag $branch
> > -		$DRY git push $remote $tag
> > -		prep_pull_mail $req_file $tag
> > -	fi
> > +	tag=$(tag_name "$branch")
> > +	gitk --first-parent "$branch" ^$upstream &
> > +	tag_branch $tag $branch
> > +	$DRY git push $remote $tag
> >  
> > -	url_list=${drm_tip_repos[$repo]}
> > -	git_url=$(pick_protocol_url git $url_list)
> > -
> > -	git request-pull $upstream $git_url $tag >> $req_file
> > -	$DRY $DIM_MUA -s "[PULL] $branch" \
> > -	     -i $req_file "${dim_pull_request_recipients[@]}"
> > +	dim_pull_request_tags $branch $upstream $tag
> >  }
> >  
> >  function dim_pull_request_next
> >  {
> > +	local drm_intel_next_tags
> > +
> >  	upstream=${1:-$(branch_to_remote drm-next)/drm-next}
> > -	dim_pull_request drm-intel-next $upstream
> > +
> > +	cd $DIM_PREFIX/$DIM_REPO
> > +	# drm-intel-next pulls have been tagged using dim update-next
> > +	drm_intel_next_tags=$(git log "drm-intel-next@{upstream}" ^$upstream --decorate | grep "(.*tag: drm-intel-next-" | sed -e "s/^.*(.*tag: \(drm-intel-next-[^ ,]*\).*)$/\1/")
> > +
> > +	dim_pull_request_tags drm-intel-next $upstream drm_intel_next_tags
> >  }
> >  
> >  function dim_pull_request_fixes
> > diff --git a/dim.rst b/dim.rst
> > index 1a9bed464021..6bd2c8ae30c4 100644
> > --- a/dim.rst
> > +++ b/dim.rst
> > @@ -301,10 +301,9 @@ recipients already set.
> >  
> >  pull-request *branch* *upstream*
> >  --------------------------------
> > -Fetch the *upstream* remote to make sure it's up-to-date, create and push a date
> > -based tag for the *branch*, generate a pull request template with the specified
> > -*upstream*, and finally start \$DIM_MUA with the template with subject and
> > -recipients already set.
> > +Creates and pushes a date based tag for the *branch*. It generates a pull request
> > +template with the specified *upstream*, and finally it starts \$DIM_MUA with the
> > +template with subject and recipients already set.
> >  
> >  Since the tag for the *branch* is date based, the pull request can be
> >  regenerated with the same commands if something goes wrong.
> > -- 
> > 2.17.1
> > 
> 
> -- 
> Daniel Vetter
> Software Engineer, Intel Corporation
> http://blog.ffwll.ch

-- 
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch


More information about the dim-tools mailing list