Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
scripts
mahara-scripts
Commits
3e93cc5a
Commit
3e93cc5a
authored
May 18, 2015
by
Aaron Wells
Browse files
Fixing for compatibility with Gerrit 2.11
parent
1946aa73
Changes
2
Hide whitespace changes
Inline
Side-by-side
gerrit/change-merged
View file @
3e93cc5a
...
@@ -164,7 +164,16 @@ def main():
...
@@ -164,7 +164,16 @@ def main():
# See https://reviews.mahara.org/Documentation/config-hooks.html
# See https://reviews.mahara.org/Documentation/config-hooks.html
# This should be replaced with argparse instead of getopt, when
# This should be replaced with argparse instead of getopt, when
# we upgrade the server to python 3.2 or later.
# we upgrade the server to python 3.2 or later.
gerrit_args
=
[
'change='
,
'change-url='
,
'project='
,
'branch='
,
'topic='
,
'submitter='
,
'commit='
]
gerrit_args
=
[
'change='
,
'change-url='
,
'change-owner='
,
'project='
,
'branch='
,
'topic='
,
'submitter='
,
'commit='
]
args
,
unused
=
getopt
(
sys
.
argv
[
1
:],
''
,
gerrit_args
)
args
,
unused
=
getopt
(
sys
.
argv
[
1
:],
''
,
gerrit_args
)
change_url
=
project
=
branch
=
submitter
=
commit
=
None
change_url
=
project
=
branch
=
submitter
=
commit
=
None
...
...
gerrit/patchset-created
View file @
3e93cc5a
...
@@ -79,10 +79,22 @@ def main():
...
@@ -79,10 +79,22 @@ def main():
# See https://reviews.mahara.org/Documentation/config-hooks.html
# See https://reviews.mahara.org/Documentation/config-hooks.html
# This should be replaced with argparse instead of getopt, when
# This should be replaced with argparse instead of getopt, when
# we upgrade the server to python 3.2 or later.
# we upgrade the server to python 3.2 or later.
gerrit_args
=
[
'change='
,
'is-draft='
,
'change-url='
,
'project='
,
'branch='
,
'topic='
,
'uploader='
,
'commit='
,
'patchset='
]
gerrit_args
=
[
'change='
,
'is-draft='
,
'kind='
,
'change-url='
,
'change-owner='
,
'project='
,
'branch='
,
'topic='
,
'uploader='
,
'commit='
,
'patchset='
]
args
,
unused
=
getopt
(
sys
.
argv
[
1
:],
''
,
gerrit_args
)
args
,
unused
=
getopt
(
sys
.
argv
[
1
:],
''
,
gerrit_args
)
change_url
=
project
=
branch
=
uploader
=
commit
=
None
change_url
=
project
=
branch
=
uploader
=
commit
=
patchset
=
is_draft
=
None
for
argname
,
argv
in
args
:
for
argname
,
argv
in
args
:
if
argname
==
'--change-url'
:
if
argname
==
'--change-url'
:
change_url
=
argv
change_url
=
argv
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment