On Wed, 09 May 2018, Daniel Vetter <dan...@ffwll.ch> wrote: > On Tue, May 08, 2018 at 11:50:37PM +0300, Jani Nikula wrote: >> Since drm-rerere commit 589f83df3e5a ("Revert "Revert "move drm-next to >> drm.git for experimentation""") the drm-next branch is expected to be in >> the drm repo instead of drm-upstream. >> >> This fixes dim status and a bunch of pull request and other commands. >> >> Cc: Daniel Vetter <daniel.vet...@ffwll.ch> >> Signed-off-by: Jani Nikula <jani.nik...@intel.com> >> --- >> dim | 16 ++++++---------- >> 1 file changed, 6 insertions(+), 10 deletions(-) >> >> diff --git a/dim b/dim >> index 6b684ba5308c..a582765c3da9 100755 >> --- a/dim >> +++ b/dim >> @@ -1758,7 +1758,7 @@ function dim_update_next >> $DRY git add drivers/gpu/drm/i915/i915_drv.h >> git commit $DRY_RUN -sm "drm/i915: Update DRIVER_DATE to $driver_date" >> >> - gitk drm-intel-next-queued ^$(repo_to_remote drm-upstream)/drm-next & >> + gitk drm-intel-next-queued ^$(repo_to_remote drm)/drm-next & > > Since we defacto hard-code the assumption that a given branch name is > unique among all the repos maintained by dim should we instead use the > branch_to_remote helper here and all other places?
Annoyingly, branch_to_remote looks at $branch@{upstream} which will fail for any branch not checked out. This needs to do branch_to_repo followed by repo_to_remote. *sigh*. J. > > Otherwise we're going to have the same fun again when/if we move > drm-fixes. Or when we move drm-next back. >> >> # try to push dinq first in case someone raced >> FORCE=1 dim_push_queued >> @@ -1876,7 +1876,7 @@ function dim_pull_request >> >> function dim_pull_request_next >> { >> - upstream=${1:-$(repo_to_remote drm-upstream)/drm-next} >> + upstream=${1:-$(repo_to_remote drm)/drm-next} >> dim_pull_request drm-intel-next $upstream >> } >> >> @@ -1888,22 +1888,18 @@ function dim_pull_request_fixes >> >> function dim_pull_request_next_fixes >> { >> - upstream=${1:-$(repo_to_remote drm-upstream)/drm-next} >> + upstream=${1:-$(repo_to_remote drm)/drm-next} >> dim_pull_request drm-intel-next-fixes $upstream >> } >> >> # Note: used by bash completion >> function dim_list_upstreams >> { >> - local dim_drm_upstream_remote >> - >> cd $DIM_PREFIX/$DIM_REPO >> >> - dim_drm_upstream_remote=$(repo_to_remote drm-upstream) >> - >> echo origin/master >> - echo $dim_drm_upstream_remote/drm-next >> - echo $dim_drm_upstream_remote/drm-fixes >> + echo $(repo_to_remote drm)/drm-next >> + echo $(repo_to_remote drm-upstream)/drm-fixes > > Similar here, we could just directly brancht_to_remote for both drm-fixes > and drm-next. > >> } >> >> # Note: used by bash completion >> @@ -1964,7 +1960,7 @@ function dim_status >> >> fetch_all >> >> - drm_remote=$(repo_to_remote drm-upstream) >> + drm_remote=$(repo_to_remote drm) > > And here we'd need to track them separately as both drm-fixes and drm-next > remotes. > -Daniel > >> >> for branch in $dim_branches ; do >> repo=$(branch_to_repo $branch) >> -- >> 2.11.0 >> -- Jani Nikula, Intel Open Source Technology Center _______________________________________________ dim-tools mailing list dim-tools@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/dim-tools