Update default gerrit namespace

According to latest Gerrit documentation, 2.15.3, refs/for/'branch'
should be used when pushing changes to Gerrit. Change the default
behavior to refs/for/* instead of refs/publish/* which has been
deprecated. This removes a warning from Gerrit remotes running the
latest version when pushing changes without commandline options.

Change-Id: Ibaddfda96457a72c54ca9c91a8ad25d14b88c582
This commit is contained in:
Derek Waldner 2018-07-21 22:10:27 +00:00
parent de0d27144e
commit 694f532ca8
1 changed files with 1 additions and 8 deletions

View File

@ -1401,11 +1401,6 @@ def _main():
help="Add reviewers to uploaded patch sets.")
parser.add_argument("-D", "--draft", dest="draft", action="store_true",
help="Submit review as a draft")
parser.add_argument("-c", "--compatible", dest="compatible",
action="store_true",
help="Push change to refs/for/* for compatibility "
"with Gerrit versions < 2.3. Ignored if "
"-D/--draft is used.")
parser.add_argument("-n", "--dry-run", dest="dry", action="store_true",
help="Don't actually submit the branch for review")
parser.add_argument("-i", "--new-changeid", dest="regenerate",
@ -1612,14 +1607,12 @@ def _main():
sys.exit(1)
assert_one_change(remote, branch, yes, have_hook)
ref = "publish"
ref = "for"
if options.draft:
ref = "drafts"
if options.custom_script:
run_custom_script("draft")
elif options.compatible:
ref = "for"
cmd = "git push %s HEAD:refs/%s/%s" % (remote, ref, branch)
if options.topic is not None: