Browse Source

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
tags/1.27.0
Derek Waldner 11 months ago
parent
commit
694f532ca8
1 changed files with 1 additions and 8 deletions
  1. 1
    8
      git_review/cmd.py

+ 1
- 8
git_review/cmd.py View File

@@ -1401,11 +1401,6 @@ def _main():
1401 1401
                         help="Add reviewers to uploaded patch sets.")
1402 1402
     parser.add_argument("-D", "--draft", dest="draft", action="store_true",
1403 1403
                         help="Submit review as a draft")
1404
-    parser.add_argument("-c", "--compatible", dest="compatible",
1405
-                        action="store_true",
1406
-                        help="Push change to refs/for/* for compatibility "
1407
-                             "with Gerrit versions < 2.3. Ignored if "
1408
-                             "-D/--draft is used.")
1409 1404
     parser.add_argument("-n", "--dry-run", dest="dry", action="store_true",
1410 1405
                         help="Don't actually submit the branch for review")
1411 1406
     parser.add_argument("-i", "--new-changeid", dest="regenerate",
@@ -1612,14 +1607,12 @@ def _main():
1612 1607
             sys.exit(1)
1613 1608
     assert_one_change(remote, branch, yes, have_hook)
1614 1609
 
1615
-    ref = "publish"
1610
+    ref = "for"
1616 1611
 
1617 1612
     if options.draft:
1618 1613
         ref = "drafts"
1619 1614
         if options.custom_script:
1620 1615
             run_custom_script("draft")
1621
-    elif options.compatible:
1622
-        ref = "for"
1623 1616
 
1624 1617
     cmd = "git push %s HEAD:refs/%s/%s" % (remote, ref, branch)
1625 1618
     if options.topic is not None:

Loading…
Cancel
Save