* [maintainer-tools RFC PATCH 00/17] dim: function based subcommand handling
@ 2016-01-26 14:32 Jani Nikula
2016-01-26 14:32 ` [maintainer-tools RFC PATCH 01/17] dim: rename dim_push to dim_push_branch Jani Nikula
` (17 more replies)
0 siblings, 18 replies; 20+ messages in thread
From: Jani Nikula @ 2016-01-26 14:32 UTC (permalink / raw)
To: intel-gfx; +Cc: jani.nikula
I propose to change the dim tool to handle subcommands via functions
matching the subcommand. Each 'dim sub-command' would be handled by a
function named dim_sub_command. Only functions handling subcommands
would have the dim_ prefix.
Patches 1-11 are mostly renames to follow the proposed naming scheme.
Patch 12 separates handling of aliases to an independent piece of code.
Patch 13 actually starts handling subcommands via the defined
functions. Some of the benefits of the approach are covered in the
commit message.
Patches 14-17 starts abstracting subcommand cases to functions. This is
mostly mechanical work, and I didn't bother with it until I get an ack
on the approach.
I've only tested this lightly, thus RFC.
BR,
Jani.
Jani Nikula (17):
dim: rename dim_push to dim_push_branch
dim: rename dim_apply to dim_apply_branch
dim: rename dim_co to dim_checkout
dim: rename dim_shell_checkpatch to shell_checkpatch
dim: rename dim_checkpatch to checkpatch_commit
dim: rename dim_checkrange to dim_checkpatch
dim: rename setup_dim to dim_setup
dim: rename create_workdir to dim_create_workdir
dim: rename update_nightly to dim_rebuild_nightly
dim: rename magic_patch to dim_magic_patch
dim: move dim_pull_request parameter check to the function
dim: separate handling of aliases
dim: handle subcommands through functions
dim: abstract dim_nightly_forget
dim: abstract dim_update_branches
dim: abstract dim_for_each_workdirs
dim: abstract dim_push_*
dim | 239 ++++++++++++++++++++++++++++++++++++--------------------------------
1 file changed, 128 insertions(+), 111 deletions(-)
--
2.1.4
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply [flat|nested] 20+ messages in thread
* [maintainer-tools RFC PATCH 01/17] dim: rename dim_push to dim_push_branch
2016-01-26 14:32 [maintainer-tools RFC PATCH 00/17] dim: function based subcommand handling Jani Nikula
@ 2016-01-26 14:32 ` Jani Nikula
2016-01-26 14:32 ` [maintainer-tools RFC PATCH 02/17] dim: rename dim_apply to dim_apply_branch Jani Nikula
` (16 subsequent siblings)
17 siblings, 0 replies; 20+ messages in thread
From: Jani Nikula @ 2016-01-26 14:32 UTC (permalink / raw)
To: intel-gfx; +Cc: jani.nikula
Rename to match the subcommand name. Move error checking to the function
too.
Signed-off-by: Jani Nikula <jani.nikula@intel.com>
---
dim | 19 ++++++++++---------
1 file changed, 10 insertions(+), 9 deletions(-)
diff --git a/dim b/dim
index c749cebd1187..dbb69d993c44 100755
--- a/dim
+++ b/dim
@@ -346,8 +346,13 @@ function update_nightly
# push branch $1, rebuild nightly. the rest of the arguments are passed to git
# push.
-function dim_push
+function dim_push_branch
{
+ if [[ "x$1" = "x" ]]; then
+ echo "usage: $0 $subcommand branch"
+ exit 1
+ fi
+
branch=$1
shift
@@ -763,20 +768,16 @@ case "$subcommand" in
cat > `cat .fixup_file_path`
;;
push-branch)
- if [[ "x$1" = "x" ]]; then
- echo "usage: $0 $subcommand branch"
- exit 1
- fi
- dim_push "$@"
+ dim_push_branch "$@"
;;
push-queued|pq)
- dim_push drm-intel-next-queued "$@"
+ dim_push_branch drm-intel-next-queued "$@"
;;
push-next-fixes|pnf)
- dim_push drm-intel-next-fixes "$@"
+ dim_push_branch drm-intel-next-fixes "$@"
;;
push-fixes|pf)
- dim_push drm-intel-fixes "$@"
+ dim_push_branch drm-intel-fixes "$@"
;;
checkout|co)
if [[ "x$1" = "x" ]]; then
--
2.1.4
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply related [flat|nested] 20+ messages in thread
* [maintainer-tools RFC PATCH 02/17] dim: rename dim_apply to dim_apply_branch
2016-01-26 14:32 [maintainer-tools RFC PATCH 00/17] dim: function based subcommand handling Jani Nikula
2016-01-26 14:32 ` [maintainer-tools RFC PATCH 01/17] dim: rename dim_push to dim_push_branch Jani Nikula
@ 2016-01-26 14:32 ` Jani Nikula
2016-01-26 14:32 ` [maintainer-tools RFC PATCH 03/17] dim: rename dim_co to dim_checkout Jani Nikula
` (15 subsequent siblings)
17 siblings, 0 replies; 20+ messages in thread
From: Jani Nikula @ 2016-01-26 14:32 UTC (permalink / raw)
To: intel-gfx; +Cc: jani.nikula
Rename to match the subcommand name.
Signed-off-by: Jani Nikula <jani.nikula@intel.com>
---
dim | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/dim b/dim
index dbb69d993c44..5a074979055d 100755
--- a/dim
+++ b/dim
@@ -366,7 +366,7 @@ function dim_push_branch
# ensure we're on branch $1, and apply patches. the rest of the arguments are
# passed to git am.
-function dim_apply
+function dim_apply_branch
{
local branch=$1
shift
@@ -796,16 +796,16 @@ case "$subcommand" in
dim_co drm-intel-next-fixes
;;
apply-branch|ab|sob)
- dim_apply "$@"
+ dim_apply_branch "$@"
;;
apply-queued|aq)
- dim_apply drm-intel-next-queued "$@"
+ dim_apply_branch drm-intel-next-queued "$@"
;;
apply-fixes|af)
- dim_apply drm-intel-fixes "$@"
+ dim_apply_branch drm-intel-fixes "$@"
;;
apply-next-fixes|anf)
- dim_apply drm-intel-next-fixes "$@"
+ dim_apply_branch drm-intel-next-fixes "$@"
;;
apply-resolved|ar)
make -j 20 && git add -u && git am --resolved
--
2.1.4
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply related [flat|nested] 20+ messages in thread
* [maintainer-tools RFC PATCH 03/17] dim: rename dim_co to dim_checkout
2016-01-26 14:32 [maintainer-tools RFC PATCH 00/17] dim: function based subcommand handling Jani Nikula
2016-01-26 14:32 ` [maintainer-tools RFC PATCH 01/17] dim: rename dim_push to dim_push_branch Jani Nikula
2016-01-26 14:32 ` [maintainer-tools RFC PATCH 02/17] dim: rename dim_apply to dim_apply_branch Jani Nikula
@ 2016-01-26 14:32 ` Jani Nikula
2016-01-26 14:32 ` [maintainer-tools RFC PATCH 04/17] dim: rename dim_shell_checkpatch to shell_checkpatch Jani Nikula
` (14 subsequent siblings)
17 siblings, 0 replies; 20+ messages in thread
From: Jani Nikula @ 2016-01-26 14:32 UTC (permalink / raw)
To: intel-gfx; +Cc: jani.nikula
Rename to match the (long) subcommand name. Move error checking to the
function too.
Signed-off-by: Jani Nikula <jani.nikula@intel.com>
---
dim | 23 ++++++++++++-----------
1 file changed, 12 insertions(+), 11 deletions(-)
diff --git a/dim b/dim
index 5a074979055d..22c19e8f5362 100755
--- a/dim
+++ b/dim
@@ -430,8 +430,13 @@ function dim_cd
cd $path
}
-function dim_co
+function dim_checkout
{
+ if [[ "x$1" = "x" ]]; then
+ echo "usage: $0 $subcommand branch"
+ exit 1
+ fi
+
dim_cd $1
if ! git branch | grep $1 > /dev/null ; then
git checkout -t $DIM_DRM_INTEL_REMOTE/$1
@@ -734,14 +739,14 @@ case "$subcommand" in
check_repo_clean $DIM_PREFIX/$DIM_DRM_INTEL Kernel
for branch in $dim_branches ; do
- dim_co $branch
+ dim_checkout $branch
if git diff --quiet $DIM_DRM_INTEL_REMOTE/$branch; then
$DRY git rebase
else
$DRY git rebase -i
fi
done
- dim_co drm-intel-next
+ dim_checkout drm-intel-next
$DRY git reset --hard $DIM_DRM_INTEL_REMOTE/drm-intel-next
# TODO: Restore -nightly merge state from the rerere-cache
# branch
@@ -780,20 +785,16 @@ case "$subcommand" in
dim_push_branch drm-intel-fixes "$@"
;;
checkout|co)
- if [[ "x$1" = "x" ]]; then
- echo "usage: $0 $subcommand branch"
- exit 1
- fi
- dim_co "$@"
+ dim_checkout "$@"
;;
conq)
- dim_co drm-intel-next-queued
+ dim_checkout drm-intel-next-queued
;;
cof)
- dim_co drm-intel-fixes
+ dim_checkout drm-intel-fixes
;;
conf)
- dim_co drm-intel-next-fixes
+ dim_checkout drm-intel-next-fixes
;;
apply-branch|ab|sob)
dim_apply_branch "$@"
--
2.1.4
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply related [flat|nested] 20+ messages in thread
* [maintainer-tools RFC PATCH 04/17] dim: rename dim_shell_checkpatch to shell_checkpatch
2016-01-26 14:32 [maintainer-tools RFC PATCH 00/17] dim: function based subcommand handling Jani Nikula
` (2 preceding siblings ...)
2016-01-26 14:32 ` [maintainer-tools RFC PATCH 03/17] dim: rename dim_co to dim_checkout Jani Nikula
@ 2016-01-26 14:32 ` Jani Nikula
2016-01-26 14:32 ` [maintainer-tools RFC PATCH 05/17] dim: rename dim_checkpatch to checkpatch_commit Jani Nikula
` (13 subsequent siblings)
17 siblings, 0 replies; 20+ messages in thread
From: Jani Nikula @ 2016-01-26 14:32 UTC (permalink / raw)
To: intel-gfx; +Cc: jani.nikula
Drop the dim_ prefix as there's no corresponding subcommand.
Signed-off-by: Jani Nikula <jani.nikula@intel.com>
---
dim | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/dim b/dim
index 22c19e8f5362..b42362a1e56b 100755
--- a/dim
+++ b/dim
@@ -383,7 +383,7 @@ function dim_apply_branch
local message_id=$(message_get_id $file)
- dim_shell_checkpatch "cat $file"
+ shell_checkpatch "cat $file"
cat $file | git am -3 "$@"
@@ -456,7 +456,7 @@ function check_repo_clean
}
# $1 is the shell command to display the patch/commit
-function dim_shell_checkpatch
+function shell_checkpatch
{
local cmd=$1
@@ -473,7 +473,7 @@ function dim_checkpatch
local commit=$1
git --no-pager log --oneline -1 $commit
- dim_shell_checkpatch "git show $commit --pretty=email"
+ shell_checkpatch "git show $commit --pretty=email"
}
function dim_checkrange
--
2.1.4
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply related [flat|nested] 20+ messages in thread
* [maintainer-tools RFC PATCH 05/17] dim: rename dim_checkpatch to checkpatch_commit
2016-01-26 14:32 [maintainer-tools RFC PATCH 00/17] dim: function based subcommand handling Jani Nikula
` (3 preceding siblings ...)
2016-01-26 14:32 ` [maintainer-tools RFC PATCH 04/17] dim: rename dim_shell_checkpatch to shell_checkpatch Jani Nikula
@ 2016-01-26 14:32 ` Jani Nikula
2016-01-26 14:32 ` [maintainer-tools RFC PATCH 06/17] dim: rename dim_checkrange to dim_checkpatch Jani Nikula
` (12 subsequent siblings)
17 siblings, 0 replies; 20+ messages in thread
From: Jani Nikula @ 2016-01-26 14:32 UTC (permalink / raw)
To: intel-gfx; +Cc: jani.nikula
Rename as there's no corresponding subcommand (the check-patch
subcommand does a slightly different thing).
Signed-off-by: Jani Nikula <jani.nikula@intel.com>
---
dim | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/dim b/dim
index b42362a1e56b..6a8521c8c7b9 100755
--- a/dim
+++ b/dim
@@ -468,7 +468,7 @@ function shell_checkpatch
}
# $1 is the git sha1 to check
-function dim_checkpatch
+function checkpatch_commit
{
local commit=$1
@@ -489,7 +489,7 @@ function dim_checkrange
fi
for commit in $(git rev-list --reverse $range); do
- dim_checkpatch $commit || true
+ checkpatch_commit $commit || true
done
}
@@ -810,7 +810,7 @@ case "$subcommand" in
;;
apply-resolved|ar)
make -j 20 && git add -u && git am --resolved
- dim_checkpatch HEAD
+ checkpatch_commit HEAD
git commit --amend &
;;
apply-igt|ai)
--
2.1.4
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply related [flat|nested] 20+ messages in thread
* [maintainer-tools RFC PATCH 06/17] dim: rename dim_checkrange to dim_checkpatch
2016-01-26 14:32 [maintainer-tools RFC PATCH 00/17] dim: function based subcommand handling Jani Nikula
` (4 preceding siblings ...)
2016-01-26 14:32 ` [maintainer-tools RFC PATCH 05/17] dim: rename dim_checkpatch to checkpatch_commit Jani Nikula
@ 2016-01-26 14:32 ` Jani Nikula
2016-01-26 14:32 ` [maintainer-tools RFC PATCH 07/17] dim: rename setup_dim to dim_setup Jani Nikula
` (11 subsequent siblings)
17 siblings, 0 replies; 20+ messages in thread
From: Jani Nikula @ 2016-01-26 14:32 UTC (permalink / raw)
To: intel-gfx; +Cc: jani.nikula
Rename to match the subcommand. Also add checkpatch subcommand (without
the hyphen) to match the spelling of the tool.
Signed-off-by: Jani Nikula <jani.nikula@intel.com>
---
dim | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/dim b/dim
index 6a8521c8c7b9..012353112a3b 100755
--- a/dim
+++ b/dim
@@ -476,7 +476,7 @@ function checkpatch_commit
shell_checkpatch "git show $commit --pretty=email"
}
-function dim_checkrange
+function dim_checkpatch
{
local range
@@ -846,8 +846,8 @@ case "$subcommand" in
git log -1 $sha1 "--pretty=format:Fixes: %H (\"%s\")%n" | \
sed -e 's/\([0-f]\{12\}\)[0-f]*/\1/'
;;
- check-patch|cp)
- dim_checkrange $@
+ checkpatch|check-patch|cp)
+ dim_checkpatch $@
;;
cherry-pick)
if [[ "x$1" = "x" ]]; then
--
2.1.4
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply related [flat|nested] 20+ messages in thread
* [maintainer-tools RFC PATCH 07/17] dim: rename setup_dim to dim_setup
2016-01-26 14:32 [maintainer-tools RFC PATCH 00/17] dim: function based subcommand handling Jani Nikula
` (5 preceding siblings ...)
2016-01-26 14:32 ` [maintainer-tools RFC PATCH 06/17] dim: rename dim_checkrange to dim_checkpatch Jani Nikula
@ 2016-01-26 14:32 ` Jani Nikula
2016-01-26 14:32 ` [maintainer-tools RFC PATCH 08/17] dim: rename create_workdir to dim_create_workdir Jani Nikula
` (10 subsequent siblings)
17 siblings, 0 replies; 20+ messages in thread
From: Jani Nikula @ 2016-01-26 14:32 UTC (permalink / raw)
To: intel-gfx; +Cc: jani.nikula
Rename to match the subcommand.
Signed-off-by: Jani Nikula <jani.nikula@intel.com>
---
dim | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/dim b/dim
index 012353112a3b..0b02c9c0effe 100755
--- a/dim
+++ b/dim
@@ -615,7 +615,7 @@ function dim_pull_request
"$addr_drm_maintainer"
}
-function setup_dim
+function dim_setup
{
if [ ! -d $DIM_PREFIX ]; then
echo "please set up your repository directory with:"
@@ -724,7 +724,7 @@ function assert_branch
case "$subcommand" in
setup)
- setup_dim
+ dim_setup
;;
nightly-forget)
cd $DIM_PREFIX/drm-intel-nightly
--
2.1.4
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply related [flat|nested] 20+ messages in thread
* [maintainer-tools RFC PATCH 08/17] dim: rename create_workdir to dim_create_workdir
2016-01-26 14:32 [maintainer-tools RFC PATCH 00/17] dim: function based subcommand handling Jani Nikula
` (6 preceding siblings ...)
2016-01-26 14:32 ` [maintainer-tools RFC PATCH 07/17] dim: rename setup_dim to dim_setup Jani Nikula
@ 2016-01-26 14:32 ` Jani Nikula
2016-01-26 14:32 ` [maintainer-tools RFC PATCH 09/17] dim: rename update_nightly to dim_rebuild_nightly Jani Nikula
` (9 subsequent siblings)
17 siblings, 0 replies; 20+ messages in thread
From: Jani Nikula @ 2016-01-26 14:32 UTC (permalink / raw)
To: intel-gfx; +Cc: jani.nikula
Add dim_ prefix to functions corresponding to subcommands.
Signed-off-by: Jani Nikula <jani.nikula@intel.com>
---
dim | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/dim b/dim
index 0b02c9c0effe..3ddbb728a044 100755
--- a/dim
+++ b/dim
@@ -545,7 +545,7 @@ function prep_pull_mail
prep_pull_mail_signature >> ~/tmp/dim-pull-request
}
-function create_workdir
+function dim_create_workdir
{
cd $DIM_PREFIX
local branches
@@ -753,7 +753,7 @@ case "$subcommand" in
update_rerere_cache
;;
create-workdir)
- create_workdir $1
+ dim_create_workdir $1
;;
for-each-workdirs|fw)
cd $DIM_PREFIX/$DIM_DRM_INTEL
--
2.1.4
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply related [flat|nested] 20+ messages in thread
* [maintainer-tools RFC PATCH 09/17] dim: rename update_nightly to dim_rebuild_nightly
2016-01-26 14:32 [maintainer-tools RFC PATCH 00/17] dim: function based subcommand handling Jani Nikula
` (7 preceding siblings ...)
2016-01-26 14:32 ` [maintainer-tools RFC PATCH 08/17] dim: rename create_workdir to dim_create_workdir Jani Nikula
@ 2016-01-26 14:32 ` Jani Nikula
2016-01-26 14:32 ` [maintainer-tools RFC PATCH 10/17] dim: rename magic_patch to dim_magic_patch Jani Nikula
` (8 subsequent siblings)
17 siblings, 0 replies; 20+ messages in thread
From: Jani Nikula @ 2016-01-26 14:32 UTC (permalink / raw)
To: intel-gfx; +Cc: jani.nikula
Rename to match the subcommand name.
Signed-off-by: Jani Nikula <jani.nikula@intel.com>
---
dim | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/dim b/dim
index 3ddbb728a044..c72f58302bae 100755
--- a/dim
+++ b/dim
@@ -231,7 +231,7 @@ function update_rerere_cache
cd -
}
-function update_nightly
+function dim_rebuild_nightly
{
local integration_branch=drm-intel-nightly
local specfile=`mktemp`
@@ -360,7 +360,7 @@ function dim_push_branch
git push $DRY_RUN $DIM_DRM_INTEL_REMOTE $branch "$@"
- update_nightly
+ dim_rebuild_nightly
update_linux_next
}
@@ -766,7 +766,7 @@ case "$subcommand" in
done
;;
rebuild-nightly)
- update_nightly
+ dim_rebuild_nightly
;;
cat-to-fixup)
cd $DIM_PREFIX/drm-intel-nightly
--
2.1.4
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply related [flat|nested] 20+ messages in thread
* [maintainer-tools RFC PATCH 10/17] dim: rename magic_patch to dim_magic_patch
2016-01-26 14:32 [maintainer-tools RFC PATCH 00/17] dim: function based subcommand handling Jani Nikula
` (8 preceding siblings ...)
2016-01-26 14:32 ` [maintainer-tools RFC PATCH 09/17] dim: rename update_nightly to dim_rebuild_nightly Jani Nikula
@ 2016-01-26 14:32 ` Jani Nikula
2016-01-26 14:32 ` [maintainer-tools RFC PATCH 11/17] dim: move dim_pull_request parameter check to the function Jani Nikula
` (7 subsequent siblings)
17 siblings, 0 replies; 20+ messages in thread
From: Jani Nikula @ 2016-01-26 14:32 UTC (permalink / raw)
To: intel-gfx; +Cc: jani.nikula
Add dim_ prefix to functions corresponding to subcommands.
Signed-off-by: Jani Nikula <jani.nikula@intel.com>
---
dim | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/dim b/dim
index c72f58302bae..b9152a256a26 100755
--- a/dim
+++ b/dim
@@ -396,7 +396,7 @@ function dim_apply_branch
eval $DRY $DIM_POST_APPLY_ACTION
}
-function magic_patch
+function dim_magic_patch
{
if [[ "$1" = "-a" ]]; then
cd `cat ~/.dim-last-path`
@@ -818,7 +818,7 @@ case "$subcommand" in
git am --whitespace=fix -3 -s
;;
magic-patch|mp)
- magic_patch "$@"
+ dim_magic_patch "$@"
;;
magic-rebase-resolve|mrr)
git diff HEAD | patch -p1 -R
--
2.1.4
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply related [flat|nested] 20+ messages in thread
* [maintainer-tools RFC PATCH 11/17] dim: move dim_pull_request parameter check to the function
2016-01-26 14:32 [maintainer-tools RFC PATCH 00/17] dim: function based subcommand handling Jani Nikula
` (9 preceding siblings ...)
2016-01-26 14:32 ` [maintainer-tools RFC PATCH 10/17] dim: rename magic_patch to dim_magic_patch Jani Nikula
@ 2016-01-26 14:32 ` Jani Nikula
2016-01-26 14:32 ` [maintainer-tools RFC PATCH 12/17] dim: separate handling of aliases Jani Nikula
` (6 subsequent siblings)
17 siblings, 0 replies; 20+ messages in thread
From: Jani Nikula @ 2016-01-26 14:32 UTC (permalink / raw)
To: intel-gfx; +Cc: jani.nikula
More abstraction is better, also guards against invalid internal use.
Signed-off-by: Jani Nikula <jani.nikula@intel.com>
---
dim | 9 +++++----
1 file changed, 5 insertions(+), 4 deletions(-)
diff --git a/dim b/dim
index b9152a256a26..34f2312be37a 100755
--- a/dim
+++ b/dim
@@ -581,6 +581,11 @@ function dim_create_workdir
# dim_pull_request branch upstream
function dim_pull_request
{
+ if [[ "x$1" = "x" || "x$2" = "x" ]]; then
+ echo "usage: $0 $subcommand branch upstream"
+ exit 1
+ fi
+
branch=$1
upstream=$2
@@ -864,10 +869,6 @@ case "$subcommand" in
$DRY git cherry-pick $1
;;
pull-request)
- if [[ "x$1" = "x" || "x$2" = "x" ]]; then
- echo "usage: $0 $subcommand branch upstream"
- exit 1
- fi
dim_pull_request $*
;;
pull-request-next)
--
2.1.4
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply related [flat|nested] 20+ messages in thread
* [maintainer-tools RFC PATCH 12/17] dim: separate handling of aliases
2016-01-26 14:32 [maintainer-tools RFC PATCH 00/17] dim: function based subcommand handling Jani Nikula
` (10 preceding siblings ...)
2016-01-26 14:32 ` [maintainer-tools RFC PATCH 11/17] dim: move dim_pull_request parameter check to the function Jani Nikula
@ 2016-01-26 14:32 ` Jani Nikula
2016-01-26 15:56 ` Daniel Vetter
2016-01-26 14:32 ` [maintainer-tools RFC PATCH 13/17] dim: handle subcommands through functions Jani Nikula
` (5 subsequent siblings)
17 siblings, 1 reply; 20+ messages in thread
From: Jani Nikula @ 2016-01-26 14:32 UTC (permalink / raw)
To: intel-gfx; +Cc: jani.nikula
---
dim | 50 +++++++++++++++++++++++++++++++++++---------------
1 file changed, 35 insertions(+), 15 deletions(-)
diff --git a/dim b/dim
index 34f2312be37a..b336c2c7d939 100755
--- a/dim
+++ b/dim
@@ -727,7 +727,27 @@ function assert_branch
fi
}
+# handle aliases
case "$subcommand" in
+ ab|sob) subcmd=apply-branch;;
+ af) subcmd=apply-fixes;;
+ ai) subcmd=apply-igt;;
+ anf) subcmd=apply-next-fixes;;
+ aq) subcmd=apply-queued;;
+ ar) subcmd=apply-resolved;;
+ check-patch|cp) subcmd=checkpatch;;
+ co) subcmd=checkout;;
+ fw) subcmd=for-each-workdirs;;
+ mp) subcmd=magic-patch;;
+ mrr) subcmd=magic-rebase-resolve;;
+ pf) subcmd=push-fixes;;
+ pnf) subcmd=push-next-fixes;;
+ pq) subcmd=push-queued;;
+ ub) subcmd=update-branches;;
+ *) subcmd="$subcommand";;
+esac
+
+case "$subcmd" in
setup)
dim_setup
;;
@@ -738,7 +758,7 @@ case "$subcommand" in
git merge origin/drm-intel-fixes
git rerere forget
;;
- update-branches|ub)
+ update-branches)
cd $DIM_PREFIX/$DIM_DRM_INTEL
git fetch $DIM_DRM_INTEL_REMOTE
check_repo_clean $DIM_PREFIX/$DIM_DRM_INTEL Kernel
@@ -760,7 +780,7 @@ case "$subcommand" in
create-workdir)
dim_create_workdir $1
;;
- for-each-workdirs|fw)
+ for-each-workdirs)
cd $DIM_PREFIX/$DIM_DRM_INTEL
$@
for branch in $dim_branches ; do
@@ -780,16 +800,16 @@ case "$subcommand" in
push-branch)
dim_push_branch "$@"
;;
- push-queued|pq)
+ push-queued)
dim_push_branch drm-intel-next-queued "$@"
;;
- push-next-fixes|pnf)
+ push-next-fixes)
dim_push_branch drm-intel-next-fixes "$@"
;;
- push-fixes|pf)
+ push-fixes)
dim_push_branch drm-intel-fixes "$@"
;;
- checkout|co)
+ checkout)
dim_checkout "$@"
;;
conq)
@@ -801,31 +821,31 @@ case "$subcommand" in
conf)
dim_checkout drm-intel-next-fixes
;;
- apply-branch|ab|sob)
+ apply-branch)
dim_apply_branch "$@"
;;
- apply-queued|aq)
+ apply-queued)
dim_apply_branch drm-intel-next-queued "$@"
;;
- apply-fixes|af)
+ apply-fixes)
dim_apply_branch drm-intel-fixes "$@"
;;
- apply-next-fixes|anf)
+ apply-next-fixes)
dim_apply_branch drm-intel-next-fixes "$@"
;;
- apply-resolved|ar)
+ apply-resolved)
make -j 20 && git add -u && git am --resolved
checkpatch_commit HEAD
git commit --amend &
;;
- apply-igt|ai)
+ apply-igt)
cd ~/xorg/intel-gpu-tools/
git am --whitespace=fix -3 -s
;;
- magic-patch|mp)
+ magic-patch)
dim_magic_patch "$@"
;;
- magic-rebase-resolve|mrr)
+ magic-rebase-resolve)
git diff HEAD | patch -p1 -R
cat .git/rebase-merge/patch | dim mp
make -j 20
@@ -851,7 +871,7 @@ case "$subcommand" in
git log -1 $sha1 "--pretty=format:Fixes: %H (\"%s\")%n" | \
sed -e 's/\([0-f]\{12\}\)[0-f]*/\1/'
;;
- checkpatch|check-patch|cp)
+ checkpatch)
dim_checkpatch $@
;;
cherry-pick)
--
2.1.4
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply related [flat|nested] 20+ messages in thread
* [maintainer-tools RFC PATCH 13/17] dim: handle subcommands through functions
2016-01-26 14:32 [maintainer-tools RFC PATCH 00/17] dim: function based subcommand handling Jani Nikula
` (11 preceding siblings ...)
2016-01-26 14:32 ` [maintainer-tools RFC PATCH 12/17] dim: separate handling of aliases Jani Nikula
@ 2016-01-26 14:32 ` Jani Nikula
2016-01-26 14:32 ` [maintainer-tools RFC PATCH 14/17] dim: abstract dim_nightly_forget Jani Nikula
` (4 subsequent siblings)
17 siblings, 0 replies; 20+ messages in thread
From: Jani Nikula @ 2016-01-26 14:32 UTC (permalink / raw)
To: intel-gfx; +Cc: jani.nikula
If there's a dim_ prefixed function matching the subcommand, call it to
handle the subcommand without going through the big switch case.
Drop the cases which already match the convention. Once all the cases
are converted to functions, the handling of subcommands becomes much
cleaner.
This also allows extending of dim by the user via functions declared
outside of dim. The current aliases could also be made the user's
responsibility to define as the user wishes (the user could define dim_
prefixed functions in the dimrc).
Signed-off-by: Jani Nikula <jani.nikula@intel.com>
---
dim | 36 +++++++++---------------------------
1 file changed, 9 insertions(+), 27 deletions(-)
diff --git a/dim b/dim
index b336c2c7d939..1af2163a5001 100755
--- a/dim
+++ b/dim
@@ -747,10 +747,16 @@ case "$subcommand" in
*) subcmd="$subcommand";;
esac
+# if there's a function by the subcommand name, call it
+subcmd_func=dim_${subcmd//-/_}
+if declare -f $subcmd_func >/dev/null; then
+ $subcmd_func "$@"
+ exit 0
+fi
+
+# XXX: abscract each case to a dim_ prefixed function, and turn the help|*) case
+# into an else branch in the above check for functions.
case "$subcmd" in
- setup)
- dim_setup
- ;;
nightly-forget)
cd $DIM_PREFIX/drm-intel-nightly
git fetch origin >& /dev/null
@@ -777,9 +783,6 @@ case "$subcmd" in
# branch
update_rerere_cache
;;
- create-workdir)
- dim_create_workdir $1
- ;;
for-each-workdirs)
cd $DIM_PREFIX/$DIM_DRM_INTEL
$@
@@ -790,16 +793,10 @@ case "$subcmd" in
fi
done
;;
- rebuild-nightly)
- dim_rebuild_nightly
- ;;
cat-to-fixup)
cd $DIM_PREFIX/drm-intel-nightly
cat > `cat .fixup_file_path`
;;
- push-branch)
- dim_push_branch "$@"
- ;;
push-queued)
dim_push_branch drm-intel-next-queued "$@"
;;
@@ -809,9 +806,6 @@ case "$subcmd" in
push-fixes)
dim_push_branch drm-intel-fixes "$@"
;;
- checkout)
- dim_checkout "$@"
- ;;
conq)
dim_checkout drm-intel-next-queued
;;
@@ -821,9 +815,6 @@ case "$subcmd" in
conf)
dim_checkout drm-intel-next-fixes
;;
- apply-branch)
- dim_apply_branch "$@"
- ;;
apply-queued)
dim_apply_branch drm-intel-next-queued "$@"
;;
@@ -842,9 +833,6 @@ case "$subcmd" in
cd ~/xorg/intel-gpu-tools/
git am --whitespace=fix -3 -s
;;
- magic-patch)
- dim_magic_patch "$@"
- ;;
magic-rebase-resolve)
git diff HEAD | patch -p1 -R
cat .git/rebase-merge/patch | dim mp
@@ -871,9 +859,6 @@ case "$subcmd" in
git log -1 $sha1 "--pretty=format:Fixes: %H (\"%s\")%n" | \
sed -e 's/\([0-f]\{12\}\)[0-f]*/\1/'
;;
- checkpatch)
- dim_checkpatch $@
- ;;
cherry-pick)
if [[ "x$1" = "x" ]]; then
echo "usage: $0 $subcommand commit-ish"
@@ -888,9 +873,6 @@ case "$subcmd" in
git log --grep=$sha_short --pretty=oneline $sha..$DIM_DRM_INTEL_REMOTE/drm-intel-nightly
$DRY git cherry-pick $1
;;
- pull-request)
- dim_pull_request $*
- ;;
pull-request-next)
upstream=${1:-$DIM_DRM_UPSTREAM_REMOTE/drm-next}
dim_pull_request drm-intel-next $upstream
--
2.1.4
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply related [flat|nested] 20+ messages in thread
* [maintainer-tools RFC PATCH 14/17] dim: abstract dim_nightly_forget
2016-01-26 14:32 [maintainer-tools RFC PATCH 00/17] dim: function based subcommand handling Jani Nikula
` (12 preceding siblings ...)
2016-01-26 14:32 ` [maintainer-tools RFC PATCH 13/17] dim: handle subcommands through functions Jani Nikula
@ 2016-01-26 14:32 ` Jani Nikula
2016-01-26 14:32 ` [maintainer-tools RFC PATCH 15/17] dim: abstract dim_update_branches Jani Nikula
` (3 subsequent siblings)
17 siblings, 0 replies; 20+ messages in thread
From: Jani Nikula @ 2016-01-26 14:32 UTC (permalink / raw)
To: intel-gfx; +Cc: jani.nikula
Signed-off-by: Jani Nikula <jani.nikula@intel.com>
---
dim | 16 +++++++++-------
1 file changed, 9 insertions(+), 7 deletions(-)
diff --git a/dim b/dim
index 1af2163a5001..b50656cf80a0 100755
--- a/dim
+++ b/dim
@@ -344,6 +344,15 @@ function dim_rebuild_nightly
}
+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
@@ -757,13 +766,6 @@ fi
# XXX: abscract each case to a dim_ prefixed function, and turn the help|*) case
# into an else branch in the above check for functions.
case "$subcmd" in
- 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
- ;;
update-branches)
cd $DIM_PREFIX/$DIM_DRM_INTEL
git fetch $DIM_DRM_INTEL_REMOTE
--
2.1.4
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply related [flat|nested] 20+ messages in thread
* [maintainer-tools RFC PATCH 15/17] dim: abstract dim_update_branches
2016-01-26 14:32 [maintainer-tools RFC PATCH 00/17] dim: function based subcommand handling Jani Nikula
` (13 preceding siblings ...)
2016-01-26 14:32 ` [maintainer-tools RFC PATCH 14/17] dim: abstract dim_nightly_forget Jani Nikula
@ 2016-01-26 14:32 ` Jani Nikula
2016-01-26 14:32 ` [maintainer-tools RFC PATCH 16/17] dim: abstract dim_for_each_workdirs Jani Nikula
` (2 subsequent siblings)
17 siblings, 0 replies; 20+ messages in thread
From: Jani Nikula @ 2016-01-26 14:32 UTC (permalink / raw)
To: intel-gfx; +Cc: jani.nikula
Signed-off-by: Jani Nikula <jani.nikula@intel.com>
---
dim | 40 +++++++++++++++++++++-------------------
1 file changed, 21 insertions(+), 19 deletions(-)
diff --git a/dim b/dim
index b50656cf80a0..26ab728efb16 100755
--- a/dim
+++ b/dim
@@ -629,6 +629,27 @@ function dim_pull_request
"$addr_drm_maintainer"
}
+function dim_update_branches
+{
+ cd $DIM_PREFIX/$DIM_DRM_INTEL
+ git fetch $DIM_DRM_INTEL_REMOTE
+ check_repo_clean $DIM_PREFIX/$DIM_DRM_INTEL Kernel
+
+ for branch in $dim_branches ; do
+ dim_checkout $branch
+ if git diff --quiet $DIM_DRM_INTEL_REMOTE/$branch; then
+ $DRY git rebase
+ else
+ $DRY git rebase -i
+ fi
+ done
+ dim_checkout drm-intel-next
+ $DRY git reset --hard $DIM_DRM_INTEL_REMOTE/drm-intel-next
+ # TODO: Restore -nightly merge state from the rerere-cache
+ # branch
+ update_rerere_cache
+}
+
function dim_setup
{
if [ ! -d $DIM_PREFIX ]; then
@@ -766,25 +787,6 @@ fi
# XXX: abscract each case to a dim_ prefixed function, and turn the help|*) case
# into an else branch in the above check for functions.
case "$subcmd" in
- update-branches)
- cd $DIM_PREFIX/$DIM_DRM_INTEL
- git fetch $DIM_DRM_INTEL_REMOTE
- check_repo_clean $DIM_PREFIX/$DIM_DRM_INTEL Kernel
-
- for branch in $dim_branches ; do
- dim_checkout $branch
- if git diff --quiet $DIM_DRM_INTEL_REMOTE/$branch; then
- $DRY git rebase
- else
- $DRY git rebase -i
- fi
- done
- dim_checkout drm-intel-next
- $DRY git reset --hard $DIM_DRM_INTEL_REMOTE/drm-intel-next
- # TODO: Restore -nightly merge state from the rerere-cache
- # branch
- update_rerere_cache
- ;;
for-each-workdirs)
cd $DIM_PREFIX/$DIM_DRM_INTEL
$@
--
2.1.4
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply related [flat|nested] 20+ messages in thread
* [maintainer-tools RFC PATCH 16/17] dim: abstract dim_for_each_workdirs
2016-01-26 14:32 [maintainer-tools RFC PATCH 00/17] dim: function based subcommand handling Jani Nikula
` (14 preceding siblings ...)
2016-01-26 14:32 ` [maintainer-tools RFC PATCH 15/17] dim: abstract dim_update_branches Jani Nikula
@ 2016-01-26 14:32 ` Jani Nikula
2016-01-26 14:32 ` [maintainer-tools RFC PATCH 17/17] dim: abstract dim_push_* Jani Nikula
2016-01-26 14:42 ` [maintainer-tools RFC PATCH 00/17] dim: function based subcommand handling Jani Nikula
17 siblings, 0 replies; 20+ messages in thread
From: Jani Nikula @ 2016-01-26 14:32 UTC (permalink / raw)
To: intel-gfx; +Cc: jani.nikula
Signed-off-by: Jani Nikula <jani.nikula@intel.com>
---
dim | 22 ++++++++++++----------
1 file changed, 12 insertions(+), 10 deletions(-)
diff --git a/dim b/dim
index 26ab728efb16..1f51ab9292b1 100755
--- a/dim
+++ b/dim
@@ -587,6 +587,18 @@ function dim_create_workdir
done
}
+function dim_for_each_workdirs
+{
+ cd $DIM_PREFIX/$DIM_DRM_INTEL
+ $@
+ for branch in $dim_branches ; do
+ if [[ -d $DIM_PREFIX/$branch ]] ; then
+ cd $DIM_PREFIX/$branch
+ $@
+ fi
+ done
+}
+
# dim_pull_request branch upstream
function dim_pull_request
{
@@ -787,16 +799,6 @@ fi
# XXX: abscract each case to a dim_ prefixed function, and turn the help|*) case
# into an else branch in the above check for functions.
case "$subcmd" in
- for-each-workdirs)
- cd $DIM_PREFIX/$DIM_DRM_INTEL
- $@
- for branch in $dim_branches ; do
- if [[ -d $DIM_PREFIX/$branch ]] ; then
- cd $DIM_PREFIX/$branch
- $@
- fi
- done
- ;;
cat-to-fixup)
cd $DIM_PREFIX/drm-intel-nightly
cat > `cat .fixup_file_path`
--
2.1.4
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply related [flat|nested] 20+ messages in thread
* [maintainer-tools RFC PATCH 17/17] dim: abstract dim_push_*
2016-01-26 14:32 [maintainer-tools RFC PATCH 00/17] dim: function based subcommand handling Jani Nikula
` (15 preceding siblings ...)
2016-01-26 14:32 ` [maintainer-tools RFC PATCH 16/17] dim: abstract dim_for_each_workdirs Jani Nikula
@ 2016-01-26 14:32 ` Jani Nikula
2016-01-26 14:42 ` [maintainer-tools RFC PATCH 00/17] dim: function based subcommand handling Jani Nikula
17 siblings, 0 replies; 20+ messages in thread
From: Jani Nikula @ 2016-01-26 14:32 UTC (permalink / raw)
To: intel-gfx; +Cc: jani.nikula
Signed-off-by: Jani Nikula <jani.nikula@intel.com>
---
dim | 24 +++++++++++++++---------
1 file changed, 15 insertions(+), 9 deletions(-)
diff --git a/dim b/dim
index 1f51ab9292b1..d5149f01db34 100755
--- a/dim
+++ b/dim
@@ -373,6 +373,21 @@ function dim_push_branch
update_linux_next
}
+function dim_push_queued
+{
+ dim_push_branch drm-intel-next-queued "$@"
+}
+
+function dim_push_next_fixes
+{
+ dim_push_branch drm-intel-next-fixes "$@"
+}
+
+function dim_push_fixes
+{
+ dim_push_branch drm-intel-fixes "$@"
+}
+
# ensure we're on branch $1, and apply patches. the rest of the arguments are
# passed to git am.
function dim_apply_branch
@@ -803,15 +818,6 @@ case "$subcmd" in
cd $DIM_PREFIX/drm-intel-nightly
cat > `cat .fixup_file_path`
;;
- push-queued)
- dim_push_branch drm-intel-next-queued "$@"
- ;;
- push-next-fixes)
- dim_push_branch drm-intel-next-fixes "$@"
- ;;
- push-fixes)
- dim_push_branch drm-intel-fixes "$@"
- ;;
conq)
dim_checkout drm-intel-next-queued
;;
--
2.1.4
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply related [flat|nested] 20+ messages in thread
* Re: [maintainer-tools RFC PATCH 00/17] dim: function based subcommand handling
2016-01-26 14:32 [maintainer-tools RFC PATCH 00/17] dim: function based subcommand handling Jani Nikula
` (16 preceding siblings ...)
2016-01-26 14:32 ` [maintainer-tools RFC PATCH 17/17] dim: abstract dim_push_* Jani Nikula
@ 2016-01-26 14:42 ` Jani Nikula
17 siblings, 0 replies; 20+ messages in thread
From: Jani Nikula @ 2016-01-26 14:42 UTC (permalink / raw)
To: intel-gfx
On Tue, 26 Jan 2016, Jani Nikula <jani.nikula@intel.com> wrote:
> Patches 14-17 starts abstracting subcommand cases to functions. This is
> mostly mechanical work, and I didn't bother with it until I get an ack
> on the approach.
I mean, I didn't bother with convering *all* of the functions yet.
BR,
Jani.
--
Jani Nikula, Intel Open Source Technology Center
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply [flat|nested] 20+ messages in thread
* Re: [maintainer-tools RFC PATCH 12/17] dim: separate handling of aliases
2016-01-26 14:32 ` [maintainer-tools RFC PATCH 12/17] dim: separate handling of aliases Jani Nikula
@ 2016-01-26 15:56 ` Daniel Vetter
0 siblings, 0 replies; 20+ messages in thread
From: Daniel Vetter @ 2016-01-26 15:56 UTC (permalink / raw)
To: Jani Nikula; +Cc: intel-gfx
On Tue, Jan 26, 2016 at 04:32:25PM +0200, Jani Nikula wrote:
> ---
> dim | 50 +++++++++++++++++++++++++++++++++++---------------
> 1 file changed, 35 insertions(+), 15 deletions(-)
>
> diff --git a/dim b/dim
> index 34f2312be37a..b336c2c7d939 100755
> --- a/dim
> +++ b/dim
> @@ -727,7 +727,27 @@ function assert_branch
> fi
> }
>
> +# handle aliases
> case "$subcommand" in
> + ab|sob) subcmd=apply-branch;;
> + af) subcmd=apply-fixes;;
> + ai) subcmd=apply-igt;;
> + anf) subcmd=apply-next-fixes;;
> + aq) subcmd=apply-queued;;
> + ar) subcmd=apply-resolved;;
> + check-patch|cp) subcmd=checkpatch;;
> + co) subcmd=checkout;;
> + fw) subcmd=for-each-workdirs;;
> + mp) subcmd=magic-patch;;
> + mrr) subcmd=magic-rebase-resolve;;
> + pf) subcmd=push-fixes;;
> + pnf) subcmd=push-next-fixes;;
> + pq) subcmd=push-queued;;
> + ub) subcmd=update-branches;;
> + *) subcmd="$subcommand";;
> +esac
This is a bit unfortunate imo since it separates the aliases from the
functions. Could we do something like:
local af=apply-fixes
right next to the dim_apply_fixes function to group them together again?
Just and idea, haven't tried to make the bash-foo for this work.
Otherwise I really like this, ACK on the entire series/concept.
-Daniel
> +
> +case "$subcmd" in
> setup)
> dim_setup
> ;;
> @@ -738,7 +758,7 @@ case "$subcommand" in
> git merge origin/drm-intel-fixes
> git rerere forget
> ;;
> - update-branches|ub)
> + update-branches)
> cd $DIM_PREFIX/$DIM_DRM_INTEL
> git fetch $DIM_DRM_INTEL_REMOTE
> check_repo_clean $DIM_PREFIX/$DIM_DRM_INTEL Kernel
> @@ -760,7 +780,7 @@ case "$subcommand" in
> create-workdir)
> dim_create_workdir $1
> ;;
> - for-each-workdirs|fw)
> + for-each-workdirs)
> cd $DIM_PREFIX/$DIM_DRM_INTEL
> $@
> for branch in $dim_branches ; do
> @@ -780,16 +800,16 @@ case "$subcommand" in
> push-branch)
> dim_push_branch "$@"
> ;;
> - push-queued|pq)
> + push-queued)
> dim_push_branch drm-intel-next-queued "$@"
> ;;
> - push-next-fixes|pnf)
> + push-next-fixes)
> dim_push_branch drm-intel-next-fixes "$@"
> ;;
> - push-fixes|pf)
> + push-fixes)
> dim_push_branch drm-intel-fixes "$@"
> ;;
> - checkout|co)
> + checkout)
> dim_checkout "$@"
> ;;
> conq)
> @@ -801,31 +821,31 @@ case "$subcommand" in
> conf)
> dim_checkout drm-intel-next-fixes
> ;;
> - apply-branch|ab|sob)
> + apply-branch)
> dim_apply_branch "$@"
> ;;
> - apply-queued|aq)
> + apply-queued)
> dim_apply_branch drm-intel-next-queued "$@"
> ;;
> - apply-fixes|af)
> + apply-fixes)
> dim_apply_branch drm-intel-fixes "$@"
> ;;
> - apply-next-fixes|anf)
> + apply-next-fixes)
> dim_apply_branch drm-intel-next-fixes "$@"
> ;;
> - apply-resolved|ar)
> + apply-resolved)
> make -j 20 && git add -u && git am --resolved
> checkpatch_commit HEAD
> git commit --amend &
> ;;
> - apply-igt|ai)
> + apply-igt)
> cd ~/xorg/intel-gpu-tools/
> git am --whitespace=fix -3 -s
> ;;
> - magic-patch|mp)
> + magic-patch)
> dim_magic_patch "$@"
> ;;
> - magic-rebase-resolve|mrr)
> + magic-rebase-resolve)
> git diff HEAD | patch -p1 -R
> cat .git/rebase-merge/patch | dim mp
> make -j 20
> @@ -851,7 +871,7 @@ case "$subcommand" in
> git log -1 $sha1 "--pretty=format:Fixes: %H (\"%s\")%n" | \
> sed -e 's/\([0-f]\{12\}\)[0-f]*/\1/'
> ;;
> - checkpatch|check-patch|cp)
> + checkpatch)
> dim_checkpatch $@
> ;;
> cherry-pick)
> --
> 2.1.4
>
--
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply [flat|nested] 20+ messages in thread
end of thread, other threads:[~2016-01-26 15:56 UTC | newest]
Thread overview: 20+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-01-26 14:32 [maintainer-tools RFC PATCH 00/17] dim: function based subcommand handling Jani Nikula
2016-01-26 14:32 ` [maintainer-tools RFC PATCH 01/17] dim: rename dim_push to dim_push_branch Jani Nikula
2016-01-26 14:32 ` [maintainer-tools RFC PATCH 02/17] dim: rename dim_apply to dim_apply_branch Jani Nikula
2016-01-26 14:32 ` [maintainer-tools RFC PATCH 03/17] dim: rename dim_co to dim_checkout Jani Nikula
2016-01-26 14:32 ` [maintainer-tools RFC PATCH 04/17] dim: rename dim_shell_checkpatch to shell_checkpatch Jani Nikula
2016-01-26 14:32 ` [maintainer-tools RFC PATCH 05/17] dim: rename dim_checkpatch to checkpatch_commit Jani Nikula
2016-01-26 14:32 ` [maintainer-tools RFC PATCH 06/17] dim: rename dim_checkrange to dim_checkpatch Jani Nikula
2016-01-26 14:32 ` [maintainer-tools RFC PATCH 07/17] dim: rename setup_dim to dim_setup Jani Nikula
2016-01-26 14:32 ` [maintainer-tools RFC PATCH 08/17] dim: rename create_workdir to dim_create_workdir Jani Nikula
2016-01-26 14:32 ` [maintainer-tools RFC PATCH 09/17] dim: rename update_nightly to dim_rebuild_nightly Jani Nikula
2016-01-26 14:32 ` [maintainer-tools RFC PATCH 10/17] dim: rename magic_patch to dim_magic_patch Jani Nikula
2016-01-26 14:32 ` [maintainer-tools RFC PATCH 11/17] dim: move dim_pull_request parameter check to the function Jani Nikula
2016-01-26 14:32 ` [maintainer-tools RFC PATCH 12/17] dim: separate handling of aliases Jani Nikula
2016-01-26 15:56 ` Daniel Vetter
2016-01-26 14:32 ` [maintainer-tools RFC PATCH 13/17] dim: handle subcommands through functions Jani Nikula
2016-01-26 14:32 ` [maintainer-tools RFC PATCH 14/17] dim: abstract dim_nightly_forget Jani Nikula
2016-01-26 14:32 ` [maintainer-tools RFC PATCH 15/17] dim: abstract dim_update_branches Jani Nikula
2016-01-26 14:32 ` [maintainer-tools RFC PATCH 16/17] dim: abstract dim_for_each_workdirs Jani Nikula
2016-01-26 14:32 ` [maintainer-tools RFC PATCH 17/17] dim: abstract dim_push_* Jani Nikula
2016-01-26 14:42 ` [maintainer-tools RFC PATCH 00/17] dim: function based subcommand handling Jani Nikula
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox