forked from twisted/twisted
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge remote-tracking branch 'origin/trunk' into doc-htt-client-ssl-v…
…alid-7879
- Loading branch information
Showing
69 changed files
with
2,161 additions
and
457 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,72 @@ | ||
#!/bin/sh | ||
|
||
set -e | ||
set -u | ||
|
||
|
||
# Usage | ||
|
||
usage() { | ||
program=$(basename "$0"); | ||
|
||
if [ $# != 0 ]; then echo "$@"; echo ""; fi; | ||
|
||
echo "${program}: usage:"; | ||
echo " ${program} pull_request_number trac_ticket_number branch_name"; | ||
echo ""; | ||
echo "Note: branch_name should not include the ticket number prefix; that "; | ||
echo "will be added automatically."; | ||
echo ""; | ||
echo "${program} creates a branch in the Twisted GitHub repository from a"; | ||
echo "forked pull request. This is necessary in order to create a branch"; | ||
echo "that is visible to the Buildbot-based builder infrastructure."; | ||
} | ||
|
||
|
||
# Options | ||
|
||
while [ $# != 0 ]; do | ||
case "$1" in | ||
--help) | ||
usage; | ||
exit 0; | ||
;; | ||
--|*) break; ;; | ||
esac; | ||
done; | ||
|
||
if [ $# != 3 ]; then | ||
usage "Invalid arguments: $*"; | ||
exit 1; | ||
fi; | ||
|
||
PR_NUMBER="$1"; shift; | ||
TICKET_NUMBER="$1"; shift; | ||
BRANCH_NAME="$1"; shift; | ||
|
||
|
||
# Do The Right Thing | ||
|
||
#repo="https://github.com/twisted/twisted.git"; | ||
repo="git@github.com:twisted/twisted.git"; | ||
|
||
wc="$(dirname "$(dirname "$0")")/.git"; | ||
|
||
if [ ! -d "${wc}" ]; then | ||
wc="$(mktemp -d -t twisted.XXXX)"; | ||
|
||
git clone --depth 1 --progress "${repo}" "${wc}"; | ||
|
||
cloned=true; | ||
else | ||
cloned=false; | ||
fi; | ||
|
||
cd "${wc}"; | ||
|
||
git fetch origin "refs/pull/${PR_NUMBER}/head"; | ||
git push origin "FETCH_HEAD:refs/heads/${TICKET_NUMBER}-${BRANCH_NAME}"; | ||
|
||
if ${cloned}; then | ||
rm -fr "${wc}"; | ||
fi; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.