From patchwork Fri Oct 21 19:37:00 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Daniel Vetter X-Patchwork-Id: 9389991 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 43AF860780 for ; Fri, 21 Oct 2016 19:39:15 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 2F4142A276 for ; Fri, 21 Oct 2016 19:39:15 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 23BA12A28E; Fri, 21 Oct 2016 19:39:15 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-4.1 required=2.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_MED, T_DKIM_INVALID autolearn=unavailable version=3.3.1 Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 9DDB72A276 for ; Fri, 21 Oct 2016 19:39:14 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id D8ABD6EE15; Fri, 21 Oct 2016 19:37:43 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-wm0-x241.google.com (mail-wm0-x241.google.com [IPv6:2a00:1450:400c:c09::241]) by gabe.freedesktop.org (Postfix) with ESMTPS id 648AD6EDD4 for ; Fri, 21 Oct 2016 19:37:35 +0000 (UTC) Received: by mail-wm0-x241.google.com with SMTP id o81so206307wma.2 for ; Fri, 21 Oct 2016 12:37:35 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ffwll.ch; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=JZ4gmuihIVz8wFKrwEzU02RO4woQPlpZ6l4bnZZ1rP0=; b=EgTLxfwr/CjOn/Fz4eSqBXfKk4fd/eWduBOWKgt95t5MXfHdE1F06JsyCgScbpxNPr 8O7xtzQ4lgnOiUrXIhulnlqRYUmpPRdvQEnBIaufvWmuTGS5MsaIxCPrU+LfUiz7k7oK JuqWQu6hf+8eNnHTtM5m90RYoR6PePaK1jIgs= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=JZ4gmuihIVz8wFKrwEzU02RO4woQPlpZ6l4bnZZ1rP0=; b=mldew/xiyYm2EpXKJy8gDp3ikaE/AeNSXVK1zz2rxeoogp//2WeyGFm2E7LuH+nNAC f58HdZaOGpfiF2PQy4oU8a0oQknW2TxqC5G7ef+K30DSxnTghBfzg9qIlpyW2e1dP0tL /PE/97sbmoFFq6hizOvjSE6lJIHZdXfFF4nCeHzfCqD1VpREfL9i4O9gGgQi8RhWT6yY dWuJDHDgt5FL077XwRkIYHMxUbxxolBm8nRoEfGDhB+qk2hgTWy/UsWWmwKc4hIHV+cI KTnxfEAUN+6fv4QMHTKyENnw2ymiK14PBfeaIR16Wb3qpSlVrslax2yTw2SMt7DvNSFX udrg== X-Gm-Message-State: AA6/9RlZpmwrC+nZasdPWXYWmMik/AswDhIUQVL0Fd2vVPw9KlRcO47ilYJ8ez2rFrZinA== X-Received: by 10.28.55.203 with SMTP id e194mr11293060wma.97.1477078653612; Fri, 21 Oct 2016 12:37:33 -0700 (PDT) Received: from phenom.ffwll.local ([2a02:168:56b5:0:ac27:b86c:7764:9429]) by smtp.gmail.com with ESMTPSA id q134sm5756630wme.3.2016.10.21.12.37.32 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 21 Oct 2016 12:37:33 -0700 (PDT) From: Daniel Vetter To: DRI Development Subject: [PATCH 18/18] dim: Make update_linux_next multi-repo compliant Date: Fri, 21 Oct 2016 21:37:00 +0200 Message-Id: <20161021193700.22100-19-daniel.vetter@ffwll.ch> X-Mailer: git-send-email 2.9.3 In-Reply-To: <20161021193700.22100-1-daniel.vetter@ffwll.ch> References: <20161021193700.22100-1-daniel.vetter@ffwll.ch> Cc: Daniel Vetter , Intel Graphics Development , Daniel Vetter X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" X-Virus-Scanned: ClamAV using ClamSMTP - Only update the for-linux-next branches in the repo for the branch just pushed. - Roll out the same logic (to allow us to always merge feature patches) for drm-misc. Signed-off-by: Daniel Vetter --- dim | 67 ++++++++++++++++++++++++++++++++++++++++++++----------------------- 1 file changed, 44 insertions(+), 23 deletions(-) diff --git a/dim b/dim index f42b1eebf48b..f7e814878a18 100755 --- a/dim +++ b/dim @@ -249,30 +249,43 @@ function map_nightly_remote get_remote_name $remote_url } -function update_linux_next +# update for-linux-next and for-linux-next-fixes branches +function update_linux_next # branch next next-fixes fixes { cd $DIM_PREFIX/drm-tip + local branch=$1 + local linux_next=$2 + local linux_next_fixes=$3 + local linux_fixes=$4 - local nightly_origin=`map_nightly_remote origin` + source $DIM_PREFIX/drm-rerere/nightly.conf + + local nightly_remote=`get_nightly_remote_for_branch $branch` + + if [[ $nightly_remote != `get_nightly_remote_for_branch $linux_next` ]] ; then + return + fi + + local remote=`map_nightly_remote $nightly_remote` # always update drm-intel-fixes - echo -n "Pushing drm-intel-fixes to for-linux-next-fixes... " - git push $DRY_RUN $nightly_origin +$nightly_origin/drm-intel-fixes:for-linux-next-fixes >& /dev/null + echo -n "Pushing $linux_fixes to for-linux-next-fixes... " + git push $DRY_RUN $remote +$remote/$linux_fixes:for-linux-next-fixes # >& /dev/null echo "Done." - if git merge-base --is-ancestor $nightly_origin/drm-intel-next-fixes $nightly_origin/drm-intel-fixes ; then + if git merge-base --is-ancestor $remote/$linux_next_fixes $remote/$linux_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 $nightly_origin +$nightly_origin/drm-intel-next-queued:for-linux-next >& /dev/null + echo -n "Out of merge window. Pushing $linux_next to for-linux-next... " + git push $DRY_RUN $remote +$remote/$linux_next:for-linux-next >& /dev/null echo "Done." else # dinf is ahead of -fixes, i.e. drm-next has already closed for # the next merge window and we've started to gather new fixes # for the current -next cycle. Push dinf - echo -n "Pushing drm-intel-next-fixes to for-linux-next... " - git push $DRY_RUN $nightly_origin +$nightly_origin/drm-intel-next-fixes:for-linux-next >& /dev/null + echo -n "Pushing $linux_next_fixes to for-linux-next... " + git push $DRY_RUN $remote +$remote/$linux_next_fixes:for-linux-next >& /dev/null echo "Done." fi } @@ -428,8 +441,6 @@ function dim_rebuild_nightly echo "Fail: Branch setup for the rerere-cache is borked." exit 1 fi - - update_linux_next } # push branch $1, rebuild nightly. the rest of the arguments are passed to git @@ -450,6 +461,9 @@ function dim_push_branch git push $DRY_RUN $remote $branch "$@" + update_linux_next $branch drm-intel-next-queued drm-intel-next-fixes drm-intel-fixes + update_linux_next $branch drm-misc-next drm-misc-next-fixes drm-misc-fixes + dim_rebuild_nightly } @@ -683,6 +697,24 @@ function dim_create_branch $DRY git commit --quiet -m "Adding $branch to -nightly" } +function get_nightly_remote_for_branch +{ + local branch=$1 + + for tree in $nightly_branches; do + local nightly_branch=${tree%:*} + local nightly_remote=${nightly_branch%%/*} + nightly_branch=${nightly_branch#*/} + + if [[ $nightly_branch == $branch ]] ; then + nightly_remote=$nightly_remote + echo $nightly_remote + fi + done + + echo "" +} + function dim_remove_branch { if [[ "x$1" = "x" ]]; then @@ -707,18 +739,7 @@ function dim_remove_branch source $DIM_PREFIX/drm-rerere/nightly.conf - local nightly_remote="" - - for tree in $nightly_branches; do - local nightly_branch=${tree%:*} - local nightly_remote=${nightly_branch%%/*} - nightly_branch=${nightly_branch#*/} - - if [[ $nightly_branch == $branch ]] ; then - nightly_remote=$nightly_remote - break - fi - done + local nightly_remote=`get_nightly_remote_for_branch $branch` if [[ $nightly_remote == "" ]] ; then echoerr "$branch not found in nightly.conf"