From: Jani Nikula <jani.nikula@intel.com>
To: intel-gfx@lists.freedesktop.org
Cc: jani.nikula@intel.com
Subject: [dim PATCH 5/6] dim: figure drm-intel remote out automatically
Date: Tue, 3 Oct 2017 16:38:07 +0300 [thread overview]
Message-ID: <20171003133808.28680-6-jani.nikula@intel.com> (raw)
In-Reply-To: <20171003133808.28680-1-jani.nikula@intel.com>
We have all the plumbing necessary to figure out the drm-intel
remote. No need to configure it separately.
Signed-off-by: Jani Nikula <jani.nikula@intel.com>
---
dim | 40 ++++++++++++++++++++++------------------
dim.rst | 4 ----
dimrc.sample | 4 ----
3 files changed, 22 insertions(+), 26 deletions(-)
diff --git a/dim b/dim
index 610f65a1a903..dea82095123a 100755
--- a/dim
+++ b/dim
@@ -48,9 +48,6 @@ DIM_PREFIX=${DIM_PREFIX:-$HOME/linux}
# main maintainer repo under $DIM_PREFIX
DIM_REPO=${DIM_REPO:-${DIM_DRM_INTEL:-src}}
-# name of the $drm_intel_ssh remote within $DIM_REPO
-DIM_DRM_INTEL_REMOTE=${DIM_DRM_INTEL_REMOTE:-drm-intel}
-
# mail user agent. must support a subset of mutt(1) command line options:
# usage: $DIM_MUA [-s subject] [-i file] [-c cc-addr] to-addr [...]
DIM_MUA=${DIM_MUA:-mutt}
@@ -1089,14 +1086,16 @@ function git_list_fixes
function cherry_pick_branch
{
- local branch log fail_log needed have_fixes
+ local branch log fail_log intel_remote needed have_fixes
branch=${1:?$usage}
log=$(mktemp)
fail_log=$(mktemp)
+ intel_remote=$(url_to_remote $drm_intel_ssh)
+
# Look for commits in dinq tagged as fixes.
- for commit in $(git_list_fixes $DIM_DRM_INTEL_REMOTE/$branch..$DIM_DRM_INTEL_REMOTE/drm-intel-next-queued -- drivers/gpu/drm/i915); do
+ for commit in $(git_list_fixes $intel_remote/$branch..$intel_remote/drm-intel-next-queued -- drivers/gpu/drm/i915); do
echo -n "Considering $(dim_cite $commit)... "
# Look at history for already cherry-picked fixes.
@@ -1597,13 +1596,14 @@ function dim_update_next
function dim_update_next_continue
{
- local remote req_file suffix tag tag_testing
+ local remote intel_remote req_file suffix tag tag_testing
assert_branch drm-intel-next-queued
+ intel_remote=$(url_to_remote $drm_intel_ssh)
remote=$(url_to_remote $drm_tip_ssh)
- git push $DRY_RUN -f $DIM_DRM_INTEL_REMOTE drm-intel-next-queued:drm-intel-next
+ git push $DRY_RUN -f $intel_remote drm-intel-next-queued:drm-intel-next
tag=drm-intel-next-$today
tag_testing=drm-intel-testing-$today
@@ -1612,13 +1612,13 @@ function dim_update_next_continue
tag_testing="drm-intel-testing-$today-$((++suffix))"
done
- $DRY git tag -a $DIM_GPG_KEYID $tag $DIM_DRM_INTEL_REMOTE/drm-intel-next
- git push $DRY_RUN $DIM_DRM_INTEL_REMOTE $tag
+ $DRY git tag -a $DIM_GPG_KEYID $tag $intel_remote/drm-intel-next
+ git push $DRY_RUN $intel_remote $tag
echo "Updating drm-intel-testing to latest drm-tip"
- git push $DRY_RUN $DIM_DRM_INTEL_REMOTE +$remote/drm-tip:drm-intel-testing
- $DRY git tag $tag_testing $DIM_DRM_INTEL_REMOTE/drm-intel-testing
- $DRY git push $DIM_DRM_INTEL_REMOTE $tag_testing
+ git push $DRY_RUN $intel_remote +$remote/drm-tip:drm-intel-testing
+ $DRY git tag $tag_testing $intel_remote/drm-intel-testing
+ $DRY git push $intel_remote $tag_testing
req_file=$(mktemp)
cat > $req_file <<-HERE
@@ -1637,10 +1637,12 @@ function dim_update_next_continue
function dim_tag_next
{
- local tag suffix
+ local intel_remote tag suffix
cd $DIM_PREFIX/$DIM_REPO
- git fetch $DIM_DRM_INTEL_REMOTE
+
+ intel_remote=$(url_to_remote $drm_intel_ssh)
+ git fetch $intel_remote
if [ $(git rev-parse drm-intel-next) == $(git rev-parse "drm-intel-next@{u}") ] ; then
echo "Tagging current drm-intel-next"
@@ -1650,8 +1652,8 @@ function dim_tag_next
tag="drm-intel-next-$today-$((++suffix))"
done
- $DRY git tag -a $DIM_GPG_KEYID $tag $DIM_DRM_INTEL_REMOTE/drm-intel-next
- git push $DRY_RUN $DIM_DRM_INTEL_REMOTE $tag
+ $DRY git tag -a $DIM_GPG_KEYID $tag $intel_remote/drm-intel-next
+ git push $DRY_RUN $intel_remote $tag
else
echo "drm-intel-next not up-to-date, aborting"
exit
@@ -1765,7 +1767,7 @@ function dim_list_branches
dim_alias_ub=update-branches
function dim_update_branches
{
- local repo remote url_list
+ local repo remote url_list intel_remote
cd $DIM_PREFIX/$DIM_REPO
@@ -1797,8 +1799,10 @@ function dim_update_branches
fi
done
if git_branch_exists drm-intel-next ; then
+ intel_remote=$(url_to_remote $drm_intel_ssh)
+
dim_checkout drm-intel-next
- $DRY git reset --hard $DIM_DRM_INTEL_REMOTE/drm-intel-next
+ $DRY git reset --hard $intel_remote/drm-intel-next
fi
cd $DIM_PREFIX/maintainer-tools
diff --git a/dim.rst b/dim.rst
index 29d145d40f08..b9bdd74eb862 100644
--- a/dim.rst
+++ b/dim.rst
@@ -477,10 +477,6 @@ DIM_REPO
--------
The main maintainer repository under \$DIM_PREFIX.
-DIM_DRM_INTEL_REMOTE
---------------------
-Name of the $drm_intel_ssh remote within \$DIM_REPO.
-
DIM_MUA
-------
Mail user agent. Must support the following subset of **mutt(1)** command line
diff --git a/dimrc.sample b/dimrc.sample
index 9f6b786af52f..1b522fa47e8c 100644
--- a/dimrc.sample
+++ b/dimrc.sample
@@ -10,10 +10,6 @@
# Name of the main maintainer repo under $DIM_PREFIX.
#DIM_REPO=src
-# Name of the remote for ssh://git.freedesktop.org/git/drm-intel within
-# $DIM_REPO
-#DIM_DRM_INTEL_REMOTE=danvet
-
# Mail User Agent supporting a subset of mutt(1) command line options:
# [-s subject] [-i file] [-c cc-addr] to-addr [...]
#DIM_MUA=mutt
--
2.11.0
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
next prev parent reply other threads:[~2017-10-03 13:39 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-10-03 13:38 dim: some repo/remote refactoring Jani Nikula
2017-10-03 13:38 ` [dim PATCH 1/6] dim: require explicit repo in create-branch Jani Nikula
2017-10-03 13:38 ` [dim PATCH 2/6] dim: url_to_remote can't normally fail Jani Nikula
2017-10-03 15:17 ` Jani Nikula
2017-10-05 8:57 ` Jani Nikula
2017-10-05 17:05 ` Daniel Vetter
2017-10-06 8:54 ` Jani Nikula
2017-10-03 13:38 ` [dim PATCH 3/6] dim: look at all tip branches in dim tc Jani Nikula
2017-10-03 13:38 ` [dim PATCH 4/6] dim: s/DIM_DRM_INTEL/DIM_REPO/ Jani Nikula
2017-10-03 13:38 ` Jani Nikula [this message]
2017-10-03 13:38 ` [dim PATCH 6/6] dim: reduce dependency on hard-coded repo URLs Jani Nikula
2017-10-05 17:08 ` Daniel Vetter
2017-10-05 8:53 ` [dim PATCH] dim: cd to dim repo in list-upstreams Jani Nikula
2017-10-05 17:09 ` Daniel Vetter
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=20171003133808.28680-6-jani.nikula@intel.com \
--to=jani.nikula@intel.com \
--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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.