Commit 07c8dda1 authored by Utkarsh Ayachit's avatar Utkarsh Ayachit
Browse files

Switch developer setup to use the GitLab workflow

In SetupForDevelopment, switch from setup-gerrit to setup-gitlab.
Also invoke setup-upstream to switch the "origin" remote to GitLab.
Update the version of the SetupForDevelopment script so that existing
work tree hooks will ask developers to run the script again.
parent 8e65e503
#!/usr/bin/env bash
# Make sure we are inside the repository.
cd "${BASH_SOURCE%/*}/.."
echo "Ensuring all submodules are checked out and up to date..."
git submodule init
git submodule sync
git submodule update
# Rebase master by default
git config rebase.stat true
git config branch.master.rebase true
echo "Checking basic user information..."
Scripts/GitSetup/setup-user
echo
Scripts/GitSetup/setup-hooks
echo
echo "Setting up git aliases..."
Scripts/setup-git-aliases
echo
echo "Setting up Gerrit..."
Scripts/GitSetup/setup-gerrit ||
echo "Failed to setup Gerrit. Run this script again to retry."
echo
setup_version=1
git config hooks.setup ${setup_version}
echo "Setup for development complete for ParaViewSuperbuild."
#!/usr/bin/env bash
GITCONFIG="git config"
# General aliases that could be global
${GITCONFIG} alias.prepush 'log --graph --stat origin/master..'
# Alias to push the current topic branch to Gerrit
${GITCONFIG} alias.gerrit-push "!bash Scripts/git-gerrit-push"
[hooks]
url = git://vtk.org/VTK.git
[gerrit]
project = ParaViewSuperbuild
site = http://review.source.kitware.com
pushurl = $username@review.source.kitware.com:ParaViewSuperbuild
url = https://gitlab.kitware.com/paraview/paraview.git
[upstream]
url = https://gitlab.kitware.com/paraview/paraview-superbuild.git
[gitlab]
host = gitlab.kitware.com
group-path = paraview
group-name = ParaView
project-path = paraview-superbuild
project-name = ParaView-Superbuild
#!/usr/bin/env bash
echo "Setting up useful Git aliases..." &&
# General aliases that could be global
git config alias.prepush 'log --graph --stat origin/master..' &&
# Alias to push the current topic branch to Gerrit
gerrit_disabled="ParaViewSuperbuild no longer uses Gerrit. Please use GitLab." &&
git config alias.gerrit-push '!sh -c "echo '"${gerrit_disabled}"'"' &&
# Alias to push the current topic branch to GitLab
git config alias.gitlab-push '!bash Utilities/GitSetup/git-gitlab-push' &&
true
#!/usr/bin/env bash
# Make sure we are inside the repository.
cd "${BASH_SOURCE%/*}/.." &&
Utilities/GitSetup/setup-user && echo &&
Utilities/GitSetup/setup-hooks && echo &&
Utilities/Scripts/SetupGitAliases.sh && echo &&
Utilities/GitSetup/setup-upstream && echo &&
(Utilities/GitSetup/setup-gitlab ||
echo 'Failed to setup GitLab. Run this again to retry.') && echo &&
Utilities/GitSetup/tips
# Rebase master by default
git config rebase.stat true
git config branch.master.rebase true
# Disable Gerrit hook explicitly so the commit-msg hook will
# not complain even if some gerrit remotes are still configured.
git config hooks.GerritId false
# Record the version of this setup so Scripts/pre-commit can check it.
SetupForDevelopment_VERSION=2
git config hooks.SetupForDevelopment ${SetupForDevelopment_VERSION}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment