# which accompanies this distribution, and is available at
# http://www.eclipse.org/legal/epl-v10.html
##############################################################################
# which accompanies this distribution, and is available at
# http://www.eclipse.org/legal/epl-v10.html
##############################################################################
# Generates a patch to lock|unlock a branch in Gerrit
#
# Assumes that the project repository was cloned via ssh and thus uses ssh to
# Generates a patch to lock|unlock a branch in Gerrit
#
# Assumes that the project repository was cloned via ssh and thus uses ssh to
ssh_port=$(git remote show origin | grep Fetch | grep 'ssh://' \
| awk -F'/' '{print $3}' | awk -F':' '{print $2}')
ssh_port=$(git remote show origin | grep Fetch | grep 'ssh://' \
| awk -F'/' '{print $3}' | awk -F':' '{print $2}')
# Groups must be mapped in the groups file before they can be used
if ! grep 'Registered Users'; then
echo -e "global:Registered-Users\tRegistered Users" >> groups
# Groups must be mapped in the groups file before they can be used
if ! grep 'Registered Users'; then
echo -e "global:Registered-Users\tRegistered Users" >> groups