From: Jani Nikula <jani.nikula@linux.intel.com>
To: Intel Graphics Development <intel-gfx@lists.freedesktop.org>
Cc: Daniel Vetter <daniel.vetter@ffwll.ch>,
DRI Development <dri-devel@lists.freedesktop.org>,
Daniel Vetter <daniel.vetter@intel.com>
Subject: Re: [PATCH 07/10] dim: autodetect branches in rebuild-nightly
Date: Tue, 18 Oct 2016 16:52:05 +0300 [thread overview]
Message-ID: <87r37dvk6y.fsf@intel.com> (raw)
In-Reply-To: <20161018121356.9594-7-daniel.vetter@ffwll.ch>
On Tue, 18 Oct 2016, Daniel Vetter <daniel.vetter@ffwll.ch> wrote:
> Needs new url-mapping information in nightly.conf to work properly.
I think in the long run the right fix would be to make nightly.conf
independent of remote names. Not sure if that's worth the trouble at
this point.
BR,
Jani.
>
> Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
> ---
> dim | 48 ++++++++++++++++++++++++++++++++++++------------
> 1 file changed, 36 insertions(+), 12 deletions(-)
>
> diff --git a/dim b/dim
> index 48d5e7b6477a..f9b28d5fd241 100755
> --- a/dim
> +++ b/dim
> @@ -235,20 +235,30 @@ function dim_commit_add_tag
> done
> }
>
> +function map_nightly_remote
> +{
> + local nightly_remote=$1
> + local remote_url=`eval echo "\\\$nightly_remote_url_${nightly_remote/-/_}"`
> +
> + get_remote_name $remote_url
> +}
> +
> function update_linux_next
> {
> cd $DIM_PREFIX/drm-intel-nightly
>
> + local nightly_origin=`map_nightly_remote origin`
> +
> # always update drm-intel-fixes
> echo -n "Pushing drm-intel-fixes to for-linux-next-fixes... "
> - git push $DRY_RUN origin +origin/drm-intel-fixes:for-linux-next-fixes >& /dev/null
> + git push $DRY_RUN $nightly_origin +$nightly_origin/drm-intel-fixes:for-linux-next-fixes >& /dev/null
> echo "Done."
>
> - if git merge-base --is-ancestor origin/drm-intel-next-fixes origin/drm-intel-fixes ; then
> + if git merge-base --is-ancestor $nightly_origin/drm-intel-next-fixes $nightly_origin/drm-intel-fixes ; then
> # -fixes has caught up to dinf, i.e. we're out of the merge
> # window. Push the next queue.
> echo -n "Out of merge window. Pushing drm-intel-next-queued to for-linux-next... "
> - git push $DRY_RUN origin +origin/drm-intel-next-queued:for-linux-next >& /dev/null
> + git push $DRY_RUN $nightly_origin +$nightly_origin/drm-intel-next-queued:for-linux-next >& /dev/null
> echo "Done."
> else
> # dinf is ahead of -fixes, i.e. drm-next has already closed for
> @@ -256,7 +266,7 @@ function update_linux_next
> # for the current -next cycle. Push dinf
>
> echo -n "Pushing drm-intel-next-fixes to for-linux-next... "
> - git push $DRY_RUN origin +origin/drm-intel-next-fixes:for-linux-next >& /dev/null
> + git push $DRY_RUN $nightly_origin +$nightly_origin/drm-intel-next-fixes:for-linux-next >& /dev/null
> echo "Done."
> fi
> }
> @@ -272,11 +282,20 @@ function check_conflicts
> true
> }
>
> +function rr_cache_dir
> +{
> + if [ -d $DIM_PREFIX/drm-intel-nightly/.git/rr-cache/ ] ; then
> + echo $DIM_PREFIX/drm-intel-nightly/.git/rr-cache/
> + else
> + echo $DIM_PREFIX/$DIM_DRM_INTEL/.git/rr-cache/
> + fi
> +}
> +
> function update_rerere_cache
> {
> cd $DIM_PREFIX/drm-intel-rerere/
> git pull
> - cp rr-cache/* $DIM_PREFIX/drm-intel-nightly/.git/rr-cache/ -r
> + cp rr-cache/* `rr_cache-dir` -r
> cd -
> }
>
> @@ -307,9 +326,10 @@ function dim_rebuild_nightly
> fi
>
> for remote in $(echo $nightly_branches | tr " " "\n" | sed 's|/.*$||g' | sort -u); do
> - echo -n "Fetching $remote... "
> + local nightly_remote=`map_nightly_remote $remote`
> + echo -n "Fetching $remote (as $nightly_remote) ... "
> # git fetch returns 128 if there's nothing to be fetched
> - git fetch $remote >& /dev/null || true
> + git fetch $nightly_remote >& /dev/null || true
> echo "Done."
> done
>
> @@ -329,12 +349,14 @@ function dim_rebuild_nightly
> if [[ -n $sha1 ]] ; then
> echo -n "Using override sha1: $sha1... "
> else
> - sha1=$branch
> + local remote=${branch%%/*}
> + local nightly_remote=`map_nightly_remote $remote`
> + sha1=`echo $branch | sed -e s/^$remote/$nightly_remote/`
> fi
>
> if [ $first == 1 ] ; then
> + git reset --hard $sha1 &> /dev/null
> echo "Reset. Done."
> - git reset --hard $sha1 >& /dev/null
> first=0
> elif git merge --rerere-autoupdate --ff-only $sha1 >& /dev/null ; then
> # nothing to do if just fast-forward
> @@ -370,14 +392,16 @@ function dim_rebuild_nightly
> git commit --quiet -m "$integration_branch: $time integration manifest"
> echo "Done."
>
> + local nightly_origin=`map_nightly_remote origin`
> +
> echo -n "Pushing $integration_branch... "
> - git push $DRY_RUN origin +HEAD >& /dev/null && echo "Done."
> + git push $DRY_RUN $nightly_origin +HEAD >& /dev/null && echo "Done."
>
> echo -n "Updating rerere cache... "
> cd $rerere
> if git branch | grep rerere-cache | grep '\*' >& /dev/null ; then
> git pull >& /dev/null
> - cp $DIM_PREFIX/$integration_branch/.git/rr-cache/* rr-cache -r
> + cp `rr_cache_dir` rr-cache -r
> git add *.patch >& /dev/null || true
> git add rr-cache/* > /dev/null
> if git commit -m "$time: $integration_branch rerere cache update" >& /dev/null; then
> @@ -386,7 +410,7 @@ function dim_rebuild_nightly
> echo -n "Nothing changed. "
> fi
> echo -n "Pushing rerere cache... "
> - git push $DRY_RUN origin HEAD >& /dev/null && echo "Done."
> + git push $DRY_RUN $nightly_origin HEAD >& /dev/null && echo "Done."
> else
> echo "Fail: Branch setup for the rerere-cache is borked."
> exit 1
--
Jani Nikula, Intel Open Source Technology Center
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
next prev parent reply other threads:[~2016-10-18 13:52 UTC|newest]
Thread overview: 26+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-10-18 12:13 [PATCH 01/10] dim: Extract TODO Daniel Vetter
2016-10-18 12:13 ` [PATCH 02/10] dim: Autocheck for up-to-dateness Daniel Vetter
2016-10-18 13:15 ` Jani Nikula
2016-10-18 13:27 ` Daniel Vetter
2016-10-18 14:04 ` Jani Nikula
2016-10-18 12:13 ` [PATCH 03/10] dim: echoerr helper for printing to stderr Daniel Vetter
2016-10-18 13:05 ` Jani Nikula
2016-10-18 12:13 ` [PATCH 04/10] dim: autodetect remotes, first part for dim_setup Daniel Vetter
2016-10-18 13:27 ` [Intel-gfx] " Jani Nikula
2016-10-18 13:30 ` Ville Syrjälä
2016-10-18 14:05 ` Jani Nikula
2016-10-18 19:38 ` [PATCH] dim: autodetect branches in rebuild-nightly Daniel Vetter
2016-10-18 12:13 ` [PATCH 05/10] dim: support git worktree for aux checkouts Daniel Vetter
2016-10-18 13:38 ` [Intel-gfx] " Jani Nikula
2016-10-18 19:11 ` Daniel Vetter
2016-10-18 12:13 ` [PATCH 06/10] dim: Nuke nightly-forget Daniel Vetter
2016-10-18 13:39 ` Jani Nikula
2016-10-18 19:18 ` Daniel Vetter
2016-10-18 12:13 ` [PATCH 07/10] dim: autodetect branches in rebuild-nightly Daniel Vetter
2016-10-18 13:52 ` Jani Nikula [this message]
2016-10-18 19:29 ` Daniel Vetter
2016-10-19 7:10 ` Jani Nikula
2016-10-18 12:13 ` [PATCH 08/10] dim: remove integration-tree remotes Daniel Vetter
2016-10-18 12:13 ` [PATCH 09/10] dim: Split out drm-nightly.git Daniel Vetter
2016-10-18 12:13 ` [PATCH 10/10] dim: s/drm-nightly/drm-tip Daniel Vetter
2016-10-18 13:13 ` [Intel-gfx] [PATCH 01/10] dim: Extract TODO Jani Nikula
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87r37dvk6y.fsf@intel.com \
--to=jani.nikula@linux.intel.com \
--cc=daniel.vetter@ffwll.ch \
--cc=daniel.vetter@intel.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=intel-gfx@lists.freedesktop.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox