[PATCH 1/2] dim: Migrate to Gitlab

Sean Paul sean at poorly.run
Wed Aug 29 19:24:23 UTC 2018


On Wed, Aug 29, 2018 at 08:18:20PM +0200, Daniel Vetter wrote:
> On Wed, Aug 29, 2018 at 7:42 PM, Sean Paul <sean at poorly.run> wrote:
> > On Wed, Aug 29, 2018 at 01:40:26PM -0400, Sean Paul wrote:
> >> On Wed, Aug 29, 2018 at 07:32:26PM +0200, Daniel Vetter wrote:
> >> > On Wed, Aug 29, 2018 at 7:10 PM, Sean Paul <sean at poorly.run> wrote:
> >> > > On Wed, Aug 29, 2018 at 05:25:24PM +0200, Daniel Vetter wrote:
> >> > >> - Use the https url so we don't require everyone to have their gitlab
> >> > >>   accounts ready already. Otherwise we'd need to gate migrating
> >> > >>   maintainer-tools on migrating all the drm kernel repos, and I'd
> >> > >>   really like to partition the migration. Also, we want to reduce
> >> > >>   maintainer-tools committers anyway, to shrink the attack surface a
> >> > >>   lot.
> >> > >>
> >> > >>   Committers need to either set up the http access tokens, or set up
> >> > >>   ssh certificates and change their remote for the maintainer-tools
> >> > >>   repo.
> >> > >>
> >> > >> - For testing, you can undo this auto-update using
> >> > >>
> >> > >> $ git remote remove maintainer-tools ; git branch -u drm-tip/maintainer-tools
> >> > >>
> >> > >> - My plan is that we push an immediate revert of this code to the
> >> > >>   gitlab repo (and only there) so it doesn't stick around.
> >> > >>
> >> > >> - fd.o admins recommended that we don't do a read-only copy of
> >> > >>   maintaienr-tools at the old-place, since it's not a 1:1 match. For
> >> > >>   everything else we're going to migrate there will be a read-only
> >> > >>   copy with all urls working nicely, maintainer-tools is the only
> >> > >>   exception here.
> >> > >>
> >> > >> v2: Don't forget about dim_setup.
> >> > >>
> >> > >> v3: Update all the urls in docs!
> >> > >>
> >> > >> Cc: Rodrigo Vivi <rodrigo.vivi at intel.com>
> >> > >> Cc: Daniel Stone <daniels at collabora.com>
> >> > >> Acked-by: Rodrigo Vivi <rodrigo.vivi at intel.com> (v2)
> >> > >> Reviewed-by: Daniel Stone <daniels at collabora.com> (v2)
> >> > >> Signed-off-by: Daniel Vetter <daniel.vetter at intel.com>
> >> > >> ---
> >> > >>  dim                 | 12 +++++++++++-
> >> > >>  dim.rst             |  3 +--
> >> > >>  getting-started.rst |  4 ++--
> >> > >>  3 files changed, 14 insertions(+), 5 deletions(-)
> >> > >>
> >> > >> diff --git a/dim b/dim
> >> > >> index 3f5fdb9233f7..3612cc66d1c4 100755
> >> > >> --- a/dim
> >> > >> +++ b/dim
> >> > >> @@ -76,6 +76,8 @@ dim=$(basename $0)
> >> > >>  dim_today=$(date +%Y-%m-%d)
> >> > >>  dim_timestamp="$(date --utc +%Yy-%mm-%dd-%Hh-%Mm-%Ss) UTC"
> >> > >>
> >> > >> +maintainer_tools_https=https://gitlab.freedesktop.org/drm/maintainer-tools.git
> >> > >> +
> >> > >>  # Recipients for all dim based pull requests.
> >> > >>  # Add To: lines to the end, Cc: lines in the beginning with -c.
> >> > >>  dim_pull_request_recipients=(
> >> > >> @@ -2028,6 +2030,14 @@ function dim_update_branches
> >> > >>       fi
> >> > >>
> >> > >>       cd $DIM_PREFIX/maintainer-tools
> >> > >> +     if ! git remote | grep -q '^maintainer-tools$' ; then
> >> > >
> >> > > It'd be safer if checked the upstream of the the local maintainer-tools branch.
> >> > > It's possible that folks have the maintainer-tools remote, but don't have the
> >> > > branches properly linked (I fall into this category).
> >> >
> >> > I think you&me are the only two people with this problem. Just run the
> >> > oneline in the commit message before you run dim update-branches. I
> >> > think we should be fine ...
> >>
> >> Well, sure, but we could also avoid that quite easily:
> >>
> >> git branch -vv | grep '  maintainer-tools' | awk '{ print $3 }' | grep -q 'drm-tip/maintainer-tools'
> >
> > Even better:
> >
> > git branch -l maintainer-tools -vv | awk '{ print $3 }' | grep -q 'drm-tip/maintainer-tools
> 
> I think this is silly, but if you insist let's at least do this right:
> 
> git rev-parse --symbolic-full-name @{u} | grep -q
> 'refs/remotes/drm-tip/maintainer-tools'

Well, actually that wouldn't work for me. Reason being I'm not on
the maintainer-tools branch locally :/

Anyways, I don't want to annoy you with more back and forth on this. Let's go
with your v3 version and I'll set upstream locally.

Reviewed-by: Sean Paul <seanpaul at chromium.org>

> 
> Plus a bunch of || true to make sure it doesn't fall over
> half-migrated states like you have, for otherwise this is even more
> pointless :-)
> 
> I'll resend once I retested all combinations.
> -Daniel
> 
> >
> > Sean
> >
> >>
> >> Sean
> >>
> >> > -Daniel
> >> >
> >> > >
> >> > > Sean
> >> > >
> >> > >> +             git remote add maintainer-tools $maintainer_tools_https
> >> > >> +             git fetch maintainer-tools
> >> > >> +             git branch --set-upstream-to=maintainer-tools/master
> >> > >> +     else
> >> > >> +             echo "Maintainer tools already migrated."
> >> > >> +     fi
> >> > >> +
> >> > >>       if git_is_current_branch maintainer-tools ; then
> >> > >>               echo "Updating maintainer-tools ..."
> >> > >>               git pull --rebase
> >> > >> @@ -2124,7 +2134,7 @@ function dim_setup
> >> > >>
> >> > >>       cd $DIM_PREFIX
> >> > >>
> >> > >> -     setup_aux_checkout maintainer-tools $drm_tip_ssh maintainer-tools
> >> > >> +     setup_aux_checkout maintainer-tools $maintainer_tools_https maintainer-tools
> >> > >>
> >> > >>       setup_aux_checkout rerere-cache $drm_tip_ssh drm-rerere
> >> > >>
> >> > >> diff --git a/dim.rst b/dim.rst
> >> > >> index f33fa57e4cb3..e47337783b49 100644
> >> > >> --- a/dim.rst
> >> > >> +++ b/dim.rst
> >> > >> @@ -29,8 +29,7 @@ the drm-intel_ and drm-misc_ git repositories.
> >> > >>  This man page is a command-line reference for the tool only; for more
> >> > >>  comprehensive documentation, including a getting started guide, see
> >> > >>  https://01.org/linuxgraphics/gfx-docs/maintainer-tools/index.html, or the same
> >> > >> -in source form in the maintainer-tools branch of the drm-tip repository at
> >> > >> -https://cgit.freedesktop.org/drm/drm-tip/log/?h=maintainer-tools.
> >> > >> +in source form at https://gitlab.freedesktop.org/drm/maintainer-tools.
> >> > >>
> >> > >>  .. _drm-intel: drm-intel.html
> >> > >>  .. _drm-misc: drm-misc.html
> >> > >> diff --git a/getting-started.rst b/getting-started.rst
> >> > >> index d035862e3970..5d4ce9c1991e 100644
> >> > >> --- a/getting-started.rst
> >> > >> +++ b/getting-started.rst
> >> > >> @@ -6,11 +6,11 @@
> >> > >>
> >> > >>  For getting started grab the latest dim (drm-intel-maintainer) script from::
> >> > >>
> >> > >> -    http://cgit.freedesktop.org/drm-tip/tree/dim?h=maintainer-tools
> >> > >> +    https://gitlab.freedesktop.org/drm/maintainer-tools/raw/master/dim
> >> > >>
> >> > >>  There's also a sample config file for ~/.dimrc::
> >> > >>
> >> > >> -    http://cgit.freedesktop.org/drm-tip/tree/dimrc.sample?h=maintainer-tools
> >> > >> +    https://gitlab.freedesktop.org/drm/maintainer-tools/raw/master/dimrc.sample
> >> > >>
> >> > >>  Plus, there's bash completion in the same directory if you feel like using that.
> >> > >>  Run::
> >> > >> --
> >> > >> 2.18.0
> >> > >>
> >> > >> _______________________________________________
> >> > >> dim-tools mailing list
> >> > >> dim-tools at lists.freedesktop.org
> >> > >> https://lists.freedesktop.org/mailman/listinfo/dim-tools
> >> > >
> >> > > --
> >> > > Sean Paul, Software Engineer, Google / Chromium OS
> >> >
> >> >
> >> >
> >> > --
> >> > Daniel Vetter
> >> > Software Engineer, Intel Corporation
> >> > +41 (0) 79 365 57 48 - http://blog.ffwll.ch
> >>
> >> --
> >> Sean Paul, Software Engineer, Google / Chromium OS
> >
> > --
> > Sean Paul, Software Engineer, Google / Chromium OS
> 
> 
> 
> -- 
> Daniel Vetter
> Software Engineer, Intel Corporation
> +41 (0) 79 365 57 48 - http://blog.ffwll.ch

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


More information about the dim-tools mailing list