On Wed, May 23, 2018 at 01:34:08PM +0300, Jani Nikula wrote:
> On Wed, 23 May 2018, Daniel Vetter <[email protected]> wrote:
> > ... instead of hard-coding them. Will allow us to move the drm
> > subsystem trees around without also having to update dim.
> >
> > Inspired by a patch from Jani.
> >
> > I did test dim status and dim list-upstreams, but not the pull request
> > related commands (for lack of having pull requests to do, yay for
> > being a maintainer, no longer).
> >
> > v2: Rebase, I had a patch in my local tree which isn't needed with
> > this one here anymore.
> >
> > Cc: Jani Nikula <[email protected]>
> > Signed-off-by: Daniel Vetter <[email protected]>
> > ---
> >  dim | 20 ++++++++++----------
> >  1 file changed, 10 insertions(+), 10 deletions(-)
> >
> > diff --git a/dim b/dim
> > index dbd2c9a0f740..955ef20edf0f 100755
> > --- a/dim
> > +++ b/dim
> > @@ -1795,7 +1795,7 @@ function dim_update_next
> >     $DRY git add drivers/gpu/drm/i915/i915_drv.h
> >     git commit $DRY_RUN -sm "drm/i915: Update DRIVER_DATE to $driver_date"
> >  
> > -   gitk --first-parent drm-intel-next-queued ^$(repo_to_remote 
> > drm-upstream)/drm-next &
> > +   gitk --first-parent drm-intel-next-queued ^$(branch_to_remote drm-next) 
> > &
> 
> You'll still need to use $(branch_to_remote drm-next)/drm-next, right?
> The branch_to_remote only figures out the remote for you, and then you
> have to turn that into full remote/branch.

Yes. So much for not testing this :-/

I'll fix, and dry-run test to make sure the pull request stuff still
works.
-Daniel

> 
> >  
> >     # try to push dinq first in case someone raced
> >     FORCE=1 dim_push_queued
> > @@ -1914,7 +1914,7 @@ function dim_pull_request
> >  
> >  function dim_pull_request_next
> >  {
> > -   upstream=${1:-$(repo_to_remote drm-upstream)/drm-next}
> > +   upstream=${1:-$(branch_to_remote drm-next)}
> 
> Ditto.
> 
> >     dim_pull_request drm-intel-next $upstream
> >  }
> >  
> > @@ -1926,22 +1926,18 @@ function dim_pull_request_fixes
> >  
> >  function dim_pull_request_next_fixes
> >  {
> > -   upstream=${1:-$(repo_to_remote drm-upstream)/drm-next}
> > +   upstream=${1:-$(branch_to_remote drm-next)}
> 
> Ditto.
> 
> The rest seems fine.
> 
> BR,
> Jani.
> 
> >     dim_pull_request drm-intel-next-fixes $upstream
> >  }
> >  
> >  # Note: used by bash completion
> >  function dim_list_upstreams
> >  {
> > -   local dim_drm_upstream_remote
> > -
> >     cd $DIM_PREFIX/$DIM_REPO
> >  
> > -   dim_drm_upstream_remote=$(repo_to_remote drm-upstream)
> > -
> >     echo origin/master
> > -   echo $dim_drm_upstream_remote/drm-next
> > -   echo $dim_drm_upstream_remote/drm-fixes
> > +   echo $(branch_to_remote drm-next)/drm-next
> > +   echo $(branch_to_remote drm-fixes)/drm-fixes
> >  }
> >  
> >  # Note: used by bash completion
> > @@ -1997,6 +1993,7 @@ function dim_update_branches
> >  function dim_status
> >  {
> >     local repo remote drm_remote patches
> > +   local drm_next_upstream drm_fixes_upstream
> >  
> >     cd $DIM_PREFIX/$DIM_REPO
> >  
> > @@ -2007,8 +2004,11 @@ function dim_status
> >     for branch in $dim_branches ; do
> >             repo=$(branch_to_repo $branch)
> >             remote=$(repo_to_remote $repo)
> > +           drm_next_upstream=$(branch_to_remote drm-fixes)/drm-fixes
> > +           drm_fixes_upstream=$(branch_to_remote drm-next)/drm-next
> >  
> > -           patches=$(git log --oneline $remote/$branch ^origin/master 
> > ^$drm_remote/drm-next ^$drm_remote/drm-fixes | wc -l)
> > +           patches=$(git log --oneline $remote/$branch ^origin/master \
> > +                   ^$drm_next_upstream ^$drm_fixes_upstream | wc -l)
> >  
> >             if [[ $patches -ne 0 ]] ; then
> >                     echo $repo/$branch: $patches unmerged patches
> 
> -- 
> Jani Nikula, Intel Open Source Graphics Center

-- 
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch
_______________________________________________
dim-tools mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dim-tools

Reply via email to