All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 01/10] dim: Extract TODO
@ 2016-10-18 12:13 Daniel Vetter
  2016-10-18 12:13 ` [PATCH 02/10] dim: Autocheck for up-to-dateness Daniel Vetter
                   ` (9 more replies)
  0 siblings, 10 replies; 26+ messages in thread
From: Daniel Vetter @ 2016-10-18 12:13 UTC (permalink / raw)
  To: Intel Graphics Development; +Cc: Daniel Vetter, DRI Development, Daniel Vetter

Just maybe a bit more visibility, the scripts are growing.

Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
---
 TODO | 27 +++++++++++++++++++++++++++
 dim  | 17 -----------------
 qf   | 11 -----------
 3 files changed, 27 insertions(+), 28 deletions(-)
 create mode 100644 TODO

diff --git a/TODO b/TODO
new file mode 100644
index 000000000000..ac0f27763dfa
--- /dev/null
+++ b/TODO
@@ -0,0 +1,27 @@
+dim:
+- extract the integration tree logic and make it generally useful, maybe for a
+  drm-integration tree ...
+- Improve nightly-forget to forget a specific merge instead of just the first
+  dinq/dif merge.
+- add option to check-patch to check stdin
+- integrate ninja-check? Or too much checkers considered harmful?
+  https://lists.linuxfoundation.org/pipermail/ksummit-discuss/2014-May/000554.html
+- add patchwork Link: also after manually resolving conflicts in drm
+  apply-resolved
+- pull in dim extract-tags tool from Ville
+- allow dim rebuild-nightly to pull branches from local trees in dry-run mode.
+  This is useful to confirm a backmerge is indeed correct, by comparing the
+  resulting -nightly with the old one. Current the branch must be pushed out
+  first for rebuild-nightly to pick it up, which means the merge can't be
+  fixed any more.
+
+qf:
+- get better at preventing and cleaning up a mess when switching branches
+  while there's still applied quilt patches around ...
+- combine quilt annotate and git blame into one tool
+- use the index a bit more to e.g. stage all applied quilt patches, then use
+  the output of git diff to refresh a quilt patch
+- use git commit-tree and git write-tree in the setup code instead of the
+  current high-level hacks
+- track/restore the topmost patch maybe?
+- synchronize quilt notes in qf push and qf fetch
diff --git a/dim b/dim
index 5fb3a0fee7ff..57ad4fcf9767 100755
--- a/dim
+++ b/dim
@@ -27,23 +27,6 @@
 
 # drm-intel-next maintainer script
 
-# TODO
-# - extract the integration tree logic and make it generally useful, maybe for a
-#   drm-integration tree ...
-# - Improve nightly-forget to forget a specific merge instead of just the first
-#   dinq/dif merge.
-# - add option to check-patch to check stdin
-# - integrate ninja-check? Or too much checkers considered harmful?
-#   https://lists.linuxfoundation.org/pipermail/ksummit-discuss/2014-May/000554.html
-# - add patchwork Link: also after manually resolving conflicts in drm
-#   apply-resolved
-# - pull in dim extract-tags tool from Ville
-# - allow dim rebuild-nightly to pull branches from local trees in dry-run mode.
-#   This is useful to confirm a backmerge is indeed correct, by comparing the
-#   resulting -nightly with the old one. Current the branch must be pushed out
-#   first for rebuild-nightly to pick it up, which means the merge can't be
-#   fixed any more.
-
 # fail on any goof-up
 set -e
 
diff --git a/qf b/qf
index 4e9cb03f31fe..31b9f3bae0a2 100755
--- a/qf
+++ b/qf
@@ -26,17 +26,6 @@
 
 # quilt git flow script
 
-# TODO
-# - get better at preventing and cleaning up a mess when switching branches
-# while there's still applied quilt patches around ...
-# - combine quilt annotate and git blame into one tool
-# - use the index a bit more to e.g. stage all applied quilt patches, then use
-# the output of git diff to refresh a quilt patch
-# - use git commit-tree and git write-tree in the setup code instead of the
-# current high-level hacks
-# - track/restore the topmost patch maybe?
-# - synchronize quilt notes in qf push and qf fetch
-
 # config
 QUILT_PREFIX=quilt/
 
-- 
2.9.3

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply related	[flat|nested] 26+ messages in thread

* [PATCH 02/10] dim: Autocheck for up-to-dateness
  2016-10-18 12:13 [PATCH 01/10] dim: Extract TODO Daniel Vetter
@ 2016-10-18 12:13 ` Daniel Vetter
  2016-10-18 13:15   ` Jani Nikula
  2016-10-18 12:13 ` [PATCH 03/10] dim: echoerr helper for printing to stderr Daniel Vetter
                   ` (8 subsequent siblings)
  9 siblings, 1 reply; 26+ messages in thread
From: Daniel Vetter @ 2016-10-18 12:13 UTC (permalink / raw)
  To: Intel Graphics Development; +Cc: Daniel Vetter, DRI Development, Daniel Vetter

Exits script to annoy people roughly every 100th time ...

Also switch to the magic @{upstream} reference, in case the remote is
not called origin (which is pretty normal in case of using git
worktree).

Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
---
 dim | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/dim b/dim
index 57ad4fcf9767..192d6ee10838 100755
--- a/dim
+++ b/dim
@@ -176,13 +176,17 @@ function dim_uptodate
 		exit 1
 	fi
 
-	if ! git --git-dir=$DIM_PREFIX/maintainer-tools/.git show origin/maintainer-tools:dim |\
+	if ! git --git-dir=$DIM_PREFIX/maintainer-tools/.git show @{upstream}:dim |\
 			diff "$using" - >& /dev/null; then
 		echo "$dim: not running upstream version of the script." >&2
 		exit 1
 	fi
 }
 
+if [[ "$((`date +%s` % 100))" -eq "0" ]] ; then
+        dim_uptodate
+fi
+
 # get message id from file
 # $1 = file
 message_get_id ()
-- 
2.9.3

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply related	[flat|nested] 26+ messages in thread

* [PATCH 03/10] dim: echoerr helper for printing to stderr
  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 12:13 ` 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
                   ` (7 subsequent siblings)
  9 siblings, 1 reply; 26+ messages in thread
From: Daniel Vetter @ 2016-10-18 12:13 UTC (permalink / raw)
  To: Intel Graphics Development; +Cc: Daniel Vetter, DRI Development

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
---
 dim | 19 ++++++++++++-------
 1 file changed, 12 insertions(+), 7 deletions(-)

diff --git a/dim b/dim
index 192d6ee10838..2601bb7dbbad 100755
--- a/dim
+++ b/dim
@@ -102,12 +102,17 @@ DRY=
 FORCE=
 HELP=
 
+function echoerr
+{
+	echo "$@" >&2
+}
+
 function warn_or_fail
 {
 	if [[ $FORCE ]] ; then
-		echo WARNING: $1, but continuing
+		echoerr WARNING: $1, but continuing
 	else
-		echo ERROR: $1, aborting
+		echoerr ERROR: $1, aborting
 		exit 1
 	fi
 }
@@ -128,7 +133,7 @@ while getopts hdfi opt; do
 			HELP=1
 			;;
 		*)
-			echo "See '$dim help' for more information." >&2
+			echoerr "See '$dim help' for more information."
 			exit
 	esac
 done
@@ -167,18 +172,18 @@ function dim_uptodate
 	local using="${BASH_SOURCE[0]}"
 
 	if [[ ! -e "$using" ]]; then
-		echo "$dim: could not figure out the version being used ($using)." >&2
+		echoerr "$dim: could not figure out the version being used ($using)."
 		exit 1
 	fi
 
 	if [[ ! -e "$DIM_PREFIX/maintainer-tools/.git" ]]; then
-		echo "$dim: could not find the upstream repo for $dim." >&2
+		echoerr "$dim: could not find the upstream repo for $dim."
 		exit 1
 	fi
 
 	if ! git --git-dir=$DIM_PREFIX/maintainer-tools/.git show @{upstream}:dim |\
 			diff "$using" - >& /dev/null; then
-		echo "$dim: not running upstream version of the script." >&2
+		echoerr "$dim: not running upstream version of the script."
 		exit 1
 	fi
 }
@@ -1280,6 +1285,6 @@ subcmd_func=dim_${subcmd//-/_}
 if declare -f $subcmd_func >/dev/null; then
 	$subcmd_func "$@"
 else
-	echo "$dim: '$subcommand' is not a dim command." >&2
+	echoerr "$dim: '$subcommand' is not a dim command."
 	dim_usage
 fi
-- 
2.9.3

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply related	[flat|nested] 26+ messages in thread

* [PATCH 04/10] dim: autodetect remotes, first part for dim_setup
  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 12:13 ` [PATCH 03/10] dim: echoerr helper for printing to stderr Daniel Vetter
@ 2016-10-18 12:13 ` Daniel Vetter
  2016-10-18 13:27   ` [Intel-gfx] " 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
                   ` (6 subsequent siblings)
  9 siblings, 2 replies; 26+ messages in thread
From: Daniel Vetter @ 2016-10-18 12:13 UTC (permalink / raw)
  To: Intel Graphics Development; +Cc: Daniel Vetter, DRI Development, Daniel Vetter

The goals here are multiple:
- simpler configuration through autodetection
- allows seamless upgrading to git worktree for the aux checkouts
- eventually I want to split up drm-misc into a separate remote ...

And yes this is just a start.

v2: Print errors to stderr, otherwise they can't be seen when directly
assigning the result of get_remote_name to a variable.

Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
---
 dim | 112 +++++++++++++++++++++++++++++++++++---------------------------------
 1 file changed, 58 insertions(+), 54 deletions(-)

diff --git a/dim b/dim
index 2601bb7dbbad..90eb553c6575 100755
--- a/dim
+++ b/dim
@@ -192,6 +192,24 @@ if [[ "$((`date +%s` % 100))" -eq "0" ]] ; then
         dim_uptodate
 fi
 
+function get_remote_name
+{
+	local remote_url=$1
+
+	local remote=`git remote -v | grep $remote_url | \
+		head -n1 | sed -e 's/^\(.*\)\t.*/\1/'`
+
+	if [[ $remote == "" ]] ; then
+		echoerr No git remote for $remote_url found in `pwd`.
+		echoerr Please set it up using
+		echoerr     $ git remote add '<name>' $remote_url
+		echoerr with a name of your choice.
+		exit 1
+	fi
+
+	echo $remote
+}
+
 # get message id from file
 # $1 = file
 message_get_id ()
@@ -1044,8 +1062,36 @@ function dim_update_branches
 	update_rerere_cache
 }
 
+function setup_aux_checkout # name remote
+{
+	local name=$1
+	local remote_url=$2
+	local dir=$3
+	local remote
+
+	echo "Setting up $dir ..."
+
+	if [ ! -d $dir ]; then
+		git clone --reference=$DIM_PREFIX/$DIM_DRM_INTEL/.git $remote_url $dir
+		cd $dir
+		git config remote.origin.url $remote_url
+		echo "$DIM_PREFIX/$DIM_DRM_INTEL/.git/objects" > .git/objects/info/alternates
+		git repack -a -d -l
+		remote=origin
+	else
+		cd $dir
+		remote=`get_remote_name $drm_intel_ssh`
+	fi
+	if ! git branch | grep $name > /dev/null ; then
+		git checkout -t $remote/$name
+	fi
+	cd ..
+}
+
 function dim_setup
 {
+	local remote
+
 	if [ ! -d $DIM_PREFIX ]; then
 		echo "please set up your repository directory with:"
 		echo "    mkdir -p $DIM_PREFIX"
@@ -1062,76 +1108,34 @@ function dim_setup
 		exit 1
 	fi
 	cd $DIM_DRM_INTEL
-	if ! git remote -v | grep "^origin[[:space:]]" | grep $linux_upstream_git > /dev/null; then
-		echo "please set up remote origin for $linux_upstream_git"
-		exit 1
-	fi
-	if ! git remote -v | grep "^$DIM_DRM_INTEL_REMOTE[[:space:]]" | grep $drm_intel_ssh > /dev/null; then
-		echo "please set up remote $DIM_DRM_INTEL_REMOTE for $drm_intel_ssh with:"
-		echo "    git remote add $DIM_DRM_INTEL_REMOTE $drm_intel_ssh"
-		echo "or update your configuration."
-		exit 1
-	fi
-	if ! git remote -v | grep "^$DIM_DRM_UPSTREAM_REMOTE[[:space:]]" | grep $drm_upstream_git > /dev/null; then
-		echo "please set up remote $DIM_DRM_UPSTREAM_REMOTE for $drm_upstream_git with:"
-		echo "    git remote add $DIM_DRM_UPSTREAM_REMOTE $drm_upstream_git"
-		echo "or update your configuration."
-		exit 1
-	fi
-	cd ..
 
-	echo "Setting up maintainer-tools ..."
-	if [ ! -d maintainer-tools ]; then
-		git clone --reference=$DIM_PREFIX/$DIM_DRM_INTEL/.git $drm_intel_ssh maintainer-tools
-	fi
-	cd maintainer-tools
-	git config remote.origin.url $drm_intel_ssh
-	echo "$DIM_PREFIX/$DIM_DRM_INTEL/.git/objects" > .git/objects/info/alternates
-	git repack -a -d -l
-	if ! git branch | grep maintainer-tools > /dev/null ; then
-		git checkout -t origin/maintainer-tools
-	fi
-	cd ..
+	# check remote configuration
+	remote=`get_remote_name $linux_upstream_git`
+	remote=`get_remote_name $drm_intel_ssh`
+	remote=`get_remote_name $drm_upstream_git`
 
-	echo "Setting up drm-intel-rerere ..."
-	if [ ! -d drm-intel-rerere ]; then
-		git clone --reference=$DIM_PREFIX/$DIM_DRM_INTEL/.git $drm_intel_ssh drm-intel-rerere
-	fi
-	cd drm-intel-rerere
-	git config remote.origin.url $drm_intel_ssh
-	echo "$DIM_PREFIX/$DIM_DRM_INTEL/.git/objects" > .git/objects/info/alternates
-	git repack -a -d -l
-	if ! git branch | grep rerere-cache > /dev/null ; then
-		git checkout -t origin/rerere-cache
-	fi
 	cd ..
 
-	echo "Setting up drm-intel-nightly ..."
-	if [ ! -d drm-intel-nightly ]; then
-		git clone --reference=$DIM_PREFIX/$DIM_DRM_INTEL/.git $drm_intel_ssh drm-intel-nightly
-	fi
+	setup_aux_checkout maintainer-tools $drm_intel_ssh maintainer-tools
+
+	setup_aux_checkout rerere-cache $drm_intel_ssh drm-intel-rerere
+
+	setup_aux_checkout drm-intel-nightly $drm_intel_ssh drm-intel-nightly
 	cd drm-intel-nightly
-	mkdir -p .git/rr-cache
-	git config remote.origin.url $drm_intel_ssh
-	echo "$DIM_PREFIX/$DIM_DRM_INTEL/.git/objects" > .git/objects/info/alternates
-	git repack -a -d -l
-	if ! git branch | grep drm-intel-nightly > /dev/null ; then
-		git checkout -t origin/drm-intel-nightly
-	fi
 	if git remote | grep drm-upstream > /dev/null ; then
 		git config remote.drm-upstream.url $drm_upstream_git
 	else
-		git remote add drm-upstream $drm_upstream_git
+		remote=`get_remote_name $drm_upstream_git`
 	fi
 	if git remote | grep sound-upstream > /dev/null ; then
 		git config remote.sound-upstream.url $sound_upstream_git
 	else
-		git remote add sound-upstream $sound_upstream_git
+		remote=`get_remote_name $sound_upstream_git`
 	fi
 	if git remote | grep driver-core-upstream > /dev/null ; then
 		git config remote.driver-core-upstream.url $driver_core_upstream_git
 	else
-		git remote add driver-core-upstream $driver_core_upstream_git
+		remote=`get_remote_name $driver_core_upstream_git`
 	fi
 
 	echo "dim setup successfully completed!"
-- 
2.9.3

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply related	[flat|nested] 26+ messages in thread

* [PATCH 05/10] dim: support git worktree for aux checkouts
  2016-10-18 12:13 [PATCH 01/10] dim: Extract TODO Daniel Vetter
                   ` (2 preceding siblings ...)
  2016-10-18 12:13 ` [PATCH 04/10] dim: autodetect remotes, first part for dim_setup Daniel Vetter
@ 2016-10-18 12:13 ` Daniel Vetter
  2016-10-18 13:38   ` [Intel-gfx] " Jani Nikula
  2016-10-18 12:13 ` [PATCH 06/10] dim: Nuke nightly-forget Daniel Vetter
                   ` (5 subsequent siblings)
  9 siblings, 1 reply; 26+ messages in thread
From: Daniel Vetter @ 2016-10-18 12:13 UTC (permalink / raw)
  To: Intel Graphics Development; +Cc: Daniel Vetter, DRI Development, Daniel Vetter

If available by default. This saves quite a pile of disk-space that
imo making it the default is justified.

Note that this will break the rebuild-nightly script for now,
follow-up patches will fix that.

Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
---
 dim | 23 ++++++++++++++++-------
 1 file changed, 16 insertions(+), 7 deletions(-)

diff --git a/dim b/dim
index 90eb553c6575..80baf24e4ad7 100755
--- a/dim
+++ b/dim
@@ -1072,15 +1072,24 @@ function setup_aux_checkout # name remote
 	echo "Setting up $dir ..."
 
 	if [ ! -d $dir ]; then
-		git clone --reference=$DIM_PREFIX/$DIM_DRM_INTEL/.git $remote_url $dir
-		cd $dir
-		git config remote.origin.url $remote_url
-		echo "$DIM_PREFIX/$DIM_DRM_INTEL/.git/objects" > .git/objects/info/alternates
-		git repack -a -d -l
-		remote=origin
+		if git help worktree &> /dev/null ; then
+			cd $DIM_PREFIX/$DIM_DRM_INTEL
+			remote=`get_remote_name $remote_url`
+			if ! git branch | grep $name > /dev/null ; then
+				git branch --track $name $remote/$name
+			fi
+			git worktree add ../$dir $name
+		else
+			git clone --reference=$DIM_PREFIX/$DIM_DRM_INTEL/.git $remote_url $dir
+			cd $dir
+			git config remote.origin.url $remote_url
+			echo "$DIM_PREFIX/$DIM_DRM_INTEL/.git/objects" > .git/objects/info/alternates
+			git repack -a -d -l
+			remote=origin
+		fi
 	else
 		cd $dir
-		remote=`get_remote_name $drm_intel_ssh`
+		remote=`get_remote_name $remote_url`
 	fi
 	if ! git branch | grep $name > /dev/null ; then
 		git checkout -t $remote/$name
-- 
2.9.3

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

^ permalink raw reply related	[flat|nested] 26+ messages in thread

* [PATCH 06/10] dim: Nuke nightly-forget
  2016-10-18 12:13 [PATCH 01/10] dim: Extract TODO Daniel Vetter
                   ` (3 preceding siblings ...)
  2016-10-18 12:13 ` [PATCH 05/10] dim: support git worktree for aux checkouts Daniel Vetter
@ 2016-10-18 12:13 ` Daniel Vetter
  2016-10-18 13:39   ` Jani Nikula
  2016-10-18 12:13 ` [PATCH 07/10] dim: autodetect branches in rebuild-nightly Daniel Vetter
                   ` (4 subsequent siblings)
  9 siblings, 1 reply; 26+ messages in thread
From: Daniel Vetter @ 2016-10-18 12:13 UTC (permalink / raw)
  To: Intel Graphics Development; +Cc: Daniel Vetter, DRI Development, Daniel Vetter

With our proliferation of branches it's become long useless. Nowadays
my MO is to revert the offending commit in the rerere-cache branch
explicitly, remove drm-intel-nightly/.git/rr-cache and then re-run
rebuild-nightly. That works much better, hence nuke this helper.

Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
---
 TODO | 2 --
 dim  | 9 ---------
 2 files changed, 11 deletions(-)

diff --git a/TODO b/TODO
index ac0f27763dfa..c1c6e20eb0e3 100644
--- a/TODO
+++ b/TODO
@@ -1,8 +1,6 @@
 dim:
 - extract the integration tree logic and make it generally useful, maybe for a
   drm-integration tree ...
-- Improve nightly-forget to forget a specific merge instead of just the first
-  dinq/dif merge.
 - add option to check-patch to check stdin
 - integrate ninja-check? Or too much checkers considered harmful?
   https://lists.linuxfoundation.org/pipermail/ksummit-discuss/2014-May/000554.html
diff --git a/dim b/dim
index 80baf24e4ad7..48d5e7b6477a 100755
--- a/dim
+++ b/dim
@@ -395,15 +395,6 @@ function dim_rebuild_nightly
 	update_linux_next
 }
 
-function dim_nightly_forget
-{
-	cd $DIM_PREFIX/drm-intel-nightly
-	git fetch origin >& /dev/null
-	git reset --hard origin/drm-intel-next-queued >& /dev/null
-	git merge origin/drm-intel-fixes
-	git rerere forget
-}
-
 # push branch $1, rebuild nightly. the rest of the arguments are passed to git
 # push.
 function dim_push_branch
-- 
2.9.3

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply related	[flat|nested] 26+ messages in thread

* [PATCH 07/10] dim: autodetect branches in rebuild-nightly
  2016-10-18 12:13 [PATCH 01/10] dim: Extract TODO Daniel Vetter
                   ` (4 preceding siblings ...)
  2016-10-18 12:13 ` [PATCH 06/10] dim: Nuke nightly-forget Daniel Vetter
@ 2016-10-18 12:13 ` Daniel Vetter
  2016-10-18 13:52   ` Jani Nikula
  2016-10-18 12:13 ` [PATCH 08/10] dim: remove integration-tree remotes Daniel Vetter
                   ` (3 subsequent siblings)
  9 siblings, 1 reply; 26+ messages in thread
From: Daniel Vetter @ 2016-10-18 12:13 UTC (permalink / raw)
  To: Intel Graphics Development; +Cc: Daniel Vetter, DRI Development, Daniel Vetter

Needs new url-mapping information in nightly.conf to work properly.

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
-- 
2.9.3

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

^ permalink raw reply related	[flat|nested] 26+ messages in thread

* [PATCH 08/10] dim: remove integration-tree remotes
  2016-10-18 12:13 [PATCH 01/10] dim: Extract TODO Daniel Vetter
                   ` (5 preceding siblings ...)
  2016-10-18 12:13 ` [PATCH 07/10] dim: autodetect branches in rebuild-nightly Daniel Vetter
@ 2016-10-18 12:13 ` Daniel Vetter
  2016-10-18 12:13 ` [PATCH 09/10] dim: Split out drm-nightly.git Daniel Vetter
                   ` (2 subsequent siblings)
  9 siblings, 0 replies; 26+ messages in thread
From: Daniel Vetter @ 2016-10-18 12:13 UTC (permalink / raw)
  To: Intel Graphics Development; +Cc: Daniel Vetter, DRI Development, Daniel Vetter

With the remotes stored in nightly.conf and git worktrees we can avoid
hard-coding them in even more places.

Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
---
 dim | 12 ------------
 1 file changed, 12 deletions(-)

diff --git a/dim b/dim
index f9b28d5fd241..20a3143a5c1e 100755
--- a/dim
+++ b/dim
@@ -80,8 +80,6 @@ today=`date +%Y-%m-%d`
 drm_intel_ssh=ssh://git.freedesktop.org/git/drm-intel
 drm_intel_git=git://anongit.freedesktop.org/drm-intel
 drm_upstream_git=git://people.freedesktop.org/~airlied/linux
-sound_upstream_git=git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound.git
-driver_core_upstream_git=git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core.git
 linux_upstream_git=git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
 
 # email aliases
@@ -1151,16 +1149,6 @@ function dim_setup
 	else
 		remote=`get_remote_name $drm_upstream_git`
 	fi
-	if git remote | grep sound-upstream > /dev/null ; then
-		git config remote.sound-upstream.url $sound_upstream_git
-	else
-		remote=`get_remote_name $sound_upstream_git`
-	fi
-	if git remote | grep driver-core-upstream > /dev/null ; then
-		git config remote.driver-core-upstream.url $driver_core_upstream_git
-	else
-		remote=`get_remote_name $driver_core_upstream_git`
-	fi
 
 	echo "dim setup successfully completed!"
 }
-- 
2.9.3

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply related	[flat|nested] 26+ messages in thread

* [PATCH 09/10] dim: Split out drm-nightly.git
  2016-10-18 12:13 [PATCH 01/10] dim: Extract TODO Daniel Vetter
                   ` (6 preceding siblings ...)
  2016-10-18 12:13 ` [PATCH 08/10] dim: remove integration-tree remotes Daniel Vetter
@ 2016-10-18 12:13 ` 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
  9 siblings, 0 replies; 26+ messages in thread
From: Daniel Vetter @ 2016-10-18 12:13 UTC (permalink / raw)
  To: Intel Graphics Development; +Cc: Daniel Vetter, DRI Development, Daniel Vetter

This is a prep step to eventually split out the drm-misc branches all
into their own repo. To get there we first need to split out the
integration tree mangling.

Since dim doesn't auto-update and since the transition is a good
reason to switch over to worktrees and it's tricky it's not scripted.
The following needs to be done when dim rebuild-nightly fails:

- Make sure you have the latest dim version.

- Good to also check you have a recent-ish git. Latest dim supports
  git worktree to save on disk space needed for .git metadata. It's
  much more robust than the git alternates storage trick we've used
  thus far. Note that git worktree is still optional (but that's not a
  recommended setup).

- Delete $DIM_PREFIX/{drm-intel-rerere,drm-intel-nightly,maintainer-tools}
  It's not strictly needed to kill the maintainer-tools checkout too,
  but might as well switch it over to git worktree too.

- Make sure you don't have any branches left over for drm-intel-rerere
  and drm-intel-nightly anywhere (since they need to switch their
  remotes).

- run dim setup and enjoy the new awesomeness.

If it breaks, I'm guilty ;-)

Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
---
 dim | 22 +++++++++++++++-------
 1 file changed, 15 insertions(+), 7 deletions(-)

diff --git a/dim b/dim
index 20a3143a5c1e..de01f0addeaf 100755
--- a/dim
+++ b/dim
@@ -78,6 +78,7 @@ dim=$(basename $0)
 today=`date +%Y-%m-%d`
 
 drm_intel_ssh=ssh://git.freedesktop.org/git/drm-intel
+drm_nightly_ssh=ssh://git.freedesktop.org/git/drm-nightly
 drm_intel_git=git://anongit.freedesktop.org/drm-intel
 drm_upstream_git=git://people.freedesktop.org/~airlied/linux
 linux_upstream_git=git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
@@ -511,6 +512,8 @@ function dim_apply_next_fixes
 
 function dim_cherry_pick
 {
+	local nightly_remote=`get_remote_name $drm_nightly_ssh`
+
 	if [[ "x$1" = "x" ]]; then
 		echo "usage: $dim $subcommand commit-ish"
 		exit 1
@@ -519,9 +522,9 @@ function dim_cherry_pick
 	sha_short=${sha:0:8}
 
 	# need latest -nightly
-	git fetch $DIM_DRM_INTEL_REMOTE
+	git fetch $nightly_remote
 	echo Possible fixup patches for your cherry-pick:
-	git log --grep=$sha_short --pretty=oneline $sha..$DIM_DRM_INTEL_REMOTE/drm-intel-nightly
+	git log --grep=$sha_short --pretty=oneline $sha..$nightly_remote/drm-intel-nightly
 	$DRY git cherry-pick -s -x -e $1
 }
 
@@ -890,15 +893,17 @@ function dim_for_each_workdirs
 
 function dim_update_next
 {
+	local nightly_remote=`get_remote_name $drm_nightly_ssh`
+
 	assert_branch drm-intel-next-queued
 
 	git pull --ff-only
 
-	if ! git branch --merged $DIM_DRM_INTEL_REMOTE/drm-intel-nightly | grep drm-intel-fixes &> /dev/null ; then
+	if ! git branch --merged $nightly_remote/drm-intel-nightly | grep drm-intel-fixes &> /dev/null ; then
 		echo "drm-intel-fixes not merged into -nigthly, please update!"
 		exit 2
 	fi
-	if ! git branch --merged $DIM_DRM_INTEL_REMOTE/drm-intel-nightly | grep drm-intel-next-queued &> /dev/null ; then
+	if ! git branch --merged $nightly_remote/drm-intel-nightly | grep drm-intel-next-queued &> /dev/null ; then
 		echo "drm-intel-next-queued not merged into -nigthly, please update!"
 		exit 2
 	fi
@@ -920,6 +925,8 @@ function dim_update_next
 
 function dim_update_next_continue
 {
+	local nightly_remote=`get_remote_name $drm_nightly_ssh`
+
 	assert_branch drm-intel-next-queued
 
 	git push $DRY_RUN -f $DIM_DRM_INTEL_REMOTE drm-intel-next-queued:drm-intel-next
@@ -928,7 +935,7 @@ function dim_update_next_continue
 	git push $DRY_RUN -f $DIM_DRM_INTEL_REMOTE $tag
 
 	echo "Updating -testing to latest -nightly"
-	git push $DRY_RUN $DIM_DRM_INTEL_REMOTE +$DIM_DRM_INTEL_REMOTE/drm-intel-nightly:drm-intel-testing
+	git push $DRY_RUN $DIM_DRM_INTEL_REMOTE +$nightly_remote/drm-intel-nightly:drm-intel-testing
 	$DRY git tag -f drm-intel-testing-$today $DIM_DRM_INTEL_REMOTE/drm-intel-testing
 	$DRY git push -f $DIM_DRM_INTEL_REMOTE drm-intel-testing-$today
 
@@ -1134,15 +1141,16 @@ function dim_setup
 	# check remote configuration
 	remote=`get_remote_name $linux_upstream_git`
 	remote=`get_remote_name $drm_intel_ssh`
+	remote=`get_remote_name $drm_nightly_ssh`
 	remote=`get_remote_name $drm_upstream_git`
 
 	cd ..
 
 	setup_aux_checkout maintainer-tools $drm_intel_ssh maintainer-tools
 
-	setup_aux_checkout rerere-cache $drm_intel_ssh drm-intel-rerere
+	setup_aux_checkout rerere-cache $drm_nightly_ssh drm-intel-rerere
 
-	setup_aux_checkout drm-intel-nightly $drm_intel_ssh drm-intel-nightly
+	setup_aux_checkout drm-intel-nightly $drm_nightly_ssh drm-intel-nightly
 	cd drm-intel-nightly
 	if git remote | grep drm-upstream > /dev/null ; then
 		git config remote.drm-upstream.url $drm_upstream_git
-- 
2.9.3

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

^ permalink raw reply related	[flat|nested] 26+ messages in thread

* [PATCH 10/10] dim: s/drm-nightly/drm-tip
  2016-10-18 12:13 [PATCH 01/10] dim: Extract TODO Daniel Vetter
                   ` (7 preceding siblings ...)
  2016-10-18 12:13 ` [PATCH 09/10] dim: Split out drm-nightly.git Daniel Vetter
@ 2016-10-18 12:13 ` Daniel Vetter
  2016-10-18 13:13 ` [Intel-gfx] [PATCH 01/10] dim: Extract TODO Jani Nikula
  9 siblings, 0 replies; 26+ messages in thread
From: Daniel Vetter @ 2016-10-18 12:13 UTC (permalink / raw)
  To: Intel Graphics Development; +Cc: Daniel Vetter, DRI Development, Daniel Vetter

tip = testing and integration pile

Also rename drm-intel-rerere directory to drm-rerere.

Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
---
 dim                | 48 ++++++++++++++++++++++++------------------------
 dim.rst            | 16 +++++++---------
 dimrc.sample       |  2 +-
 drm-intel-flow.dot | 18 +++++++++---------
 drm-intel.rst      | 20 +++++++++++---------
 5 files changed, 52 insertions(+), 52 deletions(-)

diff --git a/dim b/dim
index de01f0addeaf..fd3800e8c078 100755
--- a/dim
+++ b/dim
@@ -78,7 +78,7 @@ dim=$(basename $0)
 today=`date +%Y-%m-%d`
 
 drm_intel_ssh=ssh://git.freedesktop.org/git/drm-intel
-drm_nightly_ssh=ssh://git.freedesktop.org/git/drm-nightly
+drm_tip_ssh=ssh://git.freedesktop.org/git/drm-tip
 drm_intel_git=git://anongit.freedesktop.org/drm-intel
 drm_upstream_git=git://people.freedesktop.org/~airlied/linux
 linux_upstream_git=git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
@@ -151,7 +151,7 @@ fi
 #
 
 if [ "$subcommand" != "setup" -a "$subcommand" != "help" -a "$subcommand" != "usage" ]; then
-	for d in $DIM_PREFIX $DIM_PREFIX/$DIM_DRM_INTEL $DIM_PREFIX/drm-intel-rerere $DIM_PREFIX/drm-intel-nightly; do
+	for d in $DIM_PREFIX $DIM_PREFIX/$DIM_DRM_INTEL $DIM_PREFIX/drm-rerere $DIM_PREFIX/drm-tip; do
 		if [ ! -d $d ]; then
 			echo "$d is missing, please check your configuration and/or run dim setup"
 			exit 1
@@ -162,7 +162,7 @@ if [ "$subcommand" != "setup" -a "$subcommand" != "help" -a "$subcommand" != "us
 	# Internal configuration that depends on a sane setup.
 	#
 
-	dim_branches=`(source $DIM_PREFIX/drm-intel-rerere/nightly.conf ; echo $nightly_branches) | \
+	dim_branches=`(source $DIM_PREFIX/drm-rerere/nightly.conf ; echo $nightly_branches) | \
 		xargs -n 1 echo | grep '^origin' | sed -e 's/^origin\///'`
 fi
 
@@ -244,7 +244,7 @@ function map_nightly_remote
 
 function update_linux_next
 {
-	cd $DIM_PREFIX/drm-intel-nightly
+	cd $DIM_PREFIX/drm-tip
 
 	local nightly_origin=`map_nightly_remote origin`
 
@@ -283,8 +283,8 @@ function check_conflicts
 
 function rr_cache_dir
 {
-	if [ -d $DIM_PREFIX/drm-intel-nightly/.git/rr-cache/ ] ; then
-		echo $DIM_PREFIX/drm-intel-nightly/.git/rr-cache/
+	if [ -d $DIM_PREFIX/drm-tip/.git/rr-cache/ ] ; then
+		echo $DIM_PREFIX/drm-tip/.git/rr-cache/
 	else
 		echo $DIM_PREFIX/$DIM_DRM_INTEL/.git/rr-cache/
 	fi
@@ -292,7 +292,7 @@ function rr_cache_dir
 
 function update_rerere_cache
 {
-	cd $DIM_PREFIX/drm-intel-rerere/
+	cd $DIM_PREFIX/drm-rerere/
 	git pull
 	cp rr-cache/* `rr_cache-dir` -r
 	cd -
@@ -300,12 +300,12 @@ function update_rerere_cache
 
 function dim_rebuild_nightly
 {
-	local integration_branch=drm-intel-nightly
+	local integration_branch=drm-tip
 	local specfile=`mktemp`
 	local time="`date --utc +%Yy-%mm-%dd-%Hh-%Mm-%Ss` UTC"
 	local first=1
 
-	local rerere=$DIM_PREFIX/drm-intel-rerere
+	local rerere=$DIM_PREFIX/drm-rerere
 
 	cd $rerere
 	if [[ `git status --porcelain | grep -v "^[ ?][ ?]" | wc -l` -gt 0 ]]; then
@@ -512,7 +512,7 @@ function dim_apply_next_fixes
 
 function dim_cherry_pick
 {
-	local nightly_remote=`get_remote_name $drm_nightly_ssh`
+	local nightly_remote=`get_remote_name $drm_tip_ssh`
 
 	if [[ "x$1" = "x" ]]; then
 		echo "usage: $dim $subcommand commit-ish"
@@ -524,7 +524,7 @@ function dim_cherry_pick
 	# need latest -nightly
 	git fetch $nightly_remote
 	echo Possible fixup patches for your cherry-pick:
-	git log --grep=$sha_short --pretty=oneline $sha..$nightly_remote/drm-intel-nightly
+	git log --grep=$sha_short --pretty=oneline $sha..$nightly_remote/drm-tip
 	$DRY git cherry-pick -s -x -e $1
 }
 
@@ -649,7 +649,7 @@ function dim_create_branch
 
 	$DRY git branch $branch $start
 	git push $DRY_RUN $DIM_DRM_INTEL_REMOTE +$branch --set-upstream
-	cd $DIM_PREFIX/drm-intel-rerere
+	cd $DIM_PREFIX/drm-rerere
 	$DRY echo "nightly_branches=\"\$nightly_branches origin/$branch\"" \
 	     >> nightly.conf
 	$DRY git add nightly.conf
@@ -674,10 +674,10 @@ function dim_remove_branch
 		rm -R $DIM_PREFIX/$branch
 	fi
 
-	cd $DIM_PREFIX/drm-intel-nightly
+	cd $DIM_PREFIX/drm-tip
 	git push $DRY_RUN origin --delete $branch
 	$DRY git fetch origin --prune
-	cd $DIM_PREFIX/drm-intel-rerere
+	cd $DIM_PREFIX/drm-rerere
 	full_branch="origin/$branch"
 	$DRY sed -e "/${full_branch//\//\\\/}/d" -i nightly.conf
 	$DRY git add nightly.conf
@@ -893,17 +893,17 @@ function dim_for_each_workdirs
 
 function dim_update_next
 {
-	local nightly_remote=`get_remote_name $drm_nightly_ssh`
+	local nightly_remote=`get_remote_name $drm_tip_ssh`
 
 	assert_branch drm-intel-next-queued
 
 	git pull --ff-only
 
-	if ! git branch --merged $nightly_remote/drm-intel-nightly | grep drm-intel-fixes &> /dev/null ; then
+	if ! git branch --merged $nightly_remote/drm-tip | grep drm-intel-fixes &> /dev/null ; then
 		echo "drm-intel-fixes not merged into -nigthly, please update!"
 		exit 2
 	fi
-	if ! git branch --merged $nightly_remote/drm-intel-nightly | grep drm-intel-next-queued &> /dev/null ; then
+	if ! git branch --merged $nightly_remote/drm-tip | grep drm-intel-next-queued &> /dev/null ; then
 		echo "drm-intel-next-queued not merged into -nigthly, please update!"
 		exit 2
 	fi
@@ -925,7 +925,7 @@ function dim_update_next
 
 function dim_update_next_continue
 {
-	local nightly_remote=`get_remote_name $drm_nightly_ssh`
+	local nightly_remote=`get_remote_name $drm_tip_ssh`
 
 	assert_branch drm-intel-next-queued
 
@@ -935,7 +935,7 @@ function dim_update_next_continue
 	git push $DRY_RUN -f $DIM_DRM_INTEL_REMOTE $tag
 
 	echo "Updating -testing to latest -nightly"
-	git push $DRY_RUN $DIM_DRM_INTEL_REMOTE +$nightly_remote/drm-intel-nightly:drm-intel-testing
+	git push $DRY_RUN $DIM_DRM_INTEL_REMOTE +$nightly_remote/drm-tip:drm-intel-testing
 	$DRY git tag -f drm-intel-testing-$today $DIM_DRM_INTEL_REMOTE/drm-intel-testing
 	$DRY git push -f $DIM_DRM_INTEL_REMOTE drm-intel-testing-$today
 
@@ -1141,17 +1141,17 @@ function dim_setup
 	# check remote configuration
 	remote=`get_remote_name $linux_upstream_git`
 	remote=`get_remote_name $drm_intel_ssh`
-	remote=`get_remote_name $drm_nightly_ssh`
+	remote=`get_remote_name $drm_tip_ssh`
 	remote=`get_remote_name $drm_upstream_git`
 
 	cd ..
 
 	setup_aux_checkout maintainer-tools $drm_intel_ssh maintainer-tools
 
-	setup_aux_checkout rerere-cache $drm_nightly_ssh drm-intel-rerere
+	setup_aux_checkout rerere-cache $drm_tip_ssh drm-rerere
 
-	setup_aux_checkout drm-intel-nightly $drm_nightly_ssh drm-intel-nightly
-	cd drm-intel-nightly
+	setup_aux_checkout drm-tip $drm_tip_ssh drm-tip
+	cd drm-tip
 	if git remote | grep drm-upstream > /dev/null ; then
 		git config remote.drm-upstream.url $drm_upstream_git
 	else
@@ -1199,7 +1199,7 @@ function dim_list_aliases
 
 function dim_cat_to_fixup
 {
-	cd $DIM_PREFIX/drm-intel-nightly
+	cd $DIM_PREFIX/drm-tip
 	cat > `cat .fixup_file_path`
 }
 
diff --git a/dim.rst b/dim.rst
index 85de95796611..dd4ba0fc5720 100644
--- a/dim.rst
+++ b/dim.rst
@@ -110,7 +110,7 @@ push-queued|pq [*git push arguments*]
 Updates the named branch, or drm-intel-fixes, drm-intel-next-fixes or the
 drm-intel-next-queued branch respectively. Complains if that's not the current
 branch, assuming that patches got merged to the wrong branch. After pushing also
-updates linux-next and drm-intel-nightly branches.
+updates linux-next and drm-tip branches.
 
 checkout|co *branch*
 --------------------
@@ -189,10 +189,8 @@ CodingStyle approved format.
 cherry-pick *commit-ish* [*git cherry-pick arguments*]
 ------------------------------------------------------
 
-Improved git cherry-pick version which also scans drm-intel-nightly for any
-mentions of the cherry-picked commit. Should be used when cherry-pick from -next
-to -fixes to make sure all fixups are picked, too. In dry-run mode/-d only the
-patch list is generated.
+Improved git cherry-pick version which also scans drm-tip picked, too. In
+dry-run mode/-d only the patch list is generated.
 
 cherry-pick-fixes
 -----------------
@@ -399,7 +397,7 @@ you have improvements for dim, please submit them to intel-gfx.
 
 You should now have a main repository for patch application. The directory
 corresponding to this repository is defined by DIM_DRM_INTEL in your .dimrc.
-You should also have directories called maintainer-tools, drm-intel-nightly (for
+You should also have directories called maintainer-tools, drm-tip (for
 rebuilding the tree), and drm-intel-rerere for some dim-internal book-keeping.
 
 Applying patches to dinq is done in the main repository with::
@@ -415,9 +413,9 @@ rebasing) push out the new tree with::
 
     $ dim push-queued
 
-This will also rebuild a new drm-intel-nightly integration tree. If that fails,
-ask maintainers for help with resolving conflicts. One thing to note here is
-that the script syncs saved git rerere conflict resolutions around. One does the
+This will also rebuild a new drm-tip integration tree. If that fails, ask
+maintainers for help with resolving conflicts. One thing to note here is that
+the script syncs saved git rerere conflict resolutions around. One does the
 resolution, everyone has it. The drawback is, someone screws up the conflict
 resolution, everyone has it...
 
diff --git a/dimrc.sample b/dimrc.sample
index ad463b42d537..42612a3a9fdf 100644
--- a/dimrc.sample
+++ b/dimrc.sample
@@ -4,7 +4,7 @@
 # Defaults are in the comments below.
 
 # Prefix for the repo directories. The prefix will contain
-# $DIM_DRM_INTEL, drm-intel-nightly, maintainer-tools, etc.
+# $DIM_DRM_INTEL, drm-tip, maintainer-tools, etc.
 #DIM_PREFIX=$HOME/linux
 
 # Name of the main maintainer repo under $DIM_PREFIX.
diff --git a/drm-intel-flow.dot b/drm-intel-flow.dot
index 0c9879deba64..1be86164f5e0 100644
--- a/drm-intel-flow.dot
+++ b/drm-intel-flow.dot
@@ -56,7 +56,7 @@ strict digraph "drm-intel" {
        "drm-intel-next" [color=blue]
        "drm-intel-next-fixes" [color=blue]
        "drm-intel-next-queued" [label="drm-intel-next-queued\ntopic/* branches" color=blue]
-       "drm-intel-nightly" [color=blue]
+       "drm-tip" [color=blue]
        "drm-intel-testing" [color=blue]
        "drm-intel-internal" [color=blue]
 
@@ -66,20 +66,20 @@ strict digraph "drm-intel" {
        "drm-intel-next-fixes" -> "drm-next" [label="discretionary pulls\n~rc5..release" color=blue]
        "drm-intel-next-queued" -> "drm-intel-next" [color=blue]
        "drm-intel-next-queued" -> "drm-next" [label="special topic/* branches" color=blue]
-       "drm-intel-nightly" -> "drm-intel-testing" [label="snapshot for QA" color=blue]
+       "drm-tip" -> "drm-intel-testing" [label="snapshot for QA" color=blue]
 
        # other trees in nightly
        "sound/for-linus" [color=yellow style=dashed]
        "sound/for-next" [color=yellow style=dashed]
 
        # nightly rebuild
-       "drm-intel-fixes" -> "drm-intel-nightly" [label="rebuild" color=blue]
-       "drm-intel-next-fixes" -> "drm-intel-nightly" [label="rebuild" color=blue]
-       "drm-intel-next-queued" -> "drm-intel-nightly" [label="rebuild" color=blue]
-       "drm-next" -> "drm-intel-nightly" [label="rebuild" color=blue]
-       "drm-fixes" -> "drm-intel-nightly" [label="rebuild" color=blue]
-       "sound/for-next" -> "drm-intel-nightly" [label="rebuild" color=blue]
-       "sound/for-linus" -> "drm-intel-nightly" [label="rebuild" color=blue]
+       "drm-intel-fixes" -> "drm-tip" [label="rebuild" color=blue]
+       "drm-intel-next-fixes" -> "drm-tip" [label="rebuild" color=blue]
+       "drm-intel-next-queued" -> "drm-tip" [label="rebuild" color=blue]
+       "drm-next" -> "drm-tip" [label="rebuild" color=blue]
+       "drm-fixes" -> "drm-tip" [label="rebuild" color=blue]
+       "sound/for-next" -> "drm-tip" [label="rebuild" color=blue]
+       "sound/for-linus" -> "drm-tip" [label="rebuild" color=blue]
 
        # patch flow
        "intel-gfx" [label="intel-gfx mailing list"]
diff --git a/drm-intel.rst b/drm-intel.rst
index 492cb580bbd5..e9cf240c4048 100644
--- a/drm-intel.rst
+++ b/drm-intel.rst
@@ -120,10 +120,12 @@ This is the fastest path to getting fixes to Linus' tree. It is generally for
 the regressions, cc:stable, black screens, GPU hangs only, and should pretty
 much follow the stable rules.
 
-drm-intel-nightly
-~~~~~~~~~~~~~~~~~
+drm-tip
+~~~~~~~
 
-This branch combines them all. Rebuilt every time one of the trees is pushed.
+This branch combines them all. Rebuilt every time one of the trees is pushed. It
+is living in a separate git repository name
+`drm-tip <https://cgit.freedesktop.org/drm-tip>`_.
 
 Patch and Merge Flow
 ====================
@@ -215,11 +217,11 @@ Signed-off-by: line in the commit message:
 
 	(cherry picked from commit 0bff4858653312a10c83709e0009c3adb87e6f1e)
 
-Resolving Conflicts when Rebuilding drm-intel-nightly
-=====================================================
+Resolving Conflicts when Rebuilding drm-tip
+===========================================
 
-When you push patches with dim drm-intel-nightly always gets rebuild and this
-can sometimes fail, for example like this: ::
+When you push patches with dim drm-tip always gets rebuild and this can
+sometimes fail, for example like this: ::
 
         Updating rerere cache and nightly.conf... Done.
         Fetching drm-upstream... Done.
@@ -246,9 +248,9 @@ when it's tricky or something fails in the below procedure.
    It's handy to keep the log output for context so that you know which branch
    caused the conflicts, and which branches are already included.
 
-3. Switch to $DIM_PREFIX/drm-intel-nightly and analyze the conflict: ::
+3. Switch to $DIM_PREFIX/drm-tip and analyze the conflict: ::
 
-        $ cd $DIM_PREFIX/drm-intel-nightly
+        $ cd $DIM_PREFIX/drm-tip
         $ git diff # shows three-way diff of conflict
         $ gitk --merge # lists all commits git believes to be relevant
 
-- 
2.9.3

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply related	[flat|nested] 26+ messages in thread

* Re: [PATCH 03/10] dim: echoerr helper for printing to stderr
  2016-10-18 12:13 ` [PATCH 03/10] dim: echoerr helper for printing to stderr Daniel Vetter
@ 2016-10-18 13:05   ` Jani Nikula
  0 siblings, 0 replies; 26+ messages in thread
From: Jani Nikula @ 2016-10-18 13:05 UTC (permalink / raw)
  To: Intel Graphics Development; +Cc: Daniel Vetter, DRI Development

On Tue, 18 Oct 2016, Daniel Vetter <daniel.vetter@ffwll.ch> wrote:
> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
> ---
>  dim | 19 ++++++++++++-------
>  1 file changed, 12 insertions(+), 7 deletions(-)
>
> diff --git a/dim b/dim
> index 192d6ee10838..2601bb7dbbad 100755
> --- a/dim
> +++ b/dim
> @@ -102,12 +102,17 @@ DRY=
>  FORCE=
>  HELP=
>  
> +function echoerr
> +{
> +	echo "$@" >&2
> +}

I guess you could move the "$dim: " prefix here, to ensure all places
will have that. Can be a follow-up.

BR,
Jani.

> +
>  function warn_or_fail
>  {
>  	if [[ $FORCE ]] ; then
> -		echo WARNING: $1, but continuing
> +		echoerr WARNING: $1, but continuing
>  	else
> -		echo ERROR: $1, aborting
> +		echoerr ERROR: $1, aborting
>  		exit 1
>  	fi
>  }
> @@ -128,7 +133,7 @@ while getopts hdfi opt; do
>  			HELP=1
>  			;;
>  		*)
> -			echo "See '$dim help' for more information." >&2
> +			echoerr "See '$dim help' for more information."
>  			exit
>  	esac
>  done
> @@ -167,18 +172,18 @@ function dim_uptodate
>  	local using="${BASH_SOURCE[0]}"
>  
>  	if [[ ! -e "$using" ]]; then
> -		echo "$dim: could not figure out the version being used ($using)." >&2
> +		echoerr "$dim: could not figure out the version being used ($using)."
>  		exit 1
>  	fi
>  
>  	if [[ ! -e "$DIM_PREFIX/maintainer-tools/.git" ]]; then
> -		echo "$dim: could not find the upstream repo for $dim." >&2
> +		echoerr "$dim: could not find the upstream repo for $dim."
>  		exit 1
>  	fi
>  
>  	if ! git --git-dir=$DIM_PREFIX/maintainer-tools/.git show @{upstream}:dim |\
>  			diff "$using" - >& /dev/null; then
> -		echo "$dim: not running upstream version of the script." >&2
> +		echoerr "$dim: not running upstream version of the script."
>  		exit 1
>  	fi
>  }
> @@ -1280,6 +1285,6 @@ subcmd_func=dim_${subcmd//-/_}
>  if declare -f $subcmd_func >/dev/null; then
>  	$subcmd_func "$@"
>  else
> -	echo "$dim: '$subcommand' is not a dim command." >&2
> +	echoerr "$dim: '$subcommand' is not a dim command."
>  	dim_usage
>  fi

-- 
Jani Nikula, Intel Open Source Technology Center
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply	[flat|nested] 26+ messages in thread

* Re: [Intel-gfx] [PATCH 01/10] dim: Extract TODO
  2016-10-18 12:13 [PATCH 01/10] dim: Extract TODO Daniel Vetter
                   ` (8 preceding siblings ...)
  2016-10-18 12:13 ` [PATCH 10/10] dim: s/drm-nightly/drm-tip Daniel Vetter
@ 2016-10-18 13:13 ` Jani Nikula
  9 siblings, 0 replies; 26+ messages in thread
From: Jani Nikula @ 2016-10-18 13:13 UTC (permalink / raw)
  To: Intel Graphics Development; +Cc: Daniel Vetter, DRI Development, Daniel Vetter

On Tue, 18 Oct 2016, Daniel Vetter <daniel.vetter@ffwll.ch> wrote:
> Just maybe a bit more visibility, the scripts are growing.
>
> Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>

LGTM

> ---
>  TODO | 27 +++++++++++++++++++++++++++
>  dim  | 17 -----------------
>  qf   | 11 -----------
>  3 files changed, 27 insertions(+), 28 deletions(-)
>  create mode 100644 TODO
>
> diff --git a/TODO b/TODO
> new file mode 100644
> index 000000000000..ac0f27763dfa
> --- /dev/null
> +++ b/TODO
> @@ -0,0 +1,27 @@
> +dim:
> +- extract the integration tree logic and make it generally useful, maybe for a
> +  drm-integration tree ...
> +- Improve nightly-forget to forget a specific merge instead of just the first
> +  dinq/dif merge.
> +- add option to check-patch to check stdin
> +- integrate ninja-check? Or too much checkers considered harmful?
> +  https://lists.linuxfoundation.org/pipermail/ksummit-discuss/2014-May/000554.html
> +- add patchwork Link: also after manually resolving conflicts in drm
> +  apply-resolved
> +- pull in dim extract-tags tool from Ville
> +- allow dim rebuild-nightly to pull branches from local trees in dry-run mode.
> +  This is useful to confirm a backmerge is indeed correct, by comparing the
> +  resulting -nightly with the old one. Current the branch must be pushed out
> +  first for rebuild-nightly to pick it up, which means the merge can't be
> +  fixed any more.
> +
> +qf:
> +- get better at preventing and cleaning up a mess when switching branches
> +  while there's still applied quilt patches around ...
> +- combine quilt annotate and git blame into one tool
> +- use the index a bit more to e.g. stage all applied quilt patches, then use
> +  the output of git diff to refresh a quilt patch
> +- use git commit-tree and git write-tree in the setup code instead of the
> +  current high-level hacks
> +- track/restore the topmost patch maybe?
> +- synchronize quilt notes in qf push and qf fetch
> diff --git a/dim b/dim
> index 5fb3a0fee7ff..57ad4fcf9767 100755
> --- a/dim
> +++ b/dim
> @@ -27,23 +27,6 @@
>  
>  # drm-intel-next maintainer script
>  
> -# TODO
> -# - extract the integration tree logic and make it generally useful, maybe for a
> -#   drm-integration tree ...
> -# - Improve nightly-forget to forget a specific merge instead of just the first
> -#   dinq/dif merge.
> -# - add option to check-patch to check stdin
> -# - integrate ninja-check? Or too much checkers considered harmful?
> -#   https://lists.linuxfoundation.org/pipermail/ksummit-discuss/2014-May/000554.html
> -# - add patchwork Link: also after manually resolving conflicts in drm
> -#   apply-resolved
> -# - pull in dim extract-tags tool from Ville
> -# - allow dim rebuild-nightly to pull branches from local trees in dry-run mode.
> -#   This is useful to confirm a backmerge is indeed correct, by comparing the
> -#   resulting -nightly with the old one. Current the branch must be pushed out
> -#   first for rebuild-nightly to pick it up, which means the merge can't be
> -#   fixed any more.
> -
>  # fail on any goof-up
>  set -e
>  
> diff --git a/qf b/qf
> index 4e9cb03f31fe..31b9f3bae0a2 100755
> --- a/qf
> +++ b/qf
> @@ -26,17 +26,6 @@
>  
>  # quilt git flow script
>  
> -# TODO
> -# - get better at preventing and cleaning up a mess when switching branches
> -# while there's still applied quilt patches around ...
> -# - combine quilt annotate and git blame into one tool
> -# - use the index a bit more to e.g. stage all applied quilt patches, then use
> -# the output of git diff to refresh a quilt patch
> -# - use git commit-tree and git write-tree in the setup code instead of the
> -# current high-level hacks
> -# - track/restore the topmost patch maybe?
> -# - synchronize quilt notes in qf push and qf fetch
> -
>  # config
>  QUILT_PREFIX=quilt/

-- 
Jani Nikula, Intel Open Source Technology Center
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply	[flat|nested] 26+ messages in thread

* Re: [PATCH 02/10] dim: Autocheck for up-to-dateness
  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
  0 siblings, 1 reply; 26+ messages in thread
From: Jani Nikula @ 2016-10-18 13:15 UTC (permalink / raw)
  To: Intel Graphics Development; +Cc: Daniel Vetter, DRI Development, Daniel Vetter

On Tue, 18 Oct 2016, Daniel Vetter <daniel.vetter@ffwll.ch> wrote:
> Exits script to annoy people roughly every 100th time ...

Annoyingly random, but we can improve this later.

LGTM.

> Also switch to the magic @{upstream} reference, in case the remote is
> not called origin (which is pretty normal in case of using git
> worktree).
>
> Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
> ---
>  dim | 6 +++++-
>  1 file changed, 5 insertions(+), 1 deletion(-)
>
> diff --git a/dim b/dim
> index 57ad4fcf9767..192d6ee10838 100755
> --- a/dim
> +++ b/dim
> @@ -176,13 +176,17 @@ function dim_uptodate
>  		exit 1
>  	fi
>  
> -	if ! git --git-dir=$DIM_PREFIX/maintainer-tools/.git show origin/maintainer-tools:dim |\
> +	if ! git --git-dir=$DIM_PREFIX/maintainer-tools/.git show @{upstream}:dim |\
>  			diff "$using" - >& /dev/null; then
>  		echo "$dim: not running upstream version of the script." >&2
>  		exit 1
>  	fi
>  }
>  
> +if [[ "$((`date +%s` % 100))" -eq "0" ]] ; then
> +        dim_uptodate
> +fi
> +
>  # get message id from file
>  # $1 = file
>  message_get_id ()

-- 
Jani Nikula, Intel Open Source Technology Center
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply	[flat|nested] 26+ messages in thread

* Re: [Intel-gfx] [PATCH 04/10] dim: autodetect remotes, first part for dim_setup
  2016-10-18 12:13 ` [PATCH 04/10] dim: autodetect remotes, first part for dim_setup Daniel Vetter
@ 2016-10-18 13:27   ` Jani Nikula
  2016-10-18 13:30     ` Ville Syrjälä
  2016-10-18 19:38   ` [PATCH] dim: autodetect branches in rebuild-nightly Daniel Vetter
  1 sibling, 1 reply; 26+ messages in thread
From: Jani Nikula @ 2016-10-18 13:27 UTC (permalink / raw)
  To: Intel Graphics Development; +Cc: Daniel Vetter, DRI Development, Daniel Vetter

On Tue, 18 Oct 2016, Daniel Vetter <daniel.vetter@ffwll.ch> wrote:
> The goals here are multiple:
> - simpler configuration through autodetection
> - allows seamless upgrading to git worktree for the aux checkouts
> - eventually I want to split up drm-misc into a separate remote ...
>
> And yes this is just a start.
>
> v2: Print errors to stderr, otherwise they can't be seen when directly
> assigning the result of get_remote_name to a variable.
>
> Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
> ---
>  dim | 112 +++++++++++++++++++++++++++++++++++---------------------------------
>  1 file changed, 58 insertions(+), 54 deletions(-)
>
> diff --git a/dim b/dim
> index 2601bb7dbbad..90eb553c6575 100755
> --- a/dim
> +++ b/dim
> @@ -192,6 +192,24 @@ if [[ "$((`date +%s` % 100))" -eq "0" ]] ; then
>          dim_uptodate
>  fi
>  
> +function get_remote_name
> +{
> +	local remote_url=$1
> +
> +	local remote=`git remote -v | grep $remote_url | \
> +		head -n1 | sed -e 's/^\(.*\)\t.*/\1/'`

'cut -f 1' seems cleaner than the sed.

> +
> +	if [[ $remote == "" ]] ; then

I'd prefer

	if [[ -z "$remote" ]]; then

> +		echoerr No git remote for $remote_url found in `pwd`.
> +		echoerr Please set it up using
> +		echoerr     $ git remote add '<name>' $remote_url
> +		echoerr with a name of your choice.

I'm fond of wrapping the strings in double quotes. Gives me nicer
highlighting in the editor. ;)

Otherwise seems nice.

BR,
Jani.

> +		exit 1
> +	fi
> +
> +	echo $remote
> +}
> +
>  # get message id from file
>  # $1 = file
>  message_get_id ()
> @@ -1044,8 +1062,36 @@ function dim_update_branches
>  	update_rerere_cache
>  }
>  
> +function setup_aux_checkout # name remote
> +{
> +	local name=$1
> +	local remote_url=$2
> +	local dir=$3
> +	local remote
> +
> +	echo "Setting up $dir ..."
> +
> +	if [ ! -d $dir ]; then
> +		git clone --reference=$DIM_PREFIX/$DIM_DRM_INTEL/.git $remote_url $dir
> +		cd $dir
> +		git config remote.origin.url $remote_url
> +		echo "$DIM_PREFIX/$DIM_DRM_INTEL/.git/objects" > .git/objects/info/alternates
> +		git repack -a -d -l
> +		remote=origin
> +	else
> +		cd $dir
> +		remote=`get_remote_name $drm_intel_ssh`
> +	fi
> +	if ! git branch | grep $name > /dev/null ; then
> +		git checkout -t $remote/$name
> +	fi
> +	cd ..
> +}
> +
>  function dim_setup
>  {
> +	local remote
> +
>  	if [ ! -d $DIM_PREFIX ]; then
>  		echo "please set up your repository directory with:"
>  		echo "    mkdir -p $DIM_PREFIX"
> @@ -1062,76 +1108,34 @@ function dim_setup
>  		exit 1
>  	fi
>  	cd $DIM_DRM_INTEL
> -	if ! git remote -v | grep "^origin[[:space:]]" | grep $linux_upstream_git > /dev/null; then
> -		echo "please set up remote origin for $linux_upstream_git"
> -		exit 1
> -	fi
> -	if ! git remote -v | grep "^$DIM_DRM_INTEL_REMOTE[[:space:]]" | grep $drm_intel_ssh > /dev/null; then
> -		echo "please set up remote $DIM_DRM_INTEL_REMOTE for $drm_intel_ssh with:"
> -		echo "    git remote add $DIM_DRM_INTEL_REMOTE $drm_intel_ssh"
> -		echo "or update your configuration."
> -		exit 1
> -	fi
> -	if ! git remote -v | grep "^$DIM_DRM_UPSTREAM_REMOTE[[:space:]]" | grep $drm_upstream_git > /dev/null; then
> -		echo "please set up remote $DIM_DRM_UPSTREAM_REMOTE for $drm_upstream_git with:"
> -		echo "    git remote add $DIM_DRM_UPSTREAM_REMOTE $drm_upstream_git"
> -		echo "or update your configuration."
> -		exit 1
> -	fi
> -	cd ..
>  
> -	echo "Setting up maintainer-tools ..."
> -	if [ ! -d maintainer-tools ]; then
> -		git clone --reference=$DIM_PREFIX/$DIM_DRM_INTEL/.git $drm_intel_ssh maintainer-tools
> -	fi
> -	cd maintainer-tools
> -	git config remote.origin.url $drm_intel_ssh
> -	echo "$DIM_PREFIX/$DIM_DRM_INTEL/.git/objects" > .git/objects/info/alternates
> -	git repack -a -d -l
> -	if ! git branch | grep maintainer-tools > /dev/null ; then
> -		git checkout -t origin/maintainer-tools
> -	fi
> -	cd ..
> +	# check remote configuration
> +	remote=`get_remote_name $linux_upstream_git`
> +	remote=`get_remote_name $drm_intel_ssh`
> +	remote=`get_remote_name $drm_upstream_git`
>  
> -	echo "Setting up drm-intel-rerere ..."
> -	if [ ! -d drm-intel-rerere ]; then
> -		git clone --reference=$DIM_PREFIX/$DIM_DRM_INTEL/.git $drm_intel_ssh drm-intel-rerere
> -	fi
> -	cd drm-intel-rerere
> -	git config remote.origin.url $drm_intel_ssh
> -	echo "$DIM_PREFIX/$DIM_DRM_INTEL/.git/objects" > .git/objects/info/alternates
> -	git repack -a -d -l
> -	if ! git branch | grep rerere-cache > /dev/null ; then
> -		git checkout -t origin/rerere-cache
> -	fi
>  	cd ..
>  
> -	echo "Setting up drm-intel-nightly ..."
> -	if [ ! -d drm-intel-nightly ]; then
> -		git clone --reference=$DIM_PREFIX/$DIM_DRM_INTEL/.git $drm_intel_ssh drm-intel-nightly
> -	fi
> +	setup_aux_checkout maintainer-tools $drm_intel_ssh maintainer-tools
> +
> +	setup_aux_checkout rerere-cache $drm_intel_ssh drm-intel-rerere
> +
> +	setup_aux_checkout drm-intel-nightly $drm_intel_ssh drm-intel-nightly
>  	cd drm-intel-nightly
> -	mkdir -p .git/rr-cache
> -	git config remote.origin.url $drm_intel_ssh
> -	echo "$DIM_PREFIX/$DIM_DRM_INTEL/.git/objects" > .git/objects/info/alternates
> -	git repack -a -d -l
> -	if ! git branch | grep drm-intel-nightly > /dev/null ; then
> -		git checkout -t origin/drm-intel-nightly
> -	fi
>  	if git remote | grep drm-upstream > /dev/null ; then
>  		git config remote.drm-upstream.url $drm_upstream_git
>  	else
> -		git remote add drm-upstream $drm_upstream_git
> +		remote=`get_remote_name $drm_upstream_git`
>  	fi
>  	if git remote | grep sound-upstream > /dev/null ; then
>  		git config remote.sound-upstream.url $sound_upstream_git
>  	else
> -		git remote add sound-upstream $sound_upstream_git
> +		remote=`get_remote_name $sound_upstream_git`
>  	fi
>  	if git remote | grep driver-core-upstream > /dev/null ; then
>  		git config remote.driver-core-upstream.url $driver_core_upstream_git
>  	else
> -		git remote add driver-core-upstream $driver_core_upstream_git
> +		remote=`get_remote_name $driver_core_upstream_git`
>  	fi
>  
>  	echo "dim setup successfully completed!"

-- 
Jani Nikula, Intel Open Source Technology Center
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply	[flat|nested] 26+ messages in thread

* Re: [PATCH 02/10] dim: Autocheck for up-to-dateness
  2016-10-18 13:15   ` Jani Nikula
@ 2016-10-18 13:27     ` Daniel Vetter
  2016-10-18 14:04       ` Jani Nikula
  0 siblings, 1 reply; 26+ messages in thread
From: Daniel Vetter @ 2016-10-18 13:27 UTC (permalink / raw)
  To: Jani Nikula
  Cc: Daniel Vetter, Intel Graphics Development, DRI Development,
	Daniel Vetter

On Tue, Oct 18, 2016 at 04:15:01PM +0300, Jani Nikula wrote:
> On Tue, 18 Oct 2016, Daniel Vetter <daniel.vetter@ffwll.ch> wrote:
> > Exits script to annoy people roughly every 100th time ...
> 
> Annoyingly random, but we can improve this later.

I had it non-random, then realized it makes improving dim impossible ;-)
-Daniel
-- 
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply	[flat|nested] 26+ messages in thread

* Re: [Intel-gfx] [PATCH 04/10] dim: autodetect remotes, first part for dim_setup
  2016-10-18 13:27   ` [Intel-gfx] " Jani Nikula
@ 2016-10-18 13:30     ` Ville Syrjälä
  2016-10-18 14:05       ` Jani Nikula
  0 siblings, 1 reply; 26+ messages in thread
From: Ville Syrjälä @ 2016-10-18 13:30 UTC (permalink / raw)
  To: Jani Nikula
  Cc: Daniel Vetter, Intel Graphics Development, DRI Development,
	Daniel Vetter

On Tue, Oct 18, 2016 at 04:27:05PM +0300, Jani Nikula wrote:
> On Tue, 18 Oct 2016, Daniel Vetter <daniel.vetter@ffwll.ch> wrote:
> > The goals here are multiple:
> > - simpler configuration through autodetection
> > - allows seamless upgrading to git worktree for the aux checkouts
> > - eventually I want to split up drm-misc into a separate remote ...
> >
> > And yes this is just a start.
> >
> > v2: Print errors to stderr, otherwise they can't be seen when directly
> > assigning the result of get_remote_name to a variable.
> >
> > Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
> > ---
> >  dim | 112 +++++++++++++++++++++++++++++++++++---------------------------------
> >  1 file changed, 58 insertions(+), 54 deletions(-)
> >
> > diff --git a/dim b/dim
> > index 2601bb7dbbad..90eb553c6575 100755
> > --- a/dim
> > +++ b/dim
> > @@ -192,6 +192,24 @@ if [[ "$((`date +%s` % 100))" -eq "0" ]] ; then
> >          dim_uptodate
> >  fi
> >  
> > +function get_remote_name
> > +{
> > +	local remote_url=$1
> > +
> > +	local remote=`git remote -v | grep $remote_url | \
> > +		head -n1 | sed -e 's/^\(.*\)\t.*/\1/'`
> 
> 'cut -f 1' seems cleaner than the sed.

Or just replace the lot with awk?

> 
> > +
> > +	if [[ $remote == "" ]] ; then
> 
> I'd prefer
> 
> 	if [[ -z "$remote" ]]; then
> 
> > +		echoerr No git remote for $remote_url found in `pwd`.
> > +		echoerr Please set it up using
> > +		echoerr     $ git remote add '<name>' $remote_url
> > +		echoerr with a name of your choice.
> 
> I'm fond of wrapping the strings in double quotes. Gives me nicer
> highlighting in the editor. ;)
> 
> Otherwise seems nice.
> 
> BR,
> Jani.
> 
> > +		exit 1
> > +	fi
> > +
> > +	echo $remote
> > +}
> > +
> >  # get message id from file
> >  # $1 = file
> >  message_get_id ()
> > @@ -1044,8 +1062,36 @@ function dim_update_branches
> >  	update_rerere_cache
> >  }
> >  
> > +function setup_aux_checkout # name remote
> > +{
> > +	local name=$1
> > +	local remote_url=$2
> > +	local dir=$3
> > +	local remote
> > +
> > +	echo "Setting up $dir ..."
> > +
> > +	if [ ! -d $dir ]; then
> > +		git clone --reference=$DIM_PREFIX/$DIM_DRM_INTEL/.git $remote_url $dir
> > +		cd $dir
> > +		git config remote.origin.url $remote_url
> > +		echo "$DIM_PREFIX/$DIM_DRM_INTEL/.git/objects" > .git/objects/info/alternates
> > +		git repack -a -d -l
> > +		remote=origin
> > +	else
> > +		cd $dir
> > +		remote=`get_remote_name $drm_intel_ssh`
> > +	fi
> > +	if ! git branch | grep $name > /dev/null ; then
> > +		git checkout -t $remote/$name
> > +	fi
> > +	cd ..
> > +}
> > +
> >  function dim_setup
> >  {
> > +	local remote
> > +
> >  	if [ ! -d $DIM_PREFIX ]; then
> >  		echo "please set up your repository directory with:"
> >  		echo "    mkdir -p $DIM_PREFIX"
> > @@ -1062,76 +1108,34 @@ function dim_setup
> >  		exit 1
> >  	fi
> >  	cd $DIM_DRM_INTEL
> > -	if ! git remote -v | grep "^origin[[:space:]]" | grep $linux_upstream_git > /dev/null; then
> > -		echo "please set up remote origin for $linux_upstream_git"
> > -		exit 1
> > -	fi
> > -	if ! git remote -v | grep "^$DIM_DRM_INTEL_REMOTE[[:space:]]" | grep $drm_intel_ssh > /dev/null; then
> > -		echo "please set up remote $DIM_DRM_INTEL_REMOTE for $drm_intel_ssh with:"
> > -		echo "    git remote add $DIM_DRM_INTEL_REMOTE $drm_intel_ssh"
> > -		echo "or update your configuration."
> > -		exit 1
> > -	fi
> > -	if ! git remote -v | grep "^$DIM_DRM_UPSTREAM_REMOTE[[:space:]]" | grep $drm_upstream_git > /dev/null; then
> > -		echo "please set up remote $DIM_DRM_UPSTREAM_REMOTE for $drm_upstream_git with:"
> > -		echo "    git remote add $DIM_DRM_UPSTREAM_REMOTE $drm_upstream_git"
> > -		echo "or update your configuration."
> > -		exit 1
> > -	fi
> > -	cd ..
> >  
> > -	echo "Setting up maintainer-tools ..."
> > -	if [ ! -d maintainer-tools ]; then
> > -		git clone --reference=$DIM_PREFIX/$DIM_DRM_INTEL/.git $drm_intel_ssh maintainer-tools
> > -	fi
> > -	cd maintainer-tools
> > -	git config remote.origin.url $drm_intel_ssh
> > -	echo "$DIM_PREFIX/$DIM_DRM_INTEL/.git/objects" > .git/objects/info/alternates
> > -	git repack -a -d -l
> > -	if ! git branch | grep maintainer-tools > /dev/null ; then
> > -		git checkout -t origin/maintainer-tools
> > -	fi
> > -	cd ..
> > +	# check remote configuration
> > +	remote=`get_remote_name $linux_upstream_git`
> > +	remote=`get_remote_name $drm_intel_ssh`
> > +	remote=`get_remote_name $drm_upstream_git`
> >  
> > -	echo "Setting up drm-intel-rerere ..."
> > -	if [ ! -d drm-intel-rerere ]; then
> > -		git clone --reference=$DIM_PREFIX/$DIM_DRM_INTEL/.git $drm_intel_ssh drm-intel-rerere
> > -	fi
> > -	cd drm-intel-rerere
> > -	git config remote.origin.url $drm_intel_ssh
> > -	echo "$DIM_PREFIX/$DIM_DRM_INTEL/.git/objects" > .git/objects/info/alternates
> > -	git repack -a -d -l
> > -	if ! git branch | grep rerere-cache > /dev/null ; then
> > -		git checkout -t origin/rerere-cache
> > -	fi
> >  	cd ..
> >  
> > -	echo "Setting up drm-intel-nightly ..."
> > -	if [ ! -d drm-intel-nightly ]; then
> > -		git clone --reference=$DIM_PREFIX/$DIM_DRM_INTEL/.git $drm_intel_ssh drm-intel-nightly
> > -	fi
> > +	setup_aux_checkout maintainer-tools $drm_intel_ssh maintainer-tools
> > +
> > +	setup_aux_checkout rerere-cache $drm_intel_ssh drm-intel-rerere
> > +
> > +	setup_aux_checkout drm-intel-nightly $drm_intel_ssh drm-intel-nightly
> >  	cd drm-intel-nightly
> > -	mkdir -p .git/rr-cache
> > -	git config remote.origin.url $drm_intel_ssh
> > -	echo "$DIM_PREFIX/$DIM_DRM_INTEL/.git/objects" > .git/objects/info/alternates
> > -	git repack -a -d -l
> > -	if ! git branch | grep drm-intel-nightly > /dev/null ; then
> > -		git checkout -t origin/drm-intel-nightly
> > -	fi
> >  	if git remote | grep drm-upstream > /dev/null ; then
> >  		git config remote.drm-upstream.url $drm_upstream_git
> >  	else
> > -		git remote add drm-upstream $drm_upstream_git
> > +		remote=`get_remote_name $drm_upstream_git`
> >  	fi
> >  	if git remote | grep sound-upstream > /dev/null ; then
> >  		git config remote.sound-upstream.url $sound_upstream_git
> >  	else
> > -		git remote add sound-upstream $sound_upstream_git
> > +		remote=`get_remote_name $sound_upstream_git`
> >  	fi
> >  	if git remote | grep driver-core-upstream > /dev/null ; then
> >  		git config remote.driver-core-upstream.url $driver_core_upstream_git
> >  	else
> > -		git remote add driver-core-upstream $driver_core_upstream_git
> > +		remote=`get_remote_name $driver_core_upstream_git`
> >  	fi
> >  
> >  	echo "dim setup successfully completed!"
> 
> -- 
> Jani Nikula, Intel Open Source Technology Center
> _______________________________________________
> dri-devel mailing list
> dri-devel@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/dri-devel

-- 
Ville Syrjälä
Intel OTC
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply	[flat|nested] 26+ messages in thread

* Re: [Intel-gfx] [PATCH 05/10] dim: support git worktree for aux checkouts
  2016-10-18 12:13 ` [PATCH 05/10] dim: support git worktree for aux checkouts Daniel Vetter
@ 2016-10-18 13:38   ` Jani Nikula
  2016-10-18 19:11     ` Daniel Vetter
  0 siblings, 1 reply; 26+ messages in thread
From: Jani Nikula @ 2016-10-18 13:38 UTC (permalink / raw)
  To: Intel Graphics Development; +Cc: Daniel Vetter, DRI Development, Daniel Vetter

On Tue, 18 Oct 2016, Daniel Vetter <daniel.vetter@ffwll.ch> wrote:
> If available by default. This saves quite a pile of disk-space that
> imo making it the default is justified.
>
> Note that this will break the rebuild-nightly script for now,
> follow-up patches will fix that.
>
> Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
> ---
>  dim | 23 ++++++++++++++++-------
>  1 file changed, 16 insertions(+), 7 deletions(-)
>
> diff --git a/dim b/dim
> index 90eb553c6575..80baf24e4ad7 100755
> --- a/dim
> +++ b/dim
> @@ -1072,15 +1072,24 @@ function setup_aux_checkout # name remote
>  	echo "Setting up $dir ..."
>  
>  	if [ ! -d $dir ]; then
> -		git clone --reference=$DIM_PREFIX/$DIM_DRM_INTEL/.git $remote_url $dir
> -		cd $dir
> -		git config remote.origin.url $remote_url
> -		echo "$DIM_PREFIX/$DIM_DRM_INTEL/.git/objects" > .git/objects/info/alternates
> -		git repack -a -d -l
> -		remote=origin
> +		if git help worktree &> /dev/null ; then
> +			cd $DIM_PREFIX/$DIM_DRM_INTEL
> +			remote=`get_remote_name $remote_url`
> +			if ! git branch | grep $name > /dev/null ; then

The failure modes are annoying if there's a substring match for
$name. Unfortunately grep -w is no good if you need to handle "-" too.

> +				git branch --track $name $remote/$name
> +			fi
> +			git worktree add ../$dir $name
> +		else
> +			git clone --reference=$DIM_PREFIX/$DIM_DRM_INTEL/.git $remote_url $dir
> +			cd $dir
> +			git config remote.origin.url $remote_url
> +			echo "$DIM_PREFIX/$DIM_DRM_INTEL/.git/objects" > .git/objects/info/alternates
> +			git repack -a -d -l
> +			remote=origin
> +		fi
>  	else
>  		cd $dir
> -		remote=`get_remote_name $drm_intel_ssh`
> +		remote=`get_remote_name $remote_url`
>  	fi
>  	if ! git branch | grep $name > /dev/null ; then
>  		git checkout -t $remote/$name

-- 
Jani Nikula, Intel Open Source Technology Center
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply	[flat|nested] 26+ messages in thread

* Re: [PATCH 06/10] dim: Nuke nightly-forget
  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
  0 siblings, 1 reply; 26+ messages in thread
From: Jani Nikula @ 2016-10-18 13:39 UTC (permalink / raw)
  To: Intel Graphics Development; +Cc: Daniel Vetter, DRI Development, Daniel Vetter

On Tue, 18 Oct 2016, Daniel Vetter <daniel.vetter@ffwll.ch> wrote:
> With our proliferation of branches it's become long useless. Nowadays
> my MO is to revert the offending commit in the rerere-cache branch
> explicitly, remove drm-intel-nightly/.git/rr-cache and then re-run
> rebuild-nightly. That works much better, hence nuke this helper.

Agreed.

Later, we should add a helper to do the better MO.

BR,
Jani.


>
> Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
> ---
>  TODO | 2 --
>  dim  | 9 ---------
>  2 files changed, 11 deletions(-)
>
> diff --git a/TODO b/TODO
> index ac0f27763dfa..c1c6e20eb0e3 100644
> --- a/TODO
> +++ b/TODO
> @@ -1,8 +1,6 @@
>  dim:
>  - extract the integration tree logic and make it generally useful, maybe for a
>    drm-integration tree ...
> -- Improve nightly-forget to forget a specific merge instead of just the first
> -  dinq/dif merge.
>  - add option to check-patch to check stdin
>  - integrate ninja-check? Or too much checkers considered harmful?
>    https://lists.linuxfoundation.org/pipermail/ksummit-discuss/2014-May/000554.html
> diff --git a/dim b/dim
> index 80baf24e4ad7..48d5e7b6477a 100755
> --- a/dim
> +++ b/dim
> @@ -395,15 +395,6 @@ function dim_rebuild_nightly
>  	update_linux_next
>  }
>  
> -function dim_nightly_forget
> -{
> -	cd $DIM_PREFIX/drm-intel-nightly
> -	git fetch origin >& /dev/null
> -	git reset --hard origin/drm-intel-next-queued >& /dev/null
> -	git merge origin/drm-intel-fixes
> -	git rerere forget
> -}
> -
>  # push branch $1, rebuild nightly. the rest of the arguments are passed to git
>  # push.
>  function dim_push_branch

-- 
Jani Nikula, Intel Open Source Technology Center
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply	[flat|nested] 26+ messages in thread

* Re: [PATCH 07/10] dim: autodetect branches in rebuild-nightly
  2016-10-18 12:13 ` [PATCH 07/10] dim: autodetect branches in rebuild-nightly Daniel Vetter
@ 2016-10-18 13:52   ` Jani Nikula
  2016-10-18 19:29     ` Daniel Vetter
  0 siblings, 1 reply; 26+ messages in thread
From: Jani Nikula @ 2016-10-18 13:52 UTC (permalink / raw)
  To: Intel Graphics Development; +Cc: Daniel Vetter, DRI Development, Daniel Vetter

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

^ permalink raw reply	[flat|nested] 26+ messages in thread

* Re: [PATCH 02/10] dim: Autocheck for up-to-dateness
  2016-10-18 13:27     ` Daniel Vetter
@ 2016-10-18 14:04       ` Jani Nikula
  0 siblings, 0 replies; 26+ messages in thread
From: Jani Nikula @ 2016-10-18 14:04 UTC (permalink / raw)
  To: Daniel Vetter
  Cc: Daniel Vetter, Intel Graphics Development, DRI Development,
	Daniel Vetter

On Tue, 18 Oct 2016, Daniel Vetter <daniel@ffwll.ch> wrote:
> On Tue, Oct 18, 2016 at 04:15:01PM +0300, Jani Nikula wrote:
>> On Tue, 18 Oct 2016, Daniel Vetter <daniel.vetter@ffwll.ch> wrote:
>> > Exits script to annoy people roughly every 100th time ...
>> 
>> Annoyingly random, but we can improve this later.
>
> I had it non-random, then realized it makes improving dim impossible ;-)

I thought about just warning on every Nth day $((`date +%j` % N)) == 0,
and not exiting the script. Warning every time is annoying because it
talks to the network.

BR,
Jani.

-- 
Jani Nikula, Intel Open Source Technology Center
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply	[flat|nested] 26+ messages in thread

* Re: [PATCH 04/10] dim: autodetect remotes, first part for dim_setup
  2016-10-18 13:30     ` Ville Syrjälä
@ 2016-10-18 14:05       ` Jani Nikula
  0 siblings, 0 replies; 26+ messages in thread
From: Jani Nikula @ 2016-10-18 14:05 UTC (permalink / raw)
  To: Ville Syrjälä
  Cc: Daniel Vetter, Intel Graphics Development, DRI Development,
	Daniel Vetter

On Tue, 18 Oct 2016, Ville Syrjälä <ville.syrjala@linux.intel.com> wrote:
> On Tue, Oct 18, 2016 at 04:27:05PM +0300, Jani Nikula wrote:
>> On Tue, 18 Oct 2016, Daniel Vetter <daniel.vetter@ffwll.ch> wrote:
>> > The goals here are multiple:
>> > - simpler configuration through autodetection
>> > - allows seamless upgrading to git worktree for the aux checkouts
>> > - eventually I want to split up drm-misc into a separate remote ...
>> >
>> > And yes this is just a start.
>> >
>> > v2: Print errors to stderr, otherwise they can't be seen when directly
>> > assigning the result of get_remote_name to a variable.
>> >
>> > Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
>> > ---
>> >  dim | 112 +++++++++++++++++++++++++++++++++++---------------------------------
>> >  1 file changed, 58 insertions(+), 54 deletions(-)
>> >
>> > diff --git a/dim b/dim
>> > index 2601bb7dbbad..90eb553c6575 100755
>> > --- a/dim
>> > +++ b/dim
>> > @@ -192,6 +192,24 @@ if [[ "$((`date +%s` % 100))" -eq "0" ]] ; then
>> >          dim_uptodate
>> >  fi
>> >  
>> > +function get_remote_name
>> > +{
>> > +	local remote_url=$1
>> > +
>> > +	local remote=`git remote -v | grep $remote_url | \
>> > +		head -n1 | sed -e 's/^\(.*\)\t.*/\1/'`
>> 
>> 'cut -f 1' seems cleaner than the sed.
>
> Or just replace the lot with awk?

Then I'd have to refresh my awk-fu, but awk is not trendy anymore...

J.


>
>> 
>> > +
>> > +	if [[ $remote == "" ]] ; then
>> 
>> I'd prefer
>> 
>> 	if [[ -z "$remote" ]]; then
>> 
>> > +		echoerr No git remote for $remote_url found in `pwd`.
>> > +		echoerr Please set it up using
>> > +		echoerr     $ git remote add '<name>' $remote_url
>> > +		echoerr with a name of your choice.
>> 
>> I'm fond of wrapping the strings in double quotes. Gives me nicer
>> highlighting in the editor. ;)
>> 
>> Otherwise seems nice.
>> 
>> BR,
>> Jani.
>> 
>> > +		exit 1
>> > +	fi
>> > +
>> > +	echo $remote
>> > +}
>> > +
>> >  # get message id from file
>> >  # $1 = file
>> >  message_get_id ()
>> > @@ -1044,8 +1062,36 @@ function dim_update_branches
>> >  	update_rerere_cache
>> >  }
>> >  
>> > +function setup_aux_checkout # name remote
>> > +{
>> > +	local name=$1
>> > +	local remote_url=$2
>> > +	local dir=$3
>> > +	local remote
>> > +
>> > +	echo "Setting up $dir ..."
>> > +
>> > +	if [ ! -d $dir ]; then
>> > +		git clone --reference=$DIM_PREFIX/$DIM_DRM_INTEL/.git $remote_url $dir
>> > +		cd $dir
>> > +		git config remote.origin.url $remote_url
>> > +		echo "$DIM_PREFIX/$DIM_DRM_INTEL/.git/objects" > .git/objects/info/alternates
>> > +		git repack -a -d -l
>> > +		remote=origin
>> > +	else
>> > +		cd $dir
>> > +		remote=`get_remote_name $drm_intel_ssh`
>> > +	fi
>> > +	if ! git branch | grep $name > /dev/null ; then
>> > +		git checkout -t $remote/$name
>> > +	fi
>> > +	cd ..
>> > +}
>> > +
>> >  function dim_setup
>> >  {
>> > +	local remote
>> > +
>> >  	if [ ! -d $DIM_PREFIX ]; then
>> >  		echo "please set up your repository directory with:"
>> >  		echo "    mkdir -p $DIM_PREFIX"
>> > @@ -1062,76 +1108,34 @@ function dim_setup
>> >  		exit 1
>> >  	fi
>> >  	cd $DIM_DRM_INTEL
>> > -	if ! git remote -v | grep "^origin[[:space:]]" | grep $linux_upstream_git > /dev/null; then
>> > -		echo "please set up remote origin for $linux_upstream_git"
>> > -		exit 1
>> > -	fi
>> > -	if ! git remote -v | grep "^$DIM_DRM_INTEL_REMOTE[[:space:]]" | grep $drm_intel_ssh > /dev/null; then
>> > -		echo "please set up remote $DIM_DRM_INTEL_REMOTE for $drm_intel_ssh with:"
>> > -		echo "    git remote add $DIM_DRM_INTEL_REMOTE $drm_intel_ssh"
>> > -		echo "or update your configuration."
>> > -		exit 1
>> > -	fi
>> > -	if ! git remote -v | grep "^$DIM_DRM_UPSTREAM_REMOTE[[:space:]]" | grep $drm_upstream_git > /dev/null; then
>> > -		echo "please set up remote $DIM_DRM_UPSTREAM_REMOTE for $drm_upstream_git with:"
>> > -		echo "    git remote add $DIM_DRM_UPSTREAM_REMOTE $drm_upstream_git"
>> > -		echo "or update your configuration."
>> > -		exit 1
>> > -	fi
>> > -	cd ..
>> >  
>> > -	echo "Setting up maintainer-tools ..."
>> > -	if [ ! -d maintainer-tools ]; then
>> > -		git clone --reference=$DIM_PREFIX/$DIM_DRM_INTEL/.git $drm_intel_ssh maintainer-tools
>> > -	fi
>> > -	cd maintainer-tools
>> > -	git config remote.origin.url $drm_intel_ssh
>> > -	echo "$DIM_PREFIX/$DIM_DRM_INTEL/.git/objects" > .git/objects/info/alternates
>> > -	git repack -a -d -l
>> > -	if ! git branch | grep maintainer-tools > /dev/null ; then
>> > -		git checkout -t origin/maintainer-tools
>> > -	fi
>> > -	cd ..
>> > +	# check remote configuration
>> > +	remote=`get_remote_name $linux_upstream_git`
>> > +	remote=`get_remote_name $drm_intel_ssh`
>> > +	remote=`get_remote_name $drm_upstream_git`
>> >  
>> > -	echo "Setting up drm-intel-rerere ..."
>> > -	if [ ! -d drm-intel-rerere ]; then
>> > -		git clone --reference=$DIM_PREFIX/$DIM_DRM_INTEL/.git $drm_intel_ssh drm-intel-rerere
>> > -	fi
>> > -	cd drm-intel-rerere
>> > -	git config remote.origin.url $drm_intel_ssh
>> > -	echo "$DIM_PREFIX/$DIM_DRM_INTEL/.git/objects" > .git/objects/info/alternates
>> > -	git repack -a -d -l
>> > -	if ! git branch | grep rerere-cache > /dev/null ; then
>> > -		git checkout -t origin/rerere-cache
>> > -	fi
>> >  	cd ..
>> >  
>> > -	echo "Setting up drm-intel-nightly ..."
>> > -	if [ ! -d drm-intel-nightly ]; then
>> > -		git clone --reference=$DIM_PREFIX/$DIM_DRM_INTEL/.git $drm_intel_ssh drm-intel-nightly
>> > -	fi
>> > +	setup_aux_checkout maintainer-tools $drm_intel_ssh maintainer-tools
>> > +
>> > +	setup_aux_checkout rerere-cache $drm_intel_ssh drm-intel-rerere
>> > +
>> > +	setup_aux_checkout drm-intel-nightly $drm_intel_ssh drm-intel-nightly
>> >  	cd drm-intel-nightly
>> > -	mkdir -p .git/rr-cache
>> > -	git config remote.origin.url $drm_intel_ssh
>> > -	echo "$DIM_PREFIX/$DIM_DRM_INTEL/.git/objects" > .git/objects/info/alternates
>> > -	git repack -a -d -l
>> > -	if ! git branch | grep drm-intel-nightly > /dev/null ; then
>> > -		git checkout -t origin/drm-intel-nightly
>> > -	fi
>> >  	if git remote | grep drm-upstream > /dev/null ; then
>> >  		git config remote.drm-upstream.url $drm_upstream_git
>> >  	else
>> > -		git remote add drm-upstream $drm_upstream_git
>> > +		remote=`get_remote_name $drm_upstream_git`
>> >  	fi
>> >  	if git remote | grep sound-upstream > /dev/null ; then
>> >  		git config remote.sound-upstream.url $sound_upstream_git
>> >  	else
>> > -		git remote add sound-upstream $sound_upstream_git
>> > +		remote=`get_remote_name $sound_upstream_git`
>> >  	fi
>> >  	if git remote | grep driver-core-upstream > /dev/null ; then
>> >  		git config remote.driver-core-upstream.url $driver_core_upstream_git
>> >  	else
>> > -		git remote add driver-core-upstream $driver_core_upstream_git
>> > +		remote=`get_remote_name $driver_core_upstream_git`
>> >  	fi
>> >  
>> >  	echo "dim setup successfully completed!"
>> 
>> -- 
>> Jani Nikula, Intel Open Source Technology Center
>> _______________________________________________
>> dri-devel mailing list
>> dri-devel@lists.freedesktop.org
>> https://lists.freedesktop.org/mailman/listinfo/dri-devel

-- 
Jani Nikula, Intel Open Source Technology Center
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply	[flat|nested] 26+ messages in thread

* Re: [Intel-gfx] [PATCH 05/10] dim: support git worktree for aux checkouts
  2016-10-18 13:38   ` [Intel-gfx] " Jani Nikula
@ 2016-10-18 19:11     ` Daniel Vetter
  0 siblings, 0 replies; 26+ messages in thread
From: Daniel Vetter @ 2016-10-18 19:11 UTC (permalink / raw)
  To: Jani Nikula; +Cc: Daniel Vetter, Intel Graphics Development, DRI Development

On Tue, Oct 18, 2016 at 3:38 PM, Jani Nikula
<jani.nikula@linux.intel.com> wrote:
>> +             if git help worktree &> /dev/null ; then
>> +                     cd $DIM_PREFIX/$DIM_DRM_INTEL
>> +                     remote=`get_remote_name $remote_url`
>> +                     if ! git branch | grep $name > /dev/null ; then
>
> The failure modes are annoying if there's a substring match for
> $name. Unfortunately grep -w is no good if you need to handle "-" too.

Hm, right. I copypasted this all over, but with drm-intel-* we have a
few clashes. Played around, and the following does exact matches and
gets the job done:

if [[ `git branch --list $name` != "" ]]

I'll roll this out in a follow up patch everywhere.
-Daniel
-- 
Daniel Vetter
Software Engineer, Intel Corporation
+41 (0) 79 365 57 48 - http://blog.ffwll.ch
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply	[flat|nested] 26+ messages in thread

* Re: [PATCH 06/10] dim: Nuke nightly-forget
  2016-10-18 13:39   ` Jani Nikula
@ 2016-10-18 19:18     ` Daniel Vetter
  0 siblings, 0 replies; 26+ messages in thread
From: Daniel Vetter @ 2016-10-18 19:18 UTC (permalink / raw)
  To: Jani Nikula; +Cc: Daniel Vetter, Intel Graphics Development, DRI Development

On Tue, Oct 18, 2016 at 3:39 PM, Jani Nikula
<jani.nikula@linux.intel.com> wrote:
> On Tue, 18 Oct 2016, Daniel Vetter <daniel.vetter@ffwll.ch> wrote:
>> With our proliferation of branches it's become long useless. Nowadays
>> my MO is to revert the offending commit in the rerere-cache branch
>> explicitly, remove drm-intel-nightly/.git/rr-cache and then re-run
>> rebuild-nightly. That works much better, hence nuke this helper.
>
> Agreed.
>
> Later, we should add a helper to do the better MO.

dim revert-rerere <rerere-cache-sha1> sounds like a sweet thing. Let
me type that up and write some docs for it.
-Daniel
-- 
Daniel Vetter
Software Engineer, Intel Corporation
+41 (0) 79 365 57 48 - http://blog.ffwll.ch
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply	[flat|nested] 26+ messages in thread

* Re: [PATCH 07/10] dim: autodetect branches in rebuild-nightly
  2016-10-18 13:52   ` Jani Nikula
@ 2016-10-18 19:29     ` Daniel Vetter
  2016-10-19  7:10       ` Jani Nikula
  0 siblings, 1 reply; 26+ messages in thread
From: Daniel Vetter @ 2016-10-18 19:29 UTC (permalink / raw)
  To: Jani Nikula; +Cc: Daniel Vetter, Intel Graphics Development, DRI Development

On Tue, Oct 18, 2016 at 3:52 PM, Jani Nikula
<jani.nikula@linux.intel.com> wrote:
> 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.

It is with this. The remote names in nightly.conf are now entirely
fiction. The magic here takes those, then looks up the corresponding
url (againg from nigthly.conf) and then uses get_remote_name to figure
out the appropriate git remote in the local repo. Or complain and quit
if it doesn't exist. My drm-tip now has an "origin" remote pointing at
Linus' repo, while the "origin" from nightly.conf gets remapped to
"drm-tip". Sample output from running rebuild-nightly:

Updating rerere cache and nightly.conf... Done.
Fetching drm-intel (as danvet) ... Done.
Fetching drm-upstream (as airlied) ... Done.
Fetching sound-upstream (as takashi) ... Done.
Merging drm-intel/drm-intel-fixes... Reset. Done.
Merging drm-upstream/drm-fixes... Fast-forward. Done.
Merging drm-intel/drm-intel-next-fixes... Fast-forward. Done.
...

Cheers, Daniel
-- 
Daniel Vetter
Software Engineer, Intel Corporation
+41 (0) 79 365 57 48 - http://blog.ffwll.ch
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply	[flat|nested] 26+ messages in thread

* [PATCH] dim: autodetect branches in rebuild-nightly
  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 19:38   ` Daniel Vetter
  1 sibling, 0 replies; 26+ messages in thread
From: Daniel Vetter @ 2016-10-18 19:38 UTC (permalink / raw)
  To: Intel Graphics Development; +Cc: Daniel Vetter, DRI Development, Daniel Vetter

Needs new url-mapping information in nightly.conf to work properly.

v2:
- Fix typo when calling rr_cache_dir. Oops.
- Use cut -f 1 instead of sed/regex horrors (jani).

Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
---
 dim | 50 +++++++++++++++++++++++++++++++++++++-------------
 1 file changed, 37 insertions(+), 13 deletions(-)

diff --git a/dim b/dim
index 48d5e7b6477a..09879b166cee 100755
--- a/dim
+++ b/dim
@@ -197,7 +197,7 @@ function get_remote_name
 	local remote_url=$1
 
 	local remote=`git remote -v | grep $remote_url | \
-		head -n1 | sed -e 's/^\(.*\)\t.*/\1/'`
+		head -n1 | cut -f 1`
 
 	if [[ $remote == "" ]] ; then
 		echoerr No git remote for $remote_url found in `pwd`.
@@ -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
-- 
2.9.3

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

^ permalink raw reply related	[flat|nested] 26+ messages in thread

* Re: [PATCH 07/10] dim: autodetect branches in rebuild-nightly
  2016-10-18 19:29     ` Daniel Vetter
@ 2016-10-19  7:10       ` Jani Nikula
  0 siblings, 0 replies; 26+ messages in thread
From: Jani Nikula @ 2016-10-19  7:10 UTC (permalink / raw)
  To: Daniel Vetter; +Cc: Daniel Vetter, Intel Graphics Development, DRI Development

On Tue, 18 Oct 2016, Daniel Vetter <daniel.vetter@ffwll.ch> wrote:
> On Tue, Oct 18, 2016 at 3:52 PM, Jani Nikula
> <jani.nikula@linux.intel.com> wrote:
>> 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.
>
> It is with this.

I mean, is it worth changing the nightly.conf format at this point to
*not* have remote names at all, but just repo urls and branches. That's
what I think should be done eventually. Because the remote names are
fiction.

BR,
Jani.

> The remote names in nightly.conf are now entirely
> fiction. The magic here takes those, then looks up the corresponding
> url (againg from nigthly.conf) and then uses get_remote_name to figure
> out the appropriate git remote in the local repo. Or complain and quit
> if it doesn't exist. My drm-tip now has an "origin" remote pointing at
> Linus' repo, while the "origin" from nightly.conf gets remapped to
> "drm-tip". Sample output from running rebuild-nightly:
>
> Updating rerere cache and nightly.conf... Done.
> Fetching drm-intel (as danvet) ... Done.
> Fetching drm-upstream (as airlied) ... Done.
> Fetching sound-upstream (as takashi) ... Done.
> Merging drm-intel/drm-intel-fixes... Reset. Done.
> Merging drm-upstream/drm-fixes... Fast-forward. Done.
> Merging drm-intel/drm-intel-next-fixes... Fast-forward. Done.
> ...
>
> Cheers, Daniel

-- 
Jani Nikula, Intel Open Source Technology Center
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply	[flat|nested] 26+ messages in thread

end of thread, other threads:[~2016-10-19  7:10 UTC | newest]

Thread overview: 26+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
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
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

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.