[DIM PATCH] dim: Don't use "@{upstream}" when running gitk for pulls

Sean Paul seanpaul at chromium.org
Thu Mar 29 14:55:34 UTC 2018


On Thu, Mar 29, 2018 at 05:45:46PM +0300, Jani Nikula wrote:
> On Thu, 29 Mar 2018, Sean Paul <seanpaul at chromium.org> wrote:
> > On Thu, Mar 29, 2018 at 9:54 AM Jani Nikula <jani.nikula at linux.intel.com>
> > wrote:
> >
> >> On Thu, 29 Mar 2018, Sean Paul <seanpaul at chromium.org> wrote:
> >> > Use the local branch when launching gitk for the purpose of pull
> >> > requests. Since the pull is generated from the local branch, this gives
> >> > a view of exactly what will be sent, thus avoiding embarrassing empty
> >> > pulls (*cough* [1] *cough*) or invalid tag summaries.
> >>
> >> What's the scenario where these would be out of sync?
> >>
> >
> > If the local branch is behind the upstream branch. This could be
> > intentional or unintentional.
> 
> Hmm, we seem to fetch the remote branch, but we don't then update the
> local branch on it... mmmkay.
> 
> > Intentional: I sometimes will want to cut a tag at a certain point if I'm
> > sending -misc-next pulls
> > Unintentional: As was the case last night, I sometimes forget to run dim
> > update-branches
> >
> > In both of these cases, I want the gitk output to show me what I'm tagging
> > instead of what is in the upstream branch.
> 
> Right, makes sense. Does tag_branch need updating too...? It does tag
> the upstream?

>From the tests I've run, it tags where the local brach is at.

> 
> For the intentional case, I'm wondering if we should consider switching
> to the drm-intel-next model of separating tagging and sending pull
> requests throughout. The main benefit would be letting you tag more
> often to log the changes. Then we could update the tagging to let you
> choose an older than the topmost commit to tag. And then we'd have the
> commit id to be tagged that could also be used for limiting gitk and
> tag_branch.

I added dim tag-branch a little while back to facilitate this. This is
especially useful for the layoff between -misc-next pulls between releases.

> 
> Your current use of this seems like abuse of the script... ;)

Well, fwiw, the intentional cases are where I've started my summary and people
have pushed patches while I'm writing it. So it's usually a couple hours behind
at worse, and definitely a usecase we want to facilitate.

Sean

> 
> BR,
> Jani.
> 
> 
> >
> > Sean
> >
> >
> >>
> >> BR,
> >> Jani.
> >>
> >> >
> >> > Cc: Dave Airlie <airlied at gmail.com>
> >> > Signed-off-by: Sean Paul <seanpaul at chromium.org>
> >> >
> >> > [1]-
> >> https://lists.freedesktop.org/archives/dri-devel/2018-March/171055.html
> >> > ---
> >> >  dim | 2 +-
> >> >  1 file changed, 1 insertion(+), 1 deletion(-)
> >> >
> >> > diff --git a/dim b/dim
> >> > index 29647f87381e..068efb674cd3 100755
> >> > --- a/dim
> >> > +++ b/dim
> >> > @@ -1818,7 +1818,7 @@ function dim_pull_request
> >> >               repo="drm-intel"
> >> >       else
> >> >               tag=$(tag_name "$branch")
> >> > -             gitk "$branch@{upstream}" ^$upstream &
> >> > +             gitk "$branch" ^$upstream &
> >> >               tag_branch $tag $branch
> >> >               $DRY git push $remote $tag
> >> >               prep_pull_mail $req_file $tag
> >>
> >> --
> >> Jani Nikula, Intel Open Source Technology Center
> >>
> 
> -- 
> Jani Nikula, Intel Open Source Technology Center

-- 
Sean Paul, Software Engineer, Google / Chromium OS


More information about the dim-tools mailing list