* [PATCH] dim: Add status command
@ 2016-11-29 14:31 Daniel Vetter
2016-11-29 16:19 ` Jani Nikula
0 siblings, 1 reply; 2+ messages in thread
From: Daniel Vetter @ 2016-11-29 14:31 UTC (permalink / raw)
To: Intel Graphics Development; +Cc: Daniel Vetter, DRI Development, Daniel Vetter
Useful with our branch proliferation to make sure nothing is stuck (we
now also have drm-misc-next/-next-fixes/-fixes).
v2: Gracefully handle if some remotes arent' there.
Acked-by: seanpaul@chromium.org
Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
---
dim | 22 ++++++++++++++++++++++
dim.rst | 5 +++++
2 files changed, 27 insertions(+)
diff --git a/dim b/dim
index 3dd2d1dec796..b21d1321af09 100755
--- a/dim
+++ b/dim
@@ -1285,6 +1285,28 @@ function dim_update_branches
update_rerere_cache
}
+function dim_status
+{
+ local repo remote drm_remote patches
+
+ cd $DIM_PREFIX/$DIM_DRM_INTEL
+
+ drm_remote=$(url_to_remote $drm_upstream_git)
+
+ for branch in $dim_branches ; do
+ repo=`branch_to_repo $branch`
+ if ! remote=`repo_to_remote $repo` ; then
+ continue
+ fi
+
+ patches=$(git log --oneline $remote/$branch ^origin/master ^$drm_remote/drm-next ^$drm_remote/drm-fixes | wc -l)
+
+ if [[ $patches -ne 0 ]] ; then
+ echo $repo/$branch: $patches unmerged patches
+ fi
+ done
+}
+
function setup_aux_checkout # name url directory
{
local name url dir remote
diff --git a/dim.rst b/dim.rst
index 9a045a43e7b7..0c52ab43e400 100644
--- a/dim.rst
+++ b/dim.rst
@@ -80,6 +80,11 @@ always maintained from the same machine, even if different branches are
maintained on different machines (by different maintainers), there's no need to
run this command.
+status
+------
+
+Lists all branches with unmerged patches, and how many patches are unmerged.
+
rebuild-tip
-----------
Rebuild and push the integration tree.
--
2.10.2
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] dim: Add status command
2016-11-29 14:31 [PATCH] dim: Add status command Daniel Vetter
@ 2016-11-29 16:19 ` Jani Nikula
0 siblings, 0 replies; 2+ messages in thread
From: Jani Nikula @ 2016-11-29 16:19 UTC (permalink / raw)
To: Intel Graphics Development; +Cc: Daniel Vetter, DRI Development, Daniel Vetter
On Tue, 29 Nov 2016, Daniel Vetter <daniel.vetter@ffwll.ch> wrote:
> Useful with our branch proliferation to make sure nothing is stuck (we
> now also have drm-misc-next/-next-fixes/-fixes).
>
> v2: Gracefully handle if some remotes arent' there.
>
> Acked-by: seanpaul@chromium.org
> Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
Acked-by: Jani Nikula <jani.nikula@intel.com>
Push away!
> ---
> dim | 22 ++++++++++++++++++++++
> dim.rst | 5 +++++
> 2 files changed, 27 insertions(+)
>
> diff --git a/dim b/dim
> index 3dd2d1dec796..b21d1321af09 100755
> --- a/dim
> +++ b/dim
> @@ -1285,6 +1285,28 @@ function dim_update_branches
> update_rerere_cache
> }
>
> +function dim_status
> +{
> + local repo remote drm_remote patches
> +
> + cd $DIM_PREFIX/$DIM_DRM_INTEL
> +
> + drm_remote=$(url_to_remote $drm_upstream_git)
> +
> + for branch in $dim_branches ; do
> + repo=`branch_to_repo $branch`
> + if ! remote=`repo_to_remote $repo` ; then
> + continue
> + fi
> +
> + patches=$(git log --oneline $remote/$branch ^origin/master ^$drm_remote/drm-next ^$drm_remote/drm-fixes | wc -l)
> +
> + if [[ $patches -ne 0 ]] ; then
> + echo $repo/$branch: $patches unmerged patches
> + fi
> + done
> +}
> +
> function setup_aux_checkout # name url directory
> {
> local name url dir remote
> diff --git a/dim.rst b/dim.rst
> index 9a045a43e7b7..0c52ab43e400 100644
> --- a/dim.rst
> +++ b/dim.rst
> @@ -80,6 +80,11 @@ always maintained from the same machine, even if different branches are
> maintained on different machines (by different maintainers), there's no need to
> run this command.
>
> +status
> +------
> +
> +Lists all branches with unmerged patches, and how many patches are unmerged.
> +
> rebuild-tip
> -----------
> Rebuild and push the integration tree.
--
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] 2+ messages in thread
end of thread, other threads:[~2016-11-29 16:19 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-11-29 14:31 [PATCH] dim: Add status command Daniel Vetter
2016-11-29 16:19 ` Jani Nikula
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).