summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Update errors to extend BaseRepoErrorJason Chang2023-07-315-33/+218
| | | | | | | | | | | | | | | | | | | In order to better analyze and track repo errors, repo command failures need to be tied to specific errors in repo source code. Additionally a new GitCommandError was added to differentiate between general git related errors to failed git commands. Git commands that opt into verification will raise a GitCommandError if the command failed. The first step in this process is a general error refactoring Bug: b/293344017 Change-Id: I46944b1825ce892757c8dd3f7e2fab7e460760c0 Reviewed-on: https://gerrit-review.googlesource.com/c/git-repo/+/380994 Commit-Queue: Jason Chang <jasonnc@google.com> Reviewed-by: Aravind Vasudevan <aravindvasudev@google.com> Tested-by: Jason Chang <jasonnc@google.com> Reviewed-by: Joanna Wang <jojwang@google.com>
* [repo logging] Add logging moduleAravind Vasudevan2023-07-312-0/+189
| | | | | | | | | Bug: b/292704435 Change-Id: I8834591f661c75449f8be5de1c61ecd43669026d Reviewed-on: https://gerrit-review.googlesource.com/c/git-repo/+/380714 Tested-by: Aravind Vasudevan <aravindvasudev@google.com> Reviewed-by: Joanna Wang <jojwang@google.com> Commit-Queue: Aravind Vasudevan <aravindvasudev@google.com>
* sync: Track last completed fetch/checkoutGavin Mak2023-07-283-17/+148
| | | | | | | | | | | | Save the latest time any project is fetched and checked out. This will be used to detect partial checkouts. Bug: b/286126621 Change-Id: I53b264dc70ba168d506076dbd693ef79a696b61d Reviewed-on: https://gerrit-review.googlesource.com/c/git-repo/+/380514 Commit-Queue: Gavin Mak <gavinmak@google.com> Reviewed-by: Joanna Wang <jojwang@google.com> Tested-by: Gavin Mak <gavinmak@google.com>
* main: Fix exitcode loggingv2.35Jason Chang2023-06-261-2/+31
| | | | | | | | | | | | | | | | Fixed a couple of bugs in ExitEvent logging: - log exitcode 130 on KeyboardInterrupt - log exitcode 1 on unhandled Exception - log errorevent with specific reason for exit Before this CL an exitcode of 0 would be logged, and it would be difficult to determine the cause of non-zero exit codes Bug: b/287105597 Change-Id: I2d34f180581f9fbd77a1c78c966ebed065223af6 Reviewed-on: https://gerrit-review.googlesource.com/c/git-repo/+/377834 Tested-by: Jason Chang <jasonnc@google.com> Reviewed-by: Josip Sokcevic <sokcevic@google.com>
* sync: Track new/existing project countJason Chang2023-06-231-0/+7
| | | | | | | | | | | New vs existing project may be a useful measure for analyzing sync performance. Bug: b/287105597 Change-Id: Ibea3e90c9fe3d16fd8b863bcae22b21963a6771a Reviewed-on: https://gerrit-review.googlesource.com/c/git-repo/+/377574 Tested-by: Jason Chang <jasonnc@google.com> Reviewed-by: Joanna Wang <jojwang@google.com>
* manifest: enable remove-project using pathFredrik de Groot2023-06-213-16/+89
| | | | | | | | | | | | | | | | | | | | | | | | | | | A something.xml that gets included by two different files, that both remove and add same shared project to two different locations, would not work prior to this change. Reason is that remove killed all name keys, even though reuse of same repo in different locations is allowed. Solve by adding optional attrib path to <remove-project name="foo" path="only_this_path" /> and tweak remove-project. Behaves as before without path, and deletes more selectively when remove path is supplied. As secondary feature, a project can now also be removed by only using path, assuming a matching project name can be found. Change-Id: I502d9f949f5d858ddc1503846b170473f76dc8e2 Reviewed-on: https://gerrit-review.googlesource.com/c/git-repo/+/375694 Tested-by: Fredrik de Groot <fredrik.de.groot@aptiv.com> Reviewed-by: Mike Frysinger <vapier@google.com>
* update links from monorail to issuetrackerMike Frysinger2023-06-144-8/+8
| | | | | | | | Change-Id: Ie05373aa4becc0e4d0cab74e7ea0a61eb2cc2746 Reviewed-on: https://gerrit-review.googlesource.com/c/git-repo/+/377014 Commit-Queue: Mike Frysinger <vapier@google.com> Reviewed-by: Gavin Mak <gavinmak@google.com> Tested-by: Mike Frysinger <vapier@google.com>
* sync: Handle case when output isn't connected to a terminalGavin Mak2023-06-091-5/+6
| | | | | | | | | | | Currently `repo sync | tee` exits with an OSError. Bug: https://crbug.com/gerrit/17023 Change-Id: I91ae05f1c91d374b5d57721d45af74db1b2072a5 Reviewed-on: https://gerrit-review.googlesource.com/c/git-repo/+/376414 Tested-by: Gavin Mak <gavinmak@google.com> Reviewed-by: Mike Frysinger <vapier@google.com> Commit-Queue: Gavin Mak <gavinmak@google.com>
* sync: Update sync progress even when _sync_dict is emptyv2.34.1Gavin Mak2023-05-301-3/+7
| | | | | | | | | | | | By chance, _sync_dict can be empty even though repo sync is still working. In that case, the progress message shows incorrect info. Handle this case and fix a bug where "0 jobs" can show. Bug: http://b/284465096 Change-Id: If915d953ba60e7cf84a6fb2d137fd6ed82abd3cc Reviewed-on: https://gerrit-review.googlesource.com/c/git-repo/+/375494 Tested-by: Gavin Mak <gavinmak@google.com> Reviewed-by: Josip Sokcevic <sokcevic@google.com> Commit-Queue: Gavin Mak <gavinmak@google.com>
* sync: Handle race condition when reading active jobsJosip Sokcevic2023-05-261-3/+3
| | | | | | | | | | | | | | | It's possible that number of jobs is more than 0 when we check length, but in the meantime number of jobs drops to 0. In that case, we are working with float(inf) which causes other problems Bug: 284383869 Change-Id: I5d070d1be428f8395df7fde8ca84866db46f2100 Reviewed-on: https://gerrit-review.googlesource.com/c/git-repo/+/375134 Reviewed-by: Mike Frysinger <vapier@google.com> Commit-Queue: Josip Sokcevic <sokcevic@google.com> Tested-by: Josip Sokcevic <sokcevic@google.com> Reviewed-by: Gavin Mak <gavinmak@google.com>
* pager: set $LESS only when missingChih-Hsuan Yen2023-05-261-1/+4
| | | | | | | | | | | | | | | | | | | | | This matches the git behavior. From [1], > When the `LESS` environment variable is unset, Git sets it to `FRX` > (if `LESS` environment variable is set, Git does not change it at > all). The default $LESS is changed from FRSX to FRX since git 2.1.0 [2]. This change also updates the default $LESS for repo. [1] https://git-scm.com/docs/git-config#Documentation/git-config.txt-corepager [2] https://github.com/git/git/commit/b3275838d969b7ecb91aae584226fccbeb046aca Bug: https://crbug.com/gerrit/16973 Change-Id: I64ccaa7b034fdb6a92c10025e47f5d07e85e6451 Reviewed-on: https://gerrit-review.googlesource.com/c/git-repo/+/374894 Reviewed-by: Chih-Hsuan Yen <x5f4qvj3w3ge2tiq@chyen.cc> Reviewed-by: Mike Frysinger <vapier@google.com> Tested-by: Chih-Hsuan Yen <x5f4qvj3w3ge2tiq@chyen.cc>
* Add envar to replace shallow clones with partialJason Chang2023-05-254-0/+55
| | | | | | | | | | | | | | | | An investigation go/git-repo-shallow shows a number of problems when doing a shallow git fetch/clone. This change introduces an environment variable REPO_ALLOW_SHALLOW. When this environment variable is set to 1 during a repo init or repo sync all shallow git fetch commands are replaced with partial fetch commands. Any shallow repository needing update is unshallowed. This behavior continues until a subsequent repo sync command is run with REPO_ALLOW_SHALLOW set to 1. Bug: b/274340522 Change-Id: I1c3188270629359e52449788897d9d4988ebf280 Reviewed-on: https://gerrit-review.googlesource.com/c/git-repo/+/374754 Reviewed-by: Josip Sokcevic <sokcevic@google.com> Tested-by: Jason Chang <jasonnc@google.com>
* sync: Show number of running fetch jobsv2.34Gavin Mak2023-05-252-8/+10
| | | | | | | | | | | | | Last of the recent `repo sync` UX changes. Show number of fetch jobs eg: "Fetching: 3% (8/251) 0:03 | 8 jobs | 0:01 chromiumos/overlays/chrom.." Bug: https://crbug.com/gerrit/11293 Change-Id: I1b3dcf3e56ae6731c6c6cb73cfce069b2f374b69 Reviewed-on: https://gerrit-review.googlesource.com/c/git-repo/+/374920 Reviewed-by: Josip Sokcevic <sokcevic@google.com> Commit-Queue: Gavin Mak <gavinmak@google.com> Tested-by: Gavin Mak <gavinmak@google.com> Reviewed-by: Joanna Wang <jojwang@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>
* project: Include tags option during fetch retryNasser Grainawi2023-05-251-0/+1
| | | | | | | | | | | | | | If the original fetch attempt did not want tags, we should continue to honor that when doing a retry fetch with depth set to None. This seems to match the intent of the retry based on the inline comment and results in a significant performance improvement when the original fetch-by-sha1 fails due to the server not allowing requests for unadvertised objects. Change-Id: Ia26bb31ea9aecc4ba2d3e87fc0c5412472cd98c4 Reviewed-on: https://gerrit-review.googlesource.com/c/git-repo/+/374918 Reviewed-by: Mike Frysinger <vapier@google.com> Reviewed-by: Kaushik Lingarkar <kaushik.lingarkar@linaro.org> Tested-by: Kaushik Lingarkar <kaushik.lingarkar@linaro.org>
* Parse OpenSSH versions with no SSH_EXTRAVERSIONSaagar Jha2023-05-242-1/+3
| | | | | | | | | | | If the Debian banner is not used, then there won't be a space after the version number: it'll be followed directly by a comma. Bug: https://crbug.com/gerrit/16903 Change-Id: I12b873f32afc9424f42b772399c346f96ca95a96 Reviewed-on: https://gerrit-review.googlesource.com/c/git-repo/+/372875 Tested-by: Saagar Jha <saagarjha@google.com> Reviewed-by: Mike Frysinger <vapier@google.com>
* sync: Show elapsed time for the longest syncing projectGavin Mak2023-05-185-26/+70
| | | | | | | | | | | | | | "Last synced: X" is printed only after a project finishes syncing. Replace that with a message that shows the longest actively syncing project. Bug: https://crbug.com/gerrit/11293 Change-Id: I84c7873539d84999772cd554f426b44921521e85 Reviewed-on: https://gerrit-review.googlesource.com/c/git-repo/+/372674 Reviewed-by: Josip Sokcevic <sokcevic@google.com> Commit-Queue: Gavin Mak <gavinmak@google.com> Reviewed-by: Joanna Wang <jojwang@google.com> Tested-by: Gavin Mak <gavinmak@google.com>
* [git_trace2] Add logs for critical cmdsJosip Sokcevic2023-05-176-20/+26
| | | | | | | | | | | | 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>
* [trace2] Add absolute time on trace2 exit eventsJosip Sokcevic2023-05-151-2/+4
| | | | | | | | Change-Id: I58aff46bd4ff4ba79286a7f1226e19eb568c34c5 Reviewed-on: https://gerrit-review.googlesource.com/c/git-repo/+/373954 Reviewed-by: Gavin Mak <gavinmak@google.com> Tested-by: Josip Sokcevic <sokcevic@google.com> Commit-Queue: Josip Sokcevic <sokcevic@google.com>
* SUBMITTING_PATCHES: update with commit queue detailsMike Frysinger2023-05-111-14/+19
| | | | | | | | Change-Id: I59dffb8524cb95b3fd4196bcecd18426f09bf9c4 Reviewed-on: https://gerrit-review.googlesource.com/c/git-repo/+/373694 Tested-by: Mike Frysinger <vapier@google.com> Commit-Queue: Mike Frysinger <vapier@google.com> Reviewed-by: Gavin Mak <gavinmak@google.com>
* sync: Fix how sync times for shared projects are recordedv2.33Gavin Mak2023-05-101-19/+15
| | | | | | | | | | | | https://gerrit.googlesource.com/git-repo/+/d947858325ae70ff9c0b2f463a9e8c4ffd00002a introduced a moving average of fetch times in 2012. The code does not handle shared projects, and averages times based on project names which is incorrect. Change-Id: I9926122cdb1ecf201887a81e96f5f816d3c2f72a Reviewed-on: https://gerrit-review.googlesource.com/c/git-repo/+/373574 Tested-by: Gavin Mak <gavinmak@google.com> Commit-Queue: Gavin Mak <gavinmak@google.com> Reviewed-by: Josip Sokcevic <sokcevic@google.com>
* manifest: add support for revision in includeShuchuan Zeng2023-05-053-4/+64
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Attribute groups can now be added to manifest include, thus all projects in an included manifest file can easily modify default branch without modifying all projects in that manifest file. For example, the main manifest.xml has an include node contain revision attribute, ``` <include name="include.xml" revision="r1" /> ``` and the include.xml has some projects, ``` <project path="project1_path" name="project1_name" revision="r2" /> <project path="project2_path" name="project2_name" /> ``` With this change, the final manifest will have revision="r1" for project2. ``` <project name="project1_name" path="project1_path" revision="r2" /> <project name="project2_name" path="project2_path" revision="r1" /> ``` Test: added unit tests to cover the inheritance Change-Id: I4b8547a7198610ec3a3c6aeb2136e0c0f3557df0 Reviewed-on: https://gerrit-review.googlesource.com/c/git-repo/+/369714 Reviewed-by: Mike Frysinger <vapier@google.com> Commit-Queue: Shuchuan Zeng <zengshuchuan@allwinnertech.com> Tested-by: Shuchuan Zeng <zengshuchuan@allwinnertech.com>
* sync: Display total elapsed fetch timeGavin Mak2023-05-022-9/+71
| | | | | | | | | | | | | Give users an indication that `repo sync` isn't stuck if taking a long time to fetch. Bug: https://crbug.com/gerrit/11293 Change-Id: Iccdaec918f86c9cc2db5dc12f9e3eef7ad0bcbda Reviewed-on: https://gerrit-review.googlesource.com/c/git-repo/+/371414 Tested-by: Gavin Mak <gavinmak@google.com> Reviewed-by: Josip Sokcevic <sokcevic@google.com> Reviewed-by: Joanna Wang <jojwang@google.com> Commit-Queue: Gavin Mak <gavinmak@google.com>
* [SyncAnalysisState] Preserve synctime µsJosip Sokcevic2023-04-271-1/+1
| | | | | | | | | | | | | | | By default, datetime.isoformat() uses different format depending on microseconds - if is equal to 0, microseconds are omitted, but otherwise not. Setting timespec = 'microseconds' ensures the format is the same regardless of current time. Change-Id: Icb1be31eb681247c7e46923cdeabb8f5469c20f0 Reviewed-on: https://gerrit-review.googlesource.com/c/git-repo/+/371694 Tested-by: Josip Sokcevic <sokcevic@google.com> Reviewed-by: Joanna Wang <jojwang@google.com> Commit-Queue: Josip Sokcevic <sokcevic@google.com>
* tests: do not allow underscores in cli optionsMike Frysinger2023-04-191-0/+14
| | | | | | | | | | | We use dashes in --long-options, not underscores, so add a test to make sure people don't accidentally add them. Change-Id: Iffbce474d22cf1f6c2042f7882f215875c8df3cf Reviewed-on: https://gerrit-review.googlesource.com/c/git-repo/+/369734 Reviewed-by: Gavin Mak <gavinmak@google.com> Tested-by: Mike Frysinger <vapier@google.com> Commit-Queue: Mike Frysinger <vapier@google.com>
* upload: Add `--no-follow-tags` by default to git pushAravind Vasudevan2023-04-051-0/+6
| | | | | | | | | | | Gerrit does not accept pushing git tags to CLs. Hence, this change disables push.followTags for repo upload. Fixed: b/155095555 Change-Id: I8d99eac29c0b4b375bdb857ed063914441026fa1 Reviewed-on: https://gerrit-review.googlesource.com/c/git-repo/+/367736 Tested-by: Aravind Vasudevan <aravindvasudev@google.com> Reviewed-by: Mike Frysinger <vapier@google.com> Commit-Queue: Aravind Vasudevan <aravindvasudev@google.com>
* run_tests: Check flake8Gavin Mak2023-03-313-7/+43
| | | | | | | | | | | This also gets enforced in CQ. Bug: b/267675342 Change-Id: I8ffcc5d583275072fd61ae65ae4214b36bfa59f3 Reviewed-on: https://gerrit-review.googlesource.com/c/git-repo/+/366799 Tested-by: Gavin Mak <gavinmak@google.com> Reviewed-by: Mike Frysinger <vapier@google.com> Commit-Queue: Gavin Mak <gavinmak@google.com>
* Update abandon to support multiple branchesAravind Vasudevan2023-03-241-5/+11
| | | | | | | | | | | This change updates `repo abandon` command to take multiple space-separated branchnames as parameters. Bug: https://crbug.com/gerrit/13354 Change-Id: I00ad7a79872c0e4161f8183843835f25cd515605 Reviewed-on: https://gerrit-review.googlesource.com/c/git-repo/+/365524 Tested-by: Aravind Vasudevan <aravindvasudev@google.com> Reviewed-by: Mike Frysinger <vapier@google.com> Commit-Queue: Aravind Vasudevan <aravindvasudev@google.com>
* run_tests: Always check black and check it lastGavin Mak2023-03-241-1/+1
| | | | | | | | | | | | | | | | https://gerrit-review.googlesource.com/c/git-repo/+/363474/24..25 meant to improve run_tests UX by letting users rerun it quickly, but it also removed CQ enforcement of formatting since CQ passes args to run_tests. Run pytest first so devs don't have format first and always check black formatting so it's enforced in CQ. Bug: b/267675342 Change-Id: I09544f110a6eb71b0c6c640787e10b04991a804e Reviewed-on: https://gerrit-review.googlesource.com/c/git-repo/+/365727 Tested-by: Gavin Mak <gavinmak@google.com> Reviewed-by: Mike Frysinger <vapier@google.com> Commit-Queue: Gavin Mak <gavinmak@google.com>
* Format codebase with black and check formatting in CQGavin Mak2023-03-2279-17789/+20808
| | | | | | | | | | | | 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>
* Make black with line length 80 repo's code styleGavin Mak2023-03-204-19/+58
| | | | | | | | | | | | | Provide a consistent formatting style and tox commands to lint and format. Bug: b/267675342 Change-Id: I33ddfe07af8473f4334c347d156246bfb66d4cfe Reviewed-on: https://gerrit-review.googlesource.com/c/git-repo/+/362954 Reviewed-by: Josip Sokcevic <sokcevic@google.com> Reviewed-by: Mike Frysinger <vapier@google.com> Tested-by: Gavin Mak <gavinmak@google.com> Commit-Queue: Gavin Mak <gavinmak@google.com>
* docs: update Focal Python versionMike Frysinger2023-03-021-1/+1
| | | | | | | | | | It ships with Python 3.8 by default, not 3.7. Change-Id: I11401d1098b60285cfdccadb6a06bb33a5f95369 Reviewed-on: https://gerrit-review.googlesource.com/c/git-repo/+/361634 Tested-by: Mike Frysinger <vapier@google.com> Reviewed-by: Josip Sokcevic <sokcevic@google.com> Commit-Queue: Mike Frysinger <vapier@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>
* tests: Change docstring for CopyLinkTestCaseGavin Mak2023-02-141-1/+1
| | | | | | | | Change-Id: Ic31b8073090abffe4e90cd208b684e99b83d7ef2 Reviewed-on: https://gerrit-review.googlesource.com/c/git-repo/+/358455 Tested-by: Gavin Mak <gavinmak@google.com> Commit-Queue: Gavin Mak <gavinmak@google.com> Reviewed-by: Josip Sokcevic <sokcevic@google.com>
* tests: Rework run_tests to use pytest directly and add vpython3 fileGavin Mak2023-02-132-40/+63
| | | | | | | | | | | | | Remove logic to handle importing the right version of pytest. './run_tests' still works but this allows presubmit builders to test using 'vpython3 ./run_tests'. Google-Bug-Id: b/266734831 Change-Id: I6a543c1f4b5b4449e723095b4a70e5228b1ccd34 Reviewed-on: https://gerrit-review.googlesource.com/c/git-repo/+/356717 Tested-by: Gavin Mak <gavinmak@google.com> Reviewed-by: Josip Sokcevic <sokcevic@google.com> Reviewed-by: Mike Frysinger <vapier@google.com>
* sync: Remove unused variableJosip Sokcevic2023-02-021-1/+1
| | | | | | | Change-Id: I44ab990c89ab4da82c424bae95e463cabb12fd50 Reviewed-on: https://gerrit-review.googlesource.com/c/git-repo/+/357136 Tested-by: Josip Sokcevic <sokcevic@google.com> Reviewed-by: Mike Frysinger <vapier@google.com>
* Handle KeyboardInterrupt during repo syncJosip Sokcevic2023-02-011-0/+2
| | | | | | | | | | | | | | If interrupt signal is sent to repo process while sync is running, repo prints stack trace for each concurrent job that is currently running with no useful information. Instead, this change captures KeyboardInterrupt in each process and prints one line about current project that is being processed. Change-Id: Ieca760ed862341939396b8186ae04128d769cd56 Reviewed-on: https://gerrit-review.googlesource.com/c/git-repo/+/357135 Reviewed-by: Joanna Wang <jojwang@google.com> Tested-by: Josip Sokcevic <sokcevic@google.com>
* Update sync progressJosip Sokcevic2023-02-011-1/+1
| | | | | | | | | | | | repo sync progress bar is misleading. Many bug reports mentioned that repo is stuck at the repo that is currently displayed in the progress bar. Repo sync actually shows what repository is the last processed. This change makes that obvious. Change-Id: I962bf0bc65af7ac0ed98db86e9144f07d9e1f96f Reviewed-on: https://gerrit-review.googlesource.com/c/git-repo/+/357134 Reviewed-by: Joanna Wang <jojwang@google.com> Tested-by: Josip Sokcevic <sokcevic@google.com>
* project: clean up error messageLaMont Jones2023-02-011-6/+8
| | | | | | | | | | | Superproject update failures on single-manifest checkouts had an extra space. Bug: b/254523816 Change-Id: I6f71e42337e324a6975c5d6bba487f83abaf054f Reviewed-on: https://gerrit-review.googlesource.com/c/git-repo/+/357056 Tested-by: LaMont Jones <lamontjones@google.com> Reviewed-by: Xin Li <delphij@google.com>
* Update bug tracking linksJosip Sokcevic2023-02-012-3/+3
| | | | | | | | | Update monorail component where actual git-repo bugs are. Change-Id: I46c68053683d7aa93585bb5633a598f1578b1468 Reviewed-on: https://gerrit-review.googlesource.com/c/git-repo/+/357057 Reviewed-by: Joanna Wang <jojwang@google.com> Tested-by: Josip Sokcevic <sokcevic@google.com>
* git_superproject: Log actual error fmt instead of the entire error message.Joanna Wang2023-02-012-24/+28
| | | | | | | | Bug: b/258492341 Change-Id: I00678d572712791190ae1ad4e1bcf3cbe04cc1c0 Reviewed-on: https://gerrit-review.googlesource.com/c/git-repo/+/357114 Tested-by: Joanna Wang <jojwang@google.com> Reviewed-by: Gavin Mak <gavinmak@google.com>
* sync: Silence 'not found in manifest' messageMichael Kelly2023-01-311-1/+1
| | | | | | | | | | | | | This can potentially show up when sync'ing projects with submodules that are not declared in the manifest as well as the internal '.repo/repo' project, which is likely not desirable from a user standpoint. Change-Id: I93d7fcd6e3fd1818357ea4537882a864dea9942c Reviewed-on: https://gerrit-review.googlesource.com/c/git-repo/+/355920 Reviewed-by: LaMont Jones <lamontjones@google.com> Reviewed-by: Mike Frysinger <vapier@google.com> Tested-by: Michael Kelly <mkelly@arista.com>
* Enable use of REPO_CONFIG_DIR to customize .repoconfig locationGavin Mak2023-01-283-7/+15
| | | | | | | | | | For use cases with multiple instances of repo, eg some CI environments. Bug: https://crbug.com/gerrit/15803 Change-Id: I65c1cfc8f6a98adfeb5efefc7ac6b45bf8e134de Reviewed-on: https://gerrit-review.googlesource.com/c/git-repo/+/356719 Tested-by: Gavin Mak <gavinmak@google.com> Reviewed-by: Mike Frysinger <vapier@google.com>
* init: Silence the "rm -r .repo and try again" message if quietGavin Mak2023-01-061-6/+5
| | | | | | | | Bug: b/258532367 Change-Id: I53a23aa0b237b0bb5f7e58464936f8c9b0db1311 Reviewed-on: https://gerrit-review.googlesource.com/c/git-repo/+/355915 Reviewed-by: Mike Frysinger <vapier@google.com> Tested-by: Gavin Mak <gavinmak@google.com>
* Fix flake8 warnings for some filesSergiy Belozorov2023-01-055-29/+33
| | | | | | | 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>
* update_manpages.py: treat regex as raw stringDaniel Kutik2022-12-131-4/+4
| | | | | | | | | | Treat the values in the regex map as raw strings to fix Invalid escape sequence 'g' (W605). Change-Id: I53bf5d6bd1e1d6a1d1293e4f55640b6513bf3075 Reviewed-on: https://gerrit-review.googlesource.com/c/git-repo/+/354698 Tested-by: Daniel Kutik <daniel.kutik@lavawerk.com> Reviewed-by: Mike Frysinger <vapier@google.com>
* Use 'backslashreplace' for decodeDaniel Kutik2022-12-131-2/+1
| | | | | | | | | Resolve TODO as we are now requiring Python 3. Change-Id: I7821627bd5c606276741c98efedaf5b11aecbcc3 Reviewed-on: https://gerrit-review.googlesource.com/c/git-repo/+/354702 Reviewed-by: Mike Frysinger <vapier@google.com> Tested-by: Daniel Kutik <daniel.kutik@lavawerk.com>
* Use print with flush=True instead of stdout.flushDaniel Kutik2022-12-132-15/+5
| | | | | | | | | | | 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>
* pylint: remove unused importsDaniel Kutik2022-12-138-13/+3
| | | | | | | | | Removed unused imports accross multiple files. Change-Id: Ib5ae4cebf9660e7339b11e3fa592d99f8d51e8d8 Reviewed-on: https://gerrit-review.googlesource.com/c/git-repo/+/354700 Tested-by: Daniel Kutik <daniel.kutik@lavawerk.com> Reviewed-by: Mike Frysinger <vapier@google.com>
* update-manpages: clean up symlink in checkoutMike Frysinger2022-12-124-104/+124
| | | | | | | | | | | We don't want symlinks in the git tree as it causes pain for Windows users. We also don't really need it as we can refactor the code we want to import slightly. Change-Id: I4537c07c50ee9449e9f53e0f132a386e8ffe16ec Reviewed-on: https://gerrit-review.googlesource.com/c/git-repo/+/354356 Tested-by: Mike Frysinger <vapier@google.com> Reviewed-by: LaMont Jones <lamontjones@google.com>