public inbox for intel-gfx@lists.freedesktop.org
 help / color / mirror / Atom feed
From: Jani Nikula <jani.nikula@intel.com>
To: intel-gfx@lists.freedesktop.org
Cc: jani.nikula@intel.com
Subject: [dim PATCH 6/6] dim: reduce dependency on hard-coded repo URLs
Date: Tue,  3 Oct 2017 16:38:08 +0300	[thread overview]
Message-ID: <20171003133808.28680-7-jani.nikula@intel.com> (raw)
In-Reply-To: <20171003133808.28680-1-jani.nikula@intel.com>

Look up the remotes using the repo names in nightly.conf.

Signed-off-by: Jani Nikula <jani.nikula@intel.com>
---
 dim | 18 +++++++++---------
 1 file changed, 9 insertions(+), 9 deletions(-)

diff --git a/dim b/dim
index dea82095123a..d4c0b72abf6e 100755
--- a/dim
+++ b/dim
@@ -1092,7 +1092,7 @@ function cherry_pick_branch
 	log=$(mktemp)
 	fail_log=$(mktemp)
 
-	intel_remote=$(url_to_remote $drm_intel_ssh)
+	intel_remote=$(repo_to_remote drm-intel)
 
 	# Look for commits in dinq tagged as fixes.
 	for commit in $(git_list_fixes $intel_remote/$branch..$intel_remote/drm-intel-next-queued -- drivers/gpu/drm/i915); do
@@ -1586,7 +1586,7 @@ function dim_update_next
 	$DRY git add drivers/gpu/drm/i915/i915_drv.h
 	git commit $DRY_RUN -sm "drm/i915: Update DRIVER_DATE to $driver_date"
 
-	gitk drm-intel-next-queued ^$(url_to_remote $drm_upstream_git)/drm-next &
+	gitk drm-intel-next-queued ^$(repo_to_remote drm-upstream)/drm-next &
 
 	# try to push dinq first in case someone raced
 	FORCE=1 dim_push_queued
@@ -1600,7 +1600,7 @@ function dim_update_next_continue
 
 	assert_branch drm-intel-next-queued
 
-	intel_remote=$(url_to_remote $drm_intel_ssh)
+	intel_remote=$(repo_to_remote drm-intel)
 	remote=$(url_to_remote $drm_tip_ssh)
 
 	git push $DRY_RUN -f $intel_remote drm-intel-next-queued:drm-intel-next
@@ -1641,7 +1641,7 @@ function dim_tag_next
 
 	cd $DIM_PREFIX/$DIM_REPO
 
-	intel_remote=$(url_to_remote $drm_intel_ssh)
+	intel_remote=$(repo_to_remote drm-intel)
 	git fetch $intel_remote
 
 	if [ $(git rev-parse drm-intel-next) == $(git rev-parse "drm-intel-next@{u}") ] ; then
@@ -1730,7 +1730,7 @@ function dim_pull_request
 
 function dim_pull_request_next
 {
-	upstream=${1:-$(url_to_remote $drm_upstream_git)/drm-next}
+	upstream=${1:-$(repo_to_remote drm-upstream)/drm-next}
 	dim_pull_request drm-intel-next $upstream
 }
 
@@ -1742,7 +1742,7 @@ function dim_pull_request_fixes
 
 function dim_pull_request_next_fixes
 {
-	upstream=${1:-$(url_to_remote $drm_upstream_git)/drm-next}
+	upstream=${1:-$(repo_to_remote drm-upstream)/drm-next}
 	dim_pull_request drm-intel-next-fixes $upstream
 }
 
@@ -1751,7 +1751,7 @@ function dim_list_upstreams
 {
 	local dim_drm_upstream_remote
 
-	dim_drm_upstream_remote=$(url_to_remote $drm_upstream_git)
+	dim_drm_upstream_remote=$(repo_to_remote drm-upstream)
 
 	echo origin/master
 	echo $dim_drm_upstream_remote/drm-next
@@ -1799,7 +1799,7 @@ function dim_update_branches
 		fi
 	done
 	if git_branch_exists drm-intel-next ; then
-		intel_remote=$(url_to_remote $drm_intel_ssh)
+		intel_remote=$(repo_to_remote drm-intel)
 
 		dim_checkout drm-intel-next
 		$DRY git reset --hard $intel_remote/drm-intel-next
@@ -1820,7 +1820,7 @@ function dim_status
 
 	cd $DIM_PREFIX/$DIM_REPO
 
-	drm_remote=$(url_to_remote $drm_upstream_git)
+	drm_remote=$(repo_to_remote drm-upstream)
 
 	for branch in $dim_branches ; do
 		repo=$(branch_to_repo $branch)
-- 
2.11.0

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

  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 ` [dim PATCH 5/6] dim: figure drm-intel remote out automatically Jani Nikula
2017-10-03 13:38 ` Jani Nikula [this message]
2017-10-05 17:08   ` [dim PATCH 6/6] dim: reduce dependency on hard-coded repo URLs 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-7-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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox