[dim PATCH 6/7] dim: include all unmerged tags in the pull request mail

Daniel Vetter daniel at ffwll.ch
Thu Dec 6 08:52:46 UTC 2018


On Wed, Dec 05, 2018 at 05:02:58PM +0200, Jani Nikula wrote:
> Until now, only drm-intel-next pull requests included all previous
> annotated tag texts in the pull request mail. Do this for all branches
> in case they were previously tagged using dim tag-branch.

So one annoying thing with this entire idea (that lazy me never fixed) is
that git pull throws all but the last tag away. And Dave is lazy too, so
he doesn't copy them in either, and then promptly forgets about those
features when typing his pull request mail to Linus.

I think before we roll this out more we need some cleverness for the case
where there's more than 1 tag. Maybe autogenerate an -aggregate tag which
has everything concatenated? Ofc would still first need to ask the
maintainer to write the tag for the current pile of patches.
-Daniel

> 
> Signed-off-by: Jani Nikula <jani.nikula at intel.com>
> ---
>  dim | 17 +++++++++++------
>  1 file changed, 11 insertions(+), 6 deletions(-)
> 
> diff --git a/dim b/dim
> index 5081e9ac4a34..12b86cf3a382 100755
> --- a/dim
> +++ b/dim
> @@ -1939,7 +1939,7 @@ function dim_tag_next
>  # 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 req_file url_list git_url tag tags
>  
>  	branch=${1:?$usage}
>  	upstream=${2:?$usage}
> @@ -1957,21 +1957,26 @@ function dim_pull_request
>  
>  	if [ "$branch" = "drm-intel-next" ]; then
>  		# drm-intel-next pulls have been tagged using dim update-next
> -		drm_intel_next_tags=$(git_unmerged_tags "$branch" "$upstream")
> -		prep_pull_mail $req_file $drm_intel_next_tags
> -		tag=$(git describe --all --exact "$branch@{upstream}")
> -
>  		repo="drm-intel"
>  	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
>  
>  		repo=$(branch_to_repo $branch)
>  	fi
>  
> +	tags=$(git_unmerged_tags "$branch" "$upstream")
> +	prep_pull_mail $req_file $tags
> +	if [[ -z "$tags" ]]; then
> +		echoerr "no unmerged tags, please use dim tag-branch"
> +		return 1
> +	fi
> +
> +	# Use the latest tag for the pull request
> +	tag="${tags%% *}"
> +
>  	url_list=${drm_tip_repos[$repo]}
>  	git_url=$(pick_protocol_url git $url_list)
>  
> -- 
> 2.11.0
> 
> _______________________________________________
> dim-tools mailing list
> dim-tools at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/dim-tools

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


More information about the dim-tools mailing list