summaryrefslogtreecommitdiffstats
path: root/subcmds/upload.py
Commit message (Collapse)AuthorAgeFilesLines
* upload: Add superproject identifier as push optionmainGavin Mak10 days1-1/+8
| | | | | | | | | | | | When uploading, add the root superproject repo as a push option in the format `-o custom-keyed-value=rootRepo:$HOST/$PROJECT`. Bug: b/401147338 Change-Id: I00230256eb7ae307b03840bb4090c28dc8a0505e Reviewed-on: https://gerrit-review.googlesource.com/c/git-repo/+/472601 Reviewed-by: Josip Sokcevic <sokcevic@chromium.org> Tested-by: Gavin Mak <gavinmak@google.com> Commit-Queue: Gavin Mak <gavinmak@google.com>
* upload: Return correct tuple values in _ProcessResultsv2.49.2Josip Sokcevic2024-10-311-2/+2
| | | | | | | | | | | | | | | Incorrect tuple values were returned with http://go/grev/440221 - instead of returning (Project, ReviewableBranch), _ProcessResults was returning (int, ReviewableBranch). R=jojwang@google.com Bug: 376731172 Change-Id: I75205f42fd23f5ee6bd8d0c15b18066189b42bd9 Reviewed-on: https://gerrit-review.googlesource.com/c/git-repo/+/441121 Reviewed-by: Sam Saccone <samccone@google.com> Commit-Queue: Josip Sokcevic <sokcevic@google.com> Tested-by: Josip Sokcevic <sokcevic@google.com>
* Use full name of the revision when checking dest-branchv2.49joehsu2024-10-281-2/+5
| | | | | | | | | | | | | | | | | | The manifest usually doesn't sepecify the revision with the full name (e.g. refs/heads/REV). However, when checking if the name of the merge branch, full name is used on the merge branch. The CL use full name of revision when comparing it with the merge branch. Bug: b/370919047 Test: repo upload on a project with `dest-branch` set Change-Id: Ib6fa2f7246beb5bae0a26a70048a7ac03b6c5a2f Reviewed-on: https://gerrit-review.googlesource.com/c/git-repo/+/438401 Reviewed-by: Josip Sokcevic <sokcevic@google.com> Tested-by: Joe Hsu <joehsu@google.com> Commit-Queue: Josip Sokcevic <sokcevic@google.com>
* subcmds: reduce multiprocessing serialization overheadKuang-che Wu2024-10-231-10/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Follow the same approach as 39ffd9977e to reduce serialization overhead. Below benchmarks are tested with 2.7k projects on my workstation (warm cache). git tracing is disabled for benchmark. (seconds) | v2.48 | v2.48 | this CL | this CL | | -j32 | | -j32 ----------------------------------------------------------- with clean tree state: branches (none) | 5.6 | 5.9 | 1.0 | 0.9 status (clean) | 21.3 | 9.4 | 19.4 | 4.7 diff (none) | 7.6 | 7.2 | 5.7 | 2.2 prune (none) | 5.7 | 6.1 | 1.3 | 1.2 abandon (none) | 19.4 | 18.6 | 0.9 | 0.8 upload (none) | 19.7 | 18.7 | 0.9 | 0.8 forall -c true | 7.5 | 7.6 | 0.6 | 0.6 forall -c "git log -1" | 11.3 | 11.1 | 0.6 | 0.6 with branches: start BRANCH --all | 21.9 | 20.3 | 13.6 | 2.6 checkout BRANCH | 29.1 | 27.8 | 1.1 | 1.0 branches (2) | 28.0 | 28.6 | 1.5 | 1.3 abandon BRANCH | 29.2 | 27.5 | 9.7 | 2.2 Bug: b/371638995 Change-Id: I53989a3d1e43063587b3f52f852b1c2c56b49412 Reviewed-on: https://gerrit-review.googlesource.com/c/git-repo/+/440221 Reviewed-by: Josip Sokcevic <sokcevic@google.com> Tested-by: Kuang-che Wu <kcwu@google.com> Commit-Queue: Kuang-che Wu <kcwu@google.com>
* upload: add a --topic option for setting topic explicitlyMike Frysinger2024-07-011-5/+13
| | | | | | | | | | | | | | Let people specify the exact topic when uploading CLs. The existing -t option only supports setting the topic to the current local branch. Add a --topic-branch long option to the existing -t to align it a bit better with --hashtag & --hashtag-branch. Change-Id: I010abc4a7f3c685021cae776dd1e597c22b79135 Reviewed-on: https://gerrit-review.googlesource.com/c/git-repo/+/431997 Tested-by: Mike Frysinger <vapier@google.com> Reviewed-by: Gavin Mak <gavinmak@google.com> Commit-Queue: Mike Frysinger <vapier@google.com>
* upload: drop check for uncommitted local changesMike Frysinger2024-05-141-31/+0
| | | | | | | | | | | | | git push, like most git commands, does not warn or otherwise prompt users when there are local uncommitted changes. To simplify the upload logic, and to harmonize repo upload with git push as a more git-esque flow, stop checking/warning/prompting the user here too. Change-Id: Iee18132f0faad0881f1a796cb58821328e04b694 Reviewed-on: https://gerrit-review.googlesource.com/c/git-repo/+/425337 Reviewed-by: Josip Sokcevic <sokcevic@google.com> Tested-by: Mike Frysinger <vapier@google.com> Commit-Queue: Mike Frysinger <vapier@google.com>
* upload: Fix patchset description destinationJosip Sokcevic2024-03-081-0/+1
| | | | | | | | | Bug: 308467447 Change-Id: I8ad598d39f5fdb24d549d3277ad5fedac203581b Reviewed-on: https://gerrit-review.googlesource.com/c/git-repo/+/412477 Reviewed-by: George Engelbrecht <engeg@google.com> Tested-by: Josip Sokcevic <sokcevic@google.com> Commit-Queue: Josip Sokcevic <sokcevic@google.com>
* upload: Add support for setting patchset descriptionSergiy Belozorov2024-03-041-0/+6
| | | | | | | | | Bug: 308467447 Change-Id: I7abcbc98131b826120fc9ab85d5b889f90db4b0a Reviewed-on: https://gerrit-review.googlesource.com/c/git-repo/+/355968 Tested-by: Sergiy Belozorov <sergiyb@chromium.org> Reviewed-by: Mike Frysinger <vapier@google.com> Commit-Queue: Sergiy Belozorov <sergiyb@chromium.org>
* Update logger.warn to logger.warningAravind Vasudevan2023-10-131-3/+3
| | | | | | | | | Bug: 305035810 Change-Id: Ic2b35d5c3cbe92480c24da612f29382f5d26d4aa Reviewed-on: https://gerrit-review.googlesource.com/c/git-repo/+/389414 Reviewed-by: Mike Frysinger <vapier@google.com> Tested-by: Aravind Vasudevan <aravindvasudev@google.com> Commit-Queue: Aravind Vasudevan <aravindvasudev@google.com>
* subcmds: Use repo loggerAravind Vasudevan2023-09-141-22/+17
| | | | | | | | | Bug: b/292704435 Change-Id: Ia3a45d87fc0bf0d4a1ba53050d9c3cd2dba20e55 Reviewed-on: https://gerrit-review.googlesource.com/c/git-repo/+/386236 Reviewed-by: Jason Chang <jasonnc@google.com> Commit-Queue: Aravind Vasudevan <aravindvasudev@google.com> Tested-by: Aravind Vasudevan <aravindvasudev@google.com>
* isort: format codebasev2.36Mike Frysinger2023-08-221-2/+5
| | | | | | | | Change-Id: I6f11d123b68fd077f558d3c21349c55c5f251019 Reviewed-on: https://gerrit-review.googlesource.com/c/git-repo/+/383715 Reviewed-by: Gavin Mak <gavinmak@google.com> Tested-by: Mike Frysinger <vapier@google.com> Commit-Queue: Mike Frysinger <vapier@google.com>
* upload: Suggest full sync if hooks fail with partially synced treeGavin Mak2023-08-221-0/+7
| | | | | | | | | | | Pre-upload hooks may fail because of partial syncs. Bug: b/271507654 Change-Id: I124cd386c5af2c34e1dcaa3e86916624e235b1e3 Reviewed-on: https://gerrit-review.googlesource.com/c/git-repo/+/383474 Reviewed-by: Mike Frysinger <vapier@google.com> Commit-Queue: Gavin Mak <gavinmak@google.com> Tested-by: Gavin Mak <gavinmak@google.com>
* upload: fix error handlingJason Chang2023-08-211-125/+125
| | | | | | | | | | | | There was a bug in error handeling code that caused an uncaught exception to be raised. Bug: b/296316540 Change-Id: I49c72f29c00f26ba60de552f958bc6eddf841162 Reviewed-on: https://gerrit-review.googlesource.com/c/git-repo/+/383254 Reviewed-by: Mike Frysinger <vapier@google.com> Commit-Queue: Jason Chang <jasonnc@google.com> Tested-by: Jason Chang <jasonnc@google.com>
* Raise repo exit errors in place of sys.exitJason Chang2023-08-071-3/+7
| | | | | | | | | Bug: b/293344017 Change-Id: I92d81c78eba8ff31b5252415f4c9a515a6c76411 Reviewed-on: https://gerrit-review.googlesource.com/c/git-repo/+/381774 Tested-by: Jason Chang <jasonnc@google.com> Reviewed-by: Joanna Wang <jojwang@google.com> Commit-Queue: Jason Chang <jasonnc@google.com>
* upload: use f-stringJosip Sokcevic2023-05-251-1/+1
| | | | | | | | | Change-Id: I91b99a7147c7c3cb5485d5406316c8ffd79f9272 Reviewed-on: https://gerrit-review.googlesource.com/c/git-repo/+/374914 Commit-Queue: Josip Sokcevic <sokcevic@google.com> Reviewed-by: Joanna Wang <jojwang@google.com> Tested-by: Josip Sokcevic <sokcevic@google.com> Reviewed-by: Mike Frysinger <vapier@google.com>
* [git_trace2] Add logs for critical cmdsJosip Sokcevic2023-05-171-0/+1
| | | | | | | | | | | | Trace logs emitted from repo are not useful on error for many critical commands. This change adds errors for critical commands to trace logs. Change-Id: Ideb9358bee31e540bd84a94327a09ff9b0246a77 Reviewed-on: https://gerrit-review.googlesource.com/c/git-repo/+/373814 Reviewed-by: Joanna Wang <jojwang@google.com> Tested-by: Josip Sokcevic <sokcevic@google.com> Commit-Queue: Josip Sokcevic <sokcevic@google.com> Reviewed-by: Gavin Mak <gavinmak@google.com>
* Format codebase with black and check formatting in CQGavin Mak2023-03-221-488/+664
| | | | | | | | | | | | Apply rules set by https://gerrit-review.googlesource.com/c/git-repo/+/362954/ across the codebase and fix any lingering errors caught by flake8. Also check black formatting in run_tests (and CQ). Bug: b/267675342 Change-Id: I972d77649dac351150dcfeb1cd1ad0ea2efc1956 Reviewed-on: https://gerrit-review.googlesource.com/c/git-repo/+/363474 Reviewed-by: Mike Frysinger <vapier@google.com> Tested-by: Gavin Mak <gavinmak@google.com> Commit-Queue: Gavin Mak <gavinmak@google.com>
* upload: Skip upload if merge branch doesn't match project revision andv2.32Joanna Wang2023-02-281-15/+21
| | | | | | | | | | | | | | | | | | dest_branch. - This still prevents the case mentioned here: https://gerrit-review.googlesource.com/c/50300 while also supporting dest_branch. - Update _GetMergeBranch to get merge branches for any branch, not just the one we happen to run `repo upload` in. (e.g. for uploading multiple branches) Bug: b/27955930 Change-Id: Ia8ee1d6a83a783c984bb2eb308bb11b3a721a95d Reviewed-on: https://gerrit-review.googlesource.com/c/git-repo/+/360794 Commit-Queue: Joanna Wang <jojwang@google.com> Reviewed-by: Mike Frysinger <vapier@google.com> Tested-by: Joanna Wang <jojwang@google.com>
* Fix flake8 warnings for some filesSergiy Belozorov2023-01-051-3/+2
| | | | | | | Change-Id: If67f8660cfb0479f0e710b3566285ef401fcf077 Reviewed-on: https://gerrit-review.googlesource.com/c/git-repo/+/355969 Tested-by: Sergiy Belozorov <sergiyb@chromium.org> Reviewed-by: Mike Frysinger <vapier@google.com>
* Use print with flush=True instead of stdout.flushDaniel Kutik2022-12-131-6/+2
| | | | | | | | | | | Resolves multiple TODOs. Since we are requiring Python 3, we move to using print function with flush=True instead of using sys.stdout.flush(). Change-Id: I54db0344ec78ac81a8d6c6c7e43ee7d301f42f02 Reviewed-on: https://gerrit-review.googlesource.com/c/git-repo/+/354701 Tested-by: Daniel Kutik <daniel.kutik@lavawerk.com> Reviewed-by: Mike Frysinger <vapier@google.com>
* upload: Allow user to configure unusual commit thresholdDavid Greenaway2022-12-121-27/+61
| | | | | | | | | | | Add a per-remote option `uploadwarningthreshold` allowing the user to override how many commits can be uploaded prior to a warning being displayed. Change-Id: Ia7e1b2c7de89a0bf9ca1c24cc83dc595b3667437 Reviewed-on: https://gerrit-review.googlesource.com/c/git-repo/+/354375 Tested-by: David Greenaway <dgreenaway@google.com> Reviewed-by: Mike Frysinger <vapier@google.com>
* upload: track projects by path, rather than nameLaMont Jones2022-11-141-5/+7
| | | | | | | | | | | | Since the same project can be checked out in multiple paths, we need to track the "to be uploaded" projects by path, rather than project name. Bug: crbug.com/gerrit/16260 Test: manual Change-Id: Ic3dc81bb8acb34886baa6299e90a49c7ba372957 Reviewed-on: https://gerrit-review.googlesource.com/c/git-repo/+/351054 Reviewed-by: Xin Li <delphij@google.com> Tested-by: LaMont Jones <lamontjones@google.com>
* upload: respect --yes with large upload confirmationMike Frysinger2022-08-221-9/+10
| | | | | | | | | | If the user passes in --yes, don't prompt them to confirm large uploads. Bug: https://crbug.com/gerrit/14085 Change-Id: Ic801b21be80ba181801531acd4af5057ec10c11c Reviewed-on: https://gerrit-review.googlesource.com/c/git-repo/+/343554 Reviewed-by: LaMont Jones <lamontjones@google.com> Tested-by: Mike Frysinger <vapier@google.com>
* upload: add --push-options tips & doc linkMike Frysinger2022-08-181-0/+7
| | | | | | | Change-Id: Iee38a80974c53231d1e9f04f7f85b2d0bac96dbb Reviewed-on: https://gerrit-review.googlesource.com/c/git-repo/+/342354 Reviewed-by: LaMont Jones <lamontjones@google.com> Tested-by: Mike Frysinger <vapier@google.com>
* upload: Add ready flag to remove wipWilliam Escande2022-08-031-0/+4
| | | | | | | | | | | The `--wip` allow to bulk push changed as work-in-progress. This CL intend to allow the opposite opperation by removing the wip mark on the CL and set it to be ready to review Change-Id: If0743c5b14829f77be2def5a8547060d06a5648c Reviewed-on: https://gerrit-review.googlesource.com/c/git-repo/+/342214 Reviewed-by: Mike Frysinger <vapier@google.com> Tested-by: William Escande <wescande@google.com>
* upload: add ‘--ignore-untracked-files’ optionMartin Geisler2022-07-111-0/+10
| | | | | | | | | | | | | | This option will suppress the Uncommitted changes in ... (did you forget to amend?) prompt when there are untracked (unknown) files in the working copy. The prompt is still shown if tracked files are modified. Change-Id: Ia3fcc82989b7fad09b69214eda31e2d0dfc14600 Reviewed-on: https://gerrit-review.googlesource.com/c/git-repo/+/340456 Tested-by: Martin Geisler <mgeisler@google.com> Reviewed-by: Mike Frysinger <vapier@google.com>
* upload: move label validation to core functionMike Frysinger2022-05-211-6/+0
| | | | | | | | | This way we know we don't need to encode the labels. Change-Id: Ib83ed8f4ed05f00b9d2d06a9dd3f304e4443430e Reviewed-on: https://gerrit-review.googlesource.com/c/git-repo/+/337518 Tested-by: Mike Frysinger <vapier@google.com> Reviewed-by: LaMont Jones <lamontjones@google.com>
* Add multi-manifest support with <submanifest> elementv2.22LaMont Jones2022-02-171-17/+27
| | | | | | | | | | | To be addressed in another change: - a partial `repo sync` (with a list of projects/paths to sync) requires `--this-tree-only`. Change-Id: I6c7400bf001540e9d7694fa70934f8f204cb5f57 Reviewed-on: https://gerrit-review.googlesource.com/c/git-repo/+/322657 Tested-by: LaMont Jones <lamontjones@google.com> Reviewed-by: Mike Frysinger <vapier@google.com>
* commands: document the "common" class attributeMike Frysinger2021-06-151-1/+1
| | | | | | | | | | Switch it to uppercase to make it clear it's a constant, and add documentation so its usage is clear. Change-Id: I6d281a66a90b5908b3131585c9945e88cfe815ea Reviewed-on: https://gerrit-review.googlesource.com/c/git-repo/+/309322 Reviewed-by: Raman Tenneti <rtenneti@google.com> Tested-by: Mike Frysinger <vapier@google.com>
* subcmds: force consistent help text formatMike Frysinger2021-05-041-17/+17
| | | | | | | | | | | | We're inconsistent with help text as to whether it uses title case and whether it ends in a period. Add a test to enforce a standard, and use the style that Python optparse & argparse use themselves (e.g. with the --help option): always lowercase, and never trailing period. Change-Id: Ic1defae23daeac0ac9116aaf487427f50b34050d Reviewed-on: https://gerrit-review.googlesource.com/c/git-repo/+/305144 Reviewed-by: Raman Tenneti <rtenneti@google.com> Tested-by: Mike Frysinger <vapier@google.com>
* add --no-current-branch option to invert --current-branchMike Frysinger2021-05-041-0/+3
| | | | | | | | | | | | | | | | | For most commands, this is more about providing a way to undo earlier command line options (e.g. `repo info -c --no-current-branch`) which can be helpful for scripting & automation. But for the sync command, this is helpful to undo the setting that exists in the manifest itself. With this in place, tweak the sync current_branch_only logic to only apply the manifest settings when the user hasn't specified a command line option. Bug: https://crbug.com/gerrit/12401 Change-Id: I21e2384624680cc740d1b5d1e49c50589d2fe6a0 Reviewed-on: https://gerrit-review.googlesource.com/c/git-repo/+/304903 Reviewed-by: Raman Tenneti <rtenneti@google.com> Tested-by: Mike Frysinger <vapier@google.com>
* harmonize --current-branch short option across subcommandsMike Frysinger2021-05-031-1/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | We're inconsistent with the short option for this flag: * gitc-init: <none as -c is already used> * info: -b * init: -c * overview: -b * sync: -c * upload: --cbr Since info & overview are not as heavily used as the others, switch them from -b to -c. We leave -b in as a hidden alias for now. Similarly, switch upload from --cbr to just -c. A lot of people use --cbr, so we leave this as a hidden alias for now too. Ideally gitc-init wouldn't use -c, but that ship has sailed, and we're more likely to deprecate gitc entirely at this point. This provides a consistent set of options across subcommands. Bug: https://crbug.com/gerrit/12401 Change-Id: Iec249729223866fe1ea0ebabed12ca851cc38b35 Reviewed-on: https://gerrit-review.googlesource.com/c/git-repo/+/304902 Reviewed-by: Raman Tenneti <rtenneti@google.com> Tested-by: Mike Frysinger <vapier@google.com>
* upload: search local projects in parallelMike Frysinger2021-05-021-31/+37
| | | | | | | | | | | | | Search for project branches to upload in parallel. This can cut the lookup time in half for large projects. We still run the actual hooks in serial once we have the list of projects to process, but we would need to rethink things quite a bit before we could handle running them in parallel too. Change-Id: I8da0cbc5010566aa860e1a158f3dc07f0709dcff Reviewed-on: https://gerrit-review.googlesource.com/c/git-repo/+/304842 Reviewed-by: Raman Tenneti <rtenneti@google.com> Tested-by: Mike Frysinger <vapier@google.com>
* upload: include the project in error messagesMike Frysinger2021-05-021-2/+2
| | | | | | | | | | | When running upload across multiple projects, include the project in any error messages that come up. This lets users figure out where the problem might be. Change-Id: I09470c9a1b512baf910d6d97b747816d1a6f3a87 Reviewed-on: https://gerrit-review.googlesource.com/c/git-repo/+/304783 Reviewed-by: Raman Tenneti <rtenneti@google.com> Tested-by: Mike Frysinger <vapier@google.com>
* drop pyversion & is_python3 checkingMike Frysinger2021-01-061-5/+0
| | | | | | | | | | | We're committed to Python 3 at this point, so purge all the is_python3 related dynamic checks. Bug: https://crbug.com/gerrit/10418 Change-Id: I4c8b405d6de359b8b83223c9f4b9c8ffa18ea1a2 Reviewed-on: https://gerrit-review.googlesource.com/c/git-repo/+/292383 Reviewed-by: Chris Mcdonald <cjmcdonald@google.com> Tested-by: Mike Frysinger <vapier@google.com>
* strip python2-only coding:utf-8 & print_function settingsMike Frysinger2021-01-061-3/+0
| | | | | | | | | | We're committed to Python 3 at this point, so clean up boilerplate. Bug: https://crbug.com/gerrit/10418 Change-Id: Ib1719ba2eb65c53b94881a1a1bf203ddfcaaafed Reviewed-on: https://gerrit-review.googlesource.com/c/git-repo/+/292382 Reviewed-by: Chris Mcdonald <cjmcdonald@google.com> Tested-by: Mike Frysinger <vapier@google.com>
* Concentrate the RepoHook knowledge in the RepoHook classRemy Bohmer2020-11-231-53/+11
| | | | | | | | | | | | | | | | The knowledge about running hooks and all its exception handling is scattered over multiple files. This makes the code harder to read, but also it requires duplication of logic in case other RepoHooks are added to different commands. This refactoring also creates uniform behavior of the hooks across multiple commands and it guarantees the re-use of the same arguments on all of them. Signed-off-by: Remy Bohmer <github@bohmer.net> Change-Id: Ia4d90eab429e4af00943306e89faec8db35ba29d Reviewed-on: https://gerrit-review.googlesource.com/c/git-repo/+/277562 Tested-by: Remy Bohmer <oss@bohmer.net> Reviewed-by: Mike Frysinger <vapier@google.com>
* upload: improve tip for fixing upload remoteMike Frysinger2020-11-161-4/+4
| | | | | | | | | | | | Instead of assuming the repo client is tracking the "master" branch of the manifest repo, use the existing info we have to display the right info to the user. Bug: https://crbug.com/gerrit/13339 Change-Id: I8b265f4b2e075fdc41909b1f3dff9aee87384353 Reviewed-on: https://gerrit-review.googlesource.com/c/git-repo/+/287279 Reviewed-by: Michael Mortensen <mmortensen@google.com> Tested-by: Mike Frysinger <vapier@google.com>
* Move RepoHook class from project.py file to dedicated fileRemy Bohmer2020-11-031-1/+1
| | | | | | | | | | | | The project.py file is huge and contains multiple classes. By moving it to seperate class files the code becomes more readable and maintainable. Signed-off-by: Remy Bohmer <github@bohmer.net> Change-Id: Ida9d99d31751d627ae1ea0373418080696d2e14b Reviewed-on: https://gerrit-review.googlesource.com/c/git-repo/+/281293 Reviewed-by: Mike Frysinger <vapier@google.com> Tested-by: Remy Bohmer <linux@bohmer.net>
* upload: exit non-zero when preupload hooks failMike Frysinger2020-07-251-1/+1
| | | | | | | | Bug: https://crbug.com/gerrit/13159 Change-Id: Id140b619242c841223c6bc5d4aa0c37a7ce0219d Reviewed-on: https://gerrit-review.googlesource.com/c/git-repo/+/276294 Reviewed-by: Jonathan Nieder <jrn@google.com> Tested-by: Mike Frysinger <vapier@google.com>
* Fix how we format the full destination branch when uploading.Sean McAllister2020-05-191-1/+5
| | | | | | | | | | | | | | | | If the dest-branch attribute is set in the project manifest, then we need to push to that branch. Previously, we would unconditionally pre-pend the refs/heads prefix to it. The dest-branch attribute is allowed to be a ref expression though, so it may already have it. Simple fix is to check if it already has the prefix before adding it. Bug: crbug.com/gerrit/12770 Change-Id: I45d6107ed6cf305cf223023b0ddad4278f7f4146 Reviewed-on: https://gerrit-review.googlesource.com/c/git-repo/+/268152 Reviewed-by: Mike Frysinger <vapier@google.com> Tested-by: Sean McAllister <smcallis@google.com>
* upload: add config setting for upload notificationsMike Frysinger2020-03-151-1/+13
| | | | | | | | | | This allows people to set default e-mail notifications via gitconfig. Bug: https://crbug.com/gerrit/12451 Change-Id: Ic04ea3b7df0c5603c491961112c5be8cabb9dddd Reviewed-on: https://gerrit-review.googlesource.com/c/git-repo/+/259014 Tested-by: Mike Frysinger <vapier@google.com> Reviewed-by: David Pursehouse <dpursehouse@collab.net>
* upload: drop support for draftsMike Frysinger2020-02-251-5/+1
| | | | | | | | | Draft CLs were replaced by private/wip CLs in Gerrit instead years ago. Change-Id: If4f3d6606aad40a6f1617a49681dfd45c64d3d37 Reviewed-on: https://gerrit-review.googlesource.com/c/git-repo/+/256673 Reviewed-by: David Pursehouse <dpursehouse@collab.net> Tested-by: Mike Frysinger <vapier@google.com>
* upload: allow users to set labels when uploadingMike Frysinger2020-02-241-10/+33
| | | | | | | | | Bug: https://crbug.com/gerrit/11801 Change-Id: I060465105b4e68ddfc815e572f62bf5dac2c1ffd Reviewed-on: https://gerrit-review.googlesource.com/c/git-repo/+/256614 Tested-by: Mike Frysinger <vapier@google.com> Reviewed-by: Jack Rosenthal <jrosenth@chromium.org> Reviewed-by: David Pursehouse <dpursehouse@collab.net>
* upload: add a --hashtag-branch option akin to -tMike Frysinger2020-02-191-0/+5
| | | | | | | | | | This will automatically add the current local branch name as a hashtag. Bug: https://crbug.com/gerrit/10477 Change-Id: I888f8be8419c801f2d98b7a2ad2486799e94f32c Reviewed-on: https://gerrit-review.googlesource.com/c/git-repo/+/255893 Tested-by: Mike Frysinger <vapier@google.com> Reviewed-by: Mike Frysinger <vapier@google.com>
* upload: add support for --yesMike Frysinger2020-02-191-3/+14
| | | | | | | | | | | This adds a CLI option to the existing autoupload gitconfig knob that allows people to automatically answer "yes" to the various prompts. Bug: https://crbug.com/gerrit/12368 Change-Id: I819ebca01b9a40240b33866ae05907c7469703e3 Reviewed-on: https://gerrit-review.googlesource.com/c/git-repo/+/255892 Reviewed-by: David Pursehouse <dpursehouse@collab.net> Tested-by: Mike Frysinger <vapier@google.com>
* upload: add support for standard --dry-runMike Frysinger2020-02-191-0/+4
| | | | | | | Change-Id: I69ea2f3170ba17bfb9e0e3771db4ecc66a736797 Reviewed-on: https://gerrit-review.googlesource.com/c/git-repo/+/255856 Tested-by: Mike Frysinger <vapier@google.com> Reviewed-by: David Pursehouse <dpursehouse@collab.net>
* upload: add support for setting hashtagsMike Frysinger2020-02-191-0/+24
| | | | | | | | | | | This allows users to specify custom hashtags when uploading, both via the CLI and via the same gitconfig settings as other upload options. Bug: https://crbug.com/gerrit/11174 Change-Id: Ia0959e25b463e5f29d704e4d06e0de793d4fc77c Reviewed-on: https://gerrit-review.googlesource.com/c/git-repo/+/255855 Reviewed-by: David Pursehouse <dpursehouse@collab.net> Tested-by: Mike Frysinger <vapier@google.com>
* upload: improve no pending CL error handlingMike Frysinger2020-02-191-2/+6
| | | | | | | | | Show clearer messages and exit non-zero if there's nothing to upload. Change-Id: Icd9c13b9b1126610a409fc13d1d11bfc66f5e802 Reviewed-on: https://gerrit-review.googlesource.com/c/git-repo/+/255834 Reviewed-by: David Pursehouse <dpursehouse@collab.net> Tested-by: Mike Frysinger <vapier@google.com>
* flake8: Suppress "F821 undefined name" inline for Python 2 namesDavid Pursehouse2020-02-151-1/+1
| | | | | | | | | | | | | | | | All of the instances of this are related to Python 2 names that don't exist in Python 3, and the warnings are raised when running flake8 on Python 3. All of these will go away once we completely remove support for Python 2, so just suppress them inline. We don't globally suppress the check so that we will still see legitimate errors if/when they occur in new code. Change-Id: Iccf955f50abfc9f83b371fc0af6cceb51037456f Reviewed-on: https://gerrit-review.googlesource.com/c/git-repo/+/255039 Tested-by: David Pursehouse <dpursehouse@collab.net> Reviewed-by: Mike Frysinger <vapier@google.com>