Show More
@@ -2,11 +2,11 b'' | |||||
2 | """ |
|
2 | """ | |
3 | Backport pull requests to a particular branch. |
|
3 | Backport pull requests to a particular branch. | |
4 |
|
4 | |||
5 | Usage: backport_pr.py branch [PR] |
|
5 | Usage: backport_pr.py branch [PR] [PR2] | |
6 |
|
6 | |||
7 | e.g.: |
|
7 | e.g.: | |
8 |
|
8 | |||
9 | python tools/backport_pr.py 0.13.1 123 |
|
9 | python tools/backport_pr.py 0.13.1 123 155 | |
10 |
|
10 | |||
11 | to backport PR #123 onto branch 0.13.1 |
|
11 | to backport PR #123 onto branch 0.13.1 | |
12 |
|
12 | |||
@@ -29,7 +29,7 b' from subprocess import Popen, PIPE, check_call, check_output' | |||||
29 | try: |
|
29 | try: | |
30 | from urllib.request import urlopen |
|
30 | from urllib.request import urlopen | |
31 | except: |
|
31 | except: | |
32 |
from urllib import urlopen |
|
32 | from urllib import urlopen | |
33 |
|
33 | |||
34 | from gh_api import ( |
|
34 | from gh_api import ( | |
35 | get_issues_list, |
|
35 | get_issues_list, | |
@@ -163,4 +163,9 b" if __name__ == '__main__':" | |||||
163 | print (pr) |
|
163 | print (pr) | |
164 | sys.exit(0) |
|
164 | sys.exit(0) | |
165 |
|
165 | |||
166 | sys.exit(backport_pr(sys.argv[1], int(sys.argv[2]))) |
|
166 | for prno in map(int, sys.argv[2:]): | |
|
167 | print("Backporting PR #%i" % prno) | |||
|
168 | rc = backport_pr(sys.argv[1], prno) | |||
|
169 | if rc: | |||
|
170 | print("Backporting PR #%i failed" % prno) | |||
|
171 | sys.exit(rc) |
General Comments 0
You need to be logged in to leave comments.
Login now