From 520fed2cbc77d495fd9ebd50e317c1b618b99d8b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=B1=9F=E7=95=85?= <631866165@qq.com> Date: Fri, 21 Aug 2020 17:42:12 +0800 Subject: [PATCH] remove review_url and --build --- project.py | 4 ++-- subcmds/gitee_pr.py | 36 ++++++++++++++++++------------------ subcmds/push.py | 6 +++--- 3 files changed, 23 insertions(+), 23 deletions(-) diff --git a/project.py b/project.py index 0942ac0..c370d42 100644 --- a/project.py +++ b/project.py @@ -1365,8 +1365,8 @@ class Project(object): if not branch.LocalMerge: raise GitError('branch %s does not track a remote' % branch.name) - if not opt.ignore_review and branch.remote.review: - raise GitError('remote %s has review url, use `repo upload` instead.' % branch.remote.name) + # if not opt.ignore_review and branch.remote.review: + # raise GitError('remote %s has review url, use `repo upload` instead or use `repo push --`.' % branch.remote.name) if opt.new_branch: dest_branch = branch.name diff --git a/subcmds/gitee_pr.py b/subcmds/gitee_pr.py index 5a153fc..4296b56 100644 --- a/subcmds/gitee_pr.py +++ b/subcmds/gitee_pr.py @@ -25,13 +25,13 @@ class GiteePr(Command): common = True helpSummary = "Show gitee pull request list" helpUsage = """ -%prog [--build] [...] +%prog [...] """ - def _Options(self, p): - p.add_option('--build', - dest='build', action='store_true', - help="To trigger ci with repo's config hook") + # def _Options(self, p): + # p.add_option('--build', + # dest='build', action='store_true', + # help="To trigger ci with repo's config hook") def Execute(self, opt, args): """ @@ -84,19 +84,19 @@ class GiteePr(Command): except Exception as e: sys.stderr.write('ERROR: %s\n' % e) sys.exit(1) - if opt.build: - hook_url = self.manifest.manifestProject.config.GetString('repo.hook') - if not hook_url: - sys.stderr.write('repo.hook is None, Please set it, you need `repo config -h`\n') - sys.exit(1) - try: - response = requests.post(hook_url, json=json.dumps(result), timeout=5) - except Exception as e: - sys.stderr.write('POST HOOK ERROR: %s\n' % e) - sys.exit(1) - print('POST HOOK SUCCESS') - print('STATUS: %s' % response.status_code) - print('BODY: %s' % response.content) + # if opt.build: + # hook_url = self.manifest.manifestProject.config.GetString('repo.hook') + # if not hook_url: + # sys.stderr.write('repo.hook is None, Please set it, you need `repo config -h`\n') + # sys.exit(1) + # try: + # response = requests.post(hook_url, json=json.dumps(result), timeout=5) + # except Exception as e: + # sys.stderr.write('POST HOOK ERROR: %s\n' % e) + # sys.exit(1) + # print('POST HOOK SUCCESS') + # print('STATUS: %s' % response.status_code) + # print('BODY: %s' % response.content) diff --git a/subcmds/push.py b/subcmds/push.py index 8b9ba1e..869a1a4 100644 --- a/subcmds/push.py +++ b/subcmds/push.py @@ -142,9 +142,9 @@ Gerrit Code Review: http://code.google.com/p/gerrit/ p.add_option('--br', type='string', action='store', dest='branch', help='branch to push.') - p.add_option('--ignore_review', - dest='ignore_review', action='store_true', - help='run even has review defined.') + # p.add_option('--ignore_review', + # dest='ignore_review', action='store_true', + # help='run even has review defined.') def _SingleBranch(self, opt, branch, peoples): project = branch.project