diff options
author | Tom Stellard <tstellar@redhat.com> | 2019-10-25 00:04:31 -0700 |
---|---|---|
committer | Tom Stellard <tstellar@redhat.com> | 2019-10-25 00:04:31 -0700 |
commit | efcdedd2e72bd47d019f5873e2faf35a27e32b43 (patch) | |
tree | 0606cd8bf150baa97527cf4eeab7d906af73e810 /llvm/utils/git-svn | |
parent | b96e30c21726e94ad89b2796bcb8a4d93c38183b (diff) | |
download | bcm5719-llvm-efcdedd2e72bd47d019f5873e2faf35a27e32b43.tar.gz bcm5719-llvm-efcdedd2e72bd47d019f5873e2faf35a27e32b43.zip |
git-llvm: Drop dependency on github module
This was required for blocking merge commits, but now that we have
branch protections, we don't need this.
Diffstat (limited to 'llvm/utils/git-svn')
-rwxr-xr-x | llvm/utils/git-svn/git-llvm | 16 |
1 files changed, 5 insertions, 11 deletions
diff --git a/llvm/utils/git-svn/git-llvm b/llvm/utils/git-svn/git-llvm index 7a4d8c2d178..5ebfcf1bde2 100755 --- a/llvm/utils/git-svn/git-llvm +++ b/llvm/utils/git-svn/git-llvm @@ -36,7 +36,6 @@ import subprocess import sys import time import getpass -import github assert sys.version_info >= (2, 7) try: @@ -204,12 +203,12 @@ def get_fetch_url(): return 'https://{}'.format(GIT_URL) -def get_push_url(user='', token='', ssh=False): +def get_push_url(user='', ssh=False): if ssh: return 'ssh://{}'.format(GIT_URL) - return 'https://{}@{}'.format(token, GIT_URL) + return 'https://{}'.format(GIT_URL) def get_revs_to_push(branch): @@ -222,7 +221,7 @@ def get_revs_to_push(branch): return commits -def git_push_one_rev(rev, dry_run, branch, github_ctx, github_token): +def git_push_one_rev(rev, dry_run, branch): # Check if this a merge commit by counting the number of parent commits. # More than 1 parent commmit means this is a merge. num_parents = len(git('show', '--no-patch', '--format="%P"', rev).split()) @@ -238,7 +237,7 @@ def git_push_one_rev(rev, dry_run, branch, github_ctx, github_token): return # Second push to actually push the commit - git('push', get_push_url(token = github_token), '{}:{}'.format(rev, branch), print_raw_stderr=True) + git('push', get_push_url(), '{}:{}'.format(rev, branch), print_raw_stderr=True) def cmd_push(args): @@ -261,13 +260,8 @@ def cmd_push(args): if not ask_confirm("Are you sure you want to create %d commits?" % len(revs)): die("Aborting") - # FIXME: I'm really trying to avoid prompting twice for the password, the only - # way I can see to do that is require an authentication token instead of a - # password, because you can embedded authentication tokens into the URL. - github_token = getpass.getpass("Auth token for https://github.com':") - g = github.Github(github_token) for r in revs: - git_push_one_rev(r, dry_run, args.branch, g, github_token) + git_push_one_rev(r, dry_run, args.branch) if __name__ == '__main__': |