Skip to content
Snippets Groups Projects
Commit b4ed7b55 authored by Jani Nikula's avatar Jani Nikula
Browse files

dim: require explicit repo in create-branch


No longer consider drm-intel as the default. All repos need to be
explicitly specified. Improve error reporting in repo_to_remote for
unknown repos.

Reviewed-by: default avatarDaniel Vetter <daniel.vetter@ffwll.ch>
Signed-off-by: default avatarJani Nikula <jani.nikula@intel.com>
parent 3d530f6e
No related branches found
No related tags found
No related merge requests found
...@@ -335,7 +335,17 @@ function branch_to_remote # branch ...@@ -335,7 +335,17 @@ function branch_to_remote # branch
function repo_to_remote # repo function repo_to_remote # repo
{ {
url_to_remote ${drm_tip_repos[$1]} local repo url_list
repo=$1
url_list=${drm_tip_repos[$repo]}
if [[ -z "$url_list" ]]; then
echoerr "unknown repo $repo"
return 1
fi
url_to_remote $url_list
} }
function branch_to_repo # branch function branch_to_repo # branch
...@@ -1208,9 +1218,11 @@ function dim_create_branch ...@@ -1208,9 +1218,11 @@ function dim_create_branch
cd $DIM_PREFIX/$DIM_DRM_INTEL cd $DIM_PREFIX/$DIM_DRM_INTEL
if ( repo_to_remote ${branch%%/*} ) &> /dev/null ; then repo=${branch%%/*}
repo=${branch%%/*} branch=${branch#*/}
branch=${branch#*/} if [[ "$repo" = "$branch" ]]; then
echoerr "give branch in format repo/branch"
return 1
fi fi
remote=$(repo_to_remote $repo) remote=$(repo_to_remote $repo)
......
...@@ -298,13 +298,11 @@ Compile-test the current tree and if successful resolve a ...@@ -298,13 +298,11 @@ Compile-test the current tree and if successful resolve a
conflicted git am. Also runs the patch checker afterwards. This fails to add the conflicted git am. Also runs the patch checker afterwards. This fails to add the
Link: tag, so you'll need to add it manually or use the **add-link** subcommand. Link: tag, so you'll need to add it manually or use the **add-link** subcommand.
create-branch *branch* [*commit-ish*] create-branch *repo*/*branch* [*commit-ish*]
------------------------------------- --------------------------------------------
Create a new topic branch with the given name. Note that topic/ is not Create a new topic branch in the given *repo* named *branch*. The branch starts
automatically prepended. The branch starts at HEAD or the given commit-ish. Note at HEAD or the given *commit-ish*. Note that topic/ is not automatically added
that by default the new branch is created in the drm-intel.git repository. If to the branch name. Branch names should be unique across repos.
you want to create a branch somewhere else, then you need to prepend the remote
name from nightly.conf, e.g. "drm-misc/topic/branch".
remove-branch *branch* remove-branch *branch*
---------------------- ----------------------
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment