summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* repo: add some newer RSA/ECC signing keysMike Frysinger2020-02-141-4/+34
| | | | | | | | | | | | We've been using a DSA/1024 key to sign our tags. Time to update to something a bit newer. We'll include RSA & ECC keys, but only use RSA keys initially for backwards compatibility and see how it goes with our user base. Change-Id: I683c97b6fbd860f220ed4ddc7b21f07db279a916 Reviewed-on: https://gerrit-review.googlesource.com/c/git-repo/+/255112 Reviewed-by: David Pursehouse <dpursehouse@collab.net> Tested-by: Mike Frysinger <vapier@google.com>
* repo: Fix warnings reported by flake8David Pursehouse2020-02-141-3/+5
| | | | | | | | | | repo:342:5: E306 expected 1 blank line before a nested definition, found 0 repo:617:5: F841 local variable 'ret' is assigned to but never used Change-Id: I364fdb5dac8ebaff398b848935fe8356cb9ed2d3 Reviewed-on: https://gerrit-review.googlesource.com/c/git-repo/+/255035 Reviewed-by: Mike Frysinger <vapier@google.com> Tested-by: David Pursehouse <dpursehouse@collab.net>
* repo: add trace support to the launcherMike Frysinger2020-02-131-0/+24
| | | | | | | | | | Now that we have a central run_command point, we can easily add tracing support to the launcher script. Change-Id: I9e0335c196cafd6263ff501925abfe835f036c5e Reviewed-on: https://gerrit-review.googlesource.com/c/git-repo/+/254755 Tested-by: Mike Frysinger <vapier@google.com> Reviewed-by: David Pursehouse <dpursehouse@collab.net>
* repo: add some helpers akin to subprocess.runMike Frysinger2020-02-131-138/+104
| | | | | | | | | | | We can't rely on subprocess.run yet as that requires Python 3.6, but we can clean up the code we have with some ad-hoc replacement. This unifies all the inconsistent subprocess.Popen usage we have. Change-Id: I56af40a3df988ee47b299105d692ff419d07ad6b Reviewed-on: https://gerrit-review.googlesource.com/c/git-repo/+/254754 Reviewed-by: David Pursehouse <dpursehouse@collab.net> Tested-by: Mike Frysinger <vapier@google.com>
* pyflakes: Fix remaining "E501 line too long" warningsDavid Pursehouse2020-02-136-6/+12
| | | | | | | | | | | We increased the max line length to 100 columns which got rid of the majority of these warnings, but there were still a few lines that exceeded 100 columns. Change-Id: Ib3372868ca2297f83073a14f91c8ae3df9d0d0e6 Reviewed-on: https://gerrit-review.googlesource.com/c/git-repo/+/254699 Tested-by: David Pursehouse <dpursehouse@collab.net> Reviewed-by: Mike Frysinger <vapier@google.com>
* Update .mailmapDavid Pursehouse2020-02-131-0/+1
| | | | | | | Change-Id: I502a07e7702b73db9f0933cbfd4007c119e3463a Reviewed-on: https://gerrit-review.googlesource.com/c/git-repo/+/254700 Tested-by: David Pursehouse <dpursehouse@collab.net> Reviewed-by: Mike Frysinger <vapier@google.com>
* project: Don't emit locally modified hook warning in quiet modeDavid Pursehouse2020-02-131-10/+12
| | | | | | | Change-Id: I0f6db037b85f2a015fc7b7fd37472df848a58266 Reviewed-on: https://gerrit-review.googlesource.com/c/git-repo/+/254698 Reviewed-by: Mike Frysinger <vapier@google.com> Tested-by: David Pursehouse <dpursehouse@collab.net>
* Mention exceptions to Google Style Guide in SUBMITTING_PATCHES.mdDavid Pursehouse2020-02-131-3/+8
| | | | | | | Change-Id: I05d313c66f312942405a884a54118cb1d7af1bac Reviewed-on: https://gerrit-review.googlesource.com/c/git-repo/+/254671 Tested-by: David Pursehouse <dpursehouse@collab.net> Reviewed-by: Mike Frysinger <vapier@google.com>
* Don't format version to 5 characters in new version messageDavid Pursehouse2020-02-131-1/+1
| | | | | | | Change-Id: I6c734170173f77a6fef0678f189e198bdaeec425 Reviewed-on: https://gerrit-review.googlesource.com/c/git-repo/+/254668 Tested-by: David Pursehouse <dpursehouse@collab.net> Reviewed-by: Mike Frysinger <vapier@google.com>
* Replace 'A new repo command' with 'A new version of repo'David Pursehouse2020-02-131-2/+2
| | | | | | | Change-Id: I3288f5c963b69d05d113fc039e4b4f22721f1de9 Reviewed-on: https://gerrit-review.googlesource.com/c/git-repo/+/254667 Tested-by: David Pursehouse <dpursehouse@collab.net> Reviewed-by: Mike Frysinger <vapier@google.com>
* repo: Remove duplicate import of 'os'David Pursehouse2020-02-131-1/+0
| | | | | | | Change-Id: I9874a5deacdb6a8ce98a8a383326a5b41b1518df Reviewed-on: https://gerrit-review.googlesource.com/c/git-repo/+/254697 Reviewed-by: Mike Frysinger <vapier@google.com> Tested-by: David Pursehouse <dpursehouse@collab.net>
* repo: Remove another usage of bare 'except'David Pursehouse2020-02-131-1/+1
| | | | | | | Change-Id: I9195b40f5af7cbf74b47376a4708de82495f8fba Reviewed-on: https://gerrit-review.googlesource.com/c/git-repo/+/254696 Reviewed-by: Mike Frysinger <vapier@google.com> Tested-by: David Pursehouse <dpursehouse@collab.net>
* repo: Remove unused variable in 'except'David Pursehouse2020-02-131-1/+1
| | | | | | | Change-Id: I90f89ed6638a3d2a9e665ebbedef5dd7902f5429 Reviewed-on: https://gerrit-review.googlesource.com/c/git-repo/+/254695 Reviewed-by: Mike Frysinger <vapier@google.com> Tested-by: David Pursehouse <dpursehouse@collab.net>
* repo: Fix blank line issues reported by flake8David Pursehouse2020-02-131-0/+3
| | | | | | | Change-Id: I62633e71a36b2acbd09e205447a02159dd334896 Reviewed-on: https://gerrit-review.googlesource.com/c/git-repo/+/254694 Reviewed-by: Mike Frysinger <vapier@google.com> Tested-by: David Pursehouse <dpursehouse@collab.net>
* repo: bump launcher version for accumulated fixesv2.3Mike Frysinger2020-02-121-1/+1
| | | | | | | Change-Id: I5d9b866cc53d3824a01f5f0af127cf0c3ff97366 Reviewed-on: https://gerrit-review.googlesource.com/c/git-repo/+/254757 Reviewed-by: David Pursehouse <dpursehouse@collab.net> Tested-by: Mike Frysinger <vapier@google.com>
* repo: avoid bare excepts to allow SystemExit to bubbleMike Frysinger2020-02-121-1/+1
| | | | | | | | Bug: https://crbug.com/gerrit/12327 Change-Id: I4ce1142379b111f9ba3a2e5a437026e5c0378a9e Reviewed-on: https://gerrit-review.googlesource.com/c/git-repo/+/254756 Reviewed-by: David Pursehouse <dpursehouse@collab.net> Tested-by: Mike Frysinger <vapier@google.com>
* sync: add a "finished" messageMike Frysinger2020-02-121-0/+3
| | | | | | | | | | | | | Some people find the existing output to be a bit confusing. It spews a lot of git output before exiting, but it's not exactly clear what the final state is when things pass. Add an explicit message. Bug: https://crbug.com/gerrit/10501 Change-Id: I9de83b595d3185feb820005b8fc81c6adc55b357 Reviewed-on: https://gerrit-review.googlesource.com/c/git-repo/+/254732 Reviewed-by: Michael Mortensen <mmortensen@google.com> Reviewed-by: Mike Frysinger <vapier@google.com> Tested-by: Mike Frysinger <vapier@google.com>
* repo: add --version support to the launcherMike Frysinger2020-02-123-1/+38
| | | | | | | | | | | We can get version info when in a checkout, but it'd be helpful to show that info at all times. Change-Id: Ieeb44a503c9d7d8c487db4810bdcf3d5f6656c82 Reviewed-on: https://gerrit-review.googlesource.com/c/git-repo/+/254712 Reviewed-by: Michael Mortensen <mmortensen@google.com> Reviewed-by: Mike Frysinger <vapier@google.com> Tested-by: Mike Frysinger <vapier@google.com>
* repo: export GIT_TRACE2_PARENT_SIDMike Frysinger2020-02-122-13/+84
| | | | | | | | | | | | | This helps with people tracing repo/git execution. We use a similar format to git, but a little simpler since we always initialize the env var setting, and we want to avoid too much overhead. Bug: https://crbug.com/gerrit/12314 Change-Id: I75675b6cc4c6f7c4f5e09f54128eba9456364d04 Reviewed-on: https://gerrit-review.googlesource.com/c/git-repo/+/254331 Reviewed-by: Josh Steadmon <steadmon@google.com> Reviewed-by: Mike Frysinger <vapier@google.com> Tested-by: Mike Frysinger <vapier@google.com>
* flake8: Add comments in config to explain suppressed checksDavid Pursehouse2020-02-121-1/+11
| | | | | | | Change-Id: Ib5c09b36d40a96ba9167b42b3bd2f1ed072660b7 Reviewed-on: https://gerrit-review.googlesource.com/c/git-repo/+/254611 Tested-by: David Pursehouse <dpursehouse@collab.net> Reviewed-by: Mike Frysinger <vapier@google.com>
* repo: move parser init out of module scopeMike Frysinger2020-02-121-82/+68
| | | | | | | | | | | We import the wrapper on the fly, so minimize how much code we run in module scope. It's pointless/wasted when importing. Change-Id: I4a71c2030325d0a639585671cd7ebe8f22687ecd Reviewed-on: https://gerrit-review.googlesource.com/c/git-repo/+/254072 Tested-by: Mike Frysinger <vapier@google.com> Reviewed-by: David Pursehouse <dpursehouse@collab.net> Reviewed-by: Mike Frysinger <vapier@google.com>
* drop old git_require checksMike Frysinger2020-02-123-7/+3
| | | | | | | | | | We've been requiring git-1.7.2 since Oct 2012, so we can safely drop the individual checks sprinkled throughout the code base for older. Change-Id: I1737fff7b3f27f475960b0bff9cb300aefd5d108 Reviewed-on: https://gerrit-review.googlesource.com/c/git-repo/+/253135 Reviewed-by: David Pursehouse <dpursehouse@collab.net> Tested-by: Mike Frysinger <vapier@google.com>
* flake8: Ignore 'line break before/after binary operator'David Pursehouse2020-02-121-1/+1
| | | | | | | | | | | | | | - W503 line break before binary operator - W504 line break after binary operator There doesn't seem to be a nice way of fixing all of these without replacing W503 with W504 or vice-versa, or unwrapping them resulting in excessively long lines. Let's just suppress them. Change-Id: I7846d0124054f58e1cb480d4459cd9c86b737a50 Reviewed-on: https://gerrit-review.googlesource.com/c/git-repo/+/254608 Reviewed-by: Mike Frysinger <vapier@google.com> Tested-by: David Pursehouse <dpursehouse@collab.net>
* git_config: Stop using backslash to wrap linesDavid Pursehouse2020-02-121-7/+6
| | | | | | | | | | Unwrap one unnecessarily wrapped line, and use parentheses on a wrapped condition instead of wrapping with backslashes. Change-Id: I12679a0547dd822b15a6551e0f6c308239ff7b2d Reviewed-on: https://gerrit-review.googlesource.com/c/git-repo/+/254607 Reviewed-by: Mike Frysinger <vapier@google.com> Tested-by: David Pursehouse <dpursehouse@collab.net>
* Fix usage of bare 'except'David Pursehouse2020-02-123-6/+6
| | | | | | | | | | | | | | | | | | | | | | flake8 reports: E722 do not use bare 'except' Replace them with 'except Exception' per [1] which says: Bare except will catch exceptions you almost certainly don't want to catch, including KeyboardInterrupt (the user hitting Ctrl+C) and Python-raised errors like SystemExit If you don't have a specific exception you're expecting, at least except Exception, which is the base type for all "Regular" exceptions. [1] https://stackoverflow.com/a/54948581 Change-Id: Ic555ea9482645899f5b04040ddb6b24eadbf9062 Reviewed-on: https://gerrit-review.googlesource.com/c/git-repo/+/254606 Reviewed-by: Mike Frysinger <vapier@google.com> Tested-by: David Pursehouse <dpursehouse@collab.net>
* Fix blank line issues reported by flake8David Pursehouse2020-02-1243-12/+148
| | | | | | | | | | | | | | | | | | | | - E301 expected 1 blank line - E302 expected 2 blank lines - E303 too many blank lines - E305 expected 2 blank lines after class or function definition - E306 expected 1 blank line before a nested definition Fixed automatically with autopep8: git ls-files | grep py$ | xargs autopep8 --in-place \ --select E301,E302,E303,E305,E306 Manually fix issues in project.py caused by misuse of block comments. Change-Id: Iee840fcaff48aae504ddac9c3e76d2acd484f6a9 Reviewed-on: https://gerrit-review.googlesource.com/c/git-repo/+/254599 Reviewed-by: Mike Frysinger <vapier@google.com> Tested-by: David Pursehouse <dpursehouse@collab.net>
* Fix indentation issues reported by flake8David Pursehouse2020-02-1219-133/+133
| | | | | | | | | | | | | | | | | | | | | - E121 continuation line under-indented for hanging indent - E122 continuation line missing indentation or outdented - E125 continuation line with same indent as next logical line - E126 continuation line over-indented for hanging indent - E127 continuation line over-indented for visual indent - E128 continuation line under-indented for visual indent - E129 visually indented line with same indent as next logical line - E131 continuation line unaligned for hanging indent Fixed automatically with autopep8: git ls-files | grep py$ | xargs autopep8 --in-place \ --select E121,E122,E125,E126,E127,E128,E129,E131 Change-Id: Ifd95fb8e6a1a4d6e9de187b5787d64a6326dd249 Reviewed-on: https://gerrit-review.googlesource.com/c/git-repo/+/254605 Reviewed-by: Mike Frysinger <vapier@google.com> Tested-by: David Pursehouse <dpursehouse@collab.net>
* git_config: Unwrap unnecessarily wrapped lineDavid Pursehouse2020-02-121-3/+1
| | | | | | | Change-Id: I56806e8b9b09cd0f7fb834d7edc412682f2af1db Reviewed-on: https://gerrit-review.googlesource.com/c/git-repo/+/254604 Reviewed-by: Mike Frysinger <vapier@google.com> Tested-by: David Pursehouse <dpursehouse@collab.net>
* command: Add parentheses on wrapped conditionDavid Pursehouse2020-02-121-3/+3
| | | | | | | | | | | Surround the condition with parentheses rather than using backslashes. This prevents confusion about indentation when running flake8/autoflake8. Change-Id: I01775b96f817ee616f545b55369a4864fa1d6712 Reviewed-on: https://gerrit-review.googlesource.com/c/git-repo/+/254603 Reviewed-by: Mike Frysinger <vapier@google.com> Tested-by: David Pursehouse <dpursehouse@collab.net>
* Fix various whitespace issues reported by pyflakesDavid Pursehouse2020-02-1216-32/+32
| | | | | | | | | | | | | | | | | | | | | | - E201 whitespace after '[' - E202 whitespace before '}' - E221 multiple spaces before operator - E222 multiple spaces after operator - E225 missing whitespace around operator - E226 missing whitespace around arithmetic operator - E231 missing whitespace after ',' - E261 at least two spaces before inline comment - E271 multiple spaces after keyword Fixed automatically with autopep8: git ls-files | grep py$ | xargs autopep8 --in-place \ --select E201,E202,E221,E222,E225,E226,E231,E261,E271 Change-Id: I367113eb8c847eb460532c7c2f8643f33040308c Reviewed-on: https://gerrit-review.googlesource.com/c/git-repo/+/254601 Reviewed-by: Mike Frysinger <vapier@google.com> Tested-by: David Pursehouse <dpursehouse@collab.net>
* Remove redundant backslashesDavid Pursehouse2020-02-123-5/+5
| | | | | | | | | | | | | | | fleka8 reports: E502 the backslash is redundant between brackets Fixed automatically with autopep8: git-repo $ git ls-files | grep py$ | xargs autopep8 --in-place --select E502 Change-Id: I1486ae1d17206918474363daf518274c5be8daed Reviewed-on: https://gerrit-review.googlesource.com/c/git-repo/+/254602 Tested-by: David Pursehouse <dpursehouse@collab.net> Reviewed-by: Mike Frysinger <vapier@google.com>
* pager: Remove unnecessary semicolonsDavid Pursehouse2020-02-121-2/+2
| | | | | | | | | | | flake8 reports: E703 statement ends with a semicolon Change-Id: Ia63fc9efb04425e425c0f289272db76ff1ceeb34 Reviewed-on: https://gerrit-review.googlesource.com/c/git-repo/+/254600 Tested-by: David Pursehouse <dpursehouse@collab.net> Reviewed-by: Mike Frysinger <vapier@google.com>
* Remove unused importsDavid Pursehouse2020-02-122-2/+1
| | | | | | | | | | | flake8 reports: F401 'name' imported but unused Change-Id: Id45d6efa87ddf53f2c4a0f0c4136ea361ab1b746 Reviewed-on: https://gerrit-review.googlesource.com/c/git-repo/+/254592 Reviewed-by: Mike Frysinger <vapier@google.com> Tested-by: David Pursehouse <dpursehouse@collab.net>
* Fix tests for membership to use 'not in'David Pursehouse2020-02-124-5/+5
| | | | | | | | | | | flake8 reports: E713 test for membership should be 'not in' Change-Id: I4446be67c431b7267105b53478d2ceba2af758d7 Reviewed-on: https://gerrit-review.googlesource.com/c/git-repo/+/254451 Tested-by: David Pursehouse <dpursehouse@collab.net> Reviewed-by: Mike Frysinger <vapier@google.com>
* upload: Fix tests for object identity to use 'is not'David Pursehouse2020-02-121-2/+2
| | | | | | | | | | | flake8 reports: E714 test for object identity should be 'is not' Change-Id: Ib8c4100babaf952bbfe65fd56555ece8a958e4b0 Reviewed-on: https://gerrit-review.googlesource.com/c/git-repo/+/254450 Tested-by: David Pursehouse <dpursehouse@collab.net> Reviewed-by: Mike Frysinger <vapier@google.com>
* Fix flake8 E251 unexpected spaces around keyword / parameter equalsDavid Pursehouse2020-02-1211-100/+100
| | | | | | | | | | | Fixed automatically with autopep8: git ls-files | grep py$ | xargs autopep8 --in-place --select E251 Change-Id: I58009e1c8c91c39745d559ac919be331d4cd9e77 Reviewed-on: https://gerrit-review.googlesource.com/c/git-repo/+/254598 Tested-by: David Pursehouse <dpursehouse@collab.net> Reviewed-by: Mike Frysinger <vapier@google.com>
* flake8: Increase max line length from 80 to 100David Pursehouse2020-02-121-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | The Google style guide for python [1] says the maximum line length should be 80, but there are several lines in the code base that exceed it: git ls-files | grep py$ | xargs flake8 | grep E501 | wc -l 64 I don't think it's worth going through and re-wrapping all those, so just increase the limit to 100 which seems to be a reasonable compromise: git ls-files | grep py$ | xargs flake8 | grep E501 | wc -l 6 Leave the re-rewrapping of those lines for a follow-up commit, though. [1] http://google.github.io/styleguide/pyguide.html#32-line-length Change-Id: Ia37c34301163431fd1fb4fb6697a4a482d6be077 Reviewed-on: https://gerrit-review.googlesource.com/c/git-repo/+/254595 Tested-by: David Pursehouse <dpursehouse@collab.net> Reviewed-by: Mike Frysinger <vapier@google.com>
* upload: Fix flake8 E241 multiple spaces after ','David Pursehouse2020-02-121-3/+3
| | | | | | | Change-Id: I3a65869f9d006027270a7826d7982950c0e6759a Reviewed-on: https://gerrit-review.googlesource.com/c/git-repo/+/254597 Tested-by: David Pursehouse <dpursehouse@collab.net> Reviewed-by: Mike Frysinger <vapier@google.com>
* project: make syncing a little more self-healingMike Frysinger2020-02-121-2/+24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | We have a few files that we optionally symlink from the work tree .git/ to the .repo/projects/ path. If they don't exist when we first initialize, then we skip creating symlinks. If the files are created later on under the work tree .git/, repo gets upset. This can happen with the packed-refs file: if we don't have any packed refs initially, we don't symlink it. But if git tries to pack refs later on and creates the file, the project gets wedged. We could create an empty file initially and then symlink it, but for some files, it's not clear we want to always do that (e.g. the .git/shallow setting). Instead, lets make handling of these paths more dynamic. If they show up later on in the work tree .git/ only, we'll take care of relocating & symlinking. This also makes repo a little more robust and autorecovers incase a path goes missing in one of the dirs. Ideally we wouldn't monkey around at all here, but considering the only option we give to users currently is to blow things away with --force-sync, this seems a bit better. Bug: https://crbug.com/gerrit/12324 Change-Id: Ia6960f1896ac6d890c762d7d053684a1c6ab2c87 Reviewed-on: https://gerrit-review.googlesource.com/c/git-repo/+/254632 Reviewed-by: David Pursehouse <dpursehouse@collab.net> Tested-by: Mike Frysinger <vapier@google.com>
* info: Fix formatting of block commentDavid Pursehouse2020-02-121-1/+1
| | | | | | | | | | | | | flake8 reports: E265 block comment should start with '# ' While we're at it, add a period at the end of the comment sentence. Change-Id: Icb7119079a1d64e6defafc3f6d24e99dbf16139d Reviewed-on: https://gerrit-review.googlesource.com/c/git-repo/+/254596 Tested-by: David Pursehouse <dpursehouse@collab.net> Reviewed-by: Mike Frysinger <vapier@google.com>
* upload: add a --ignore-hooks optionMike Frysinger2020-02-121-6/+22
| | | | | | | | | | | | | | | | When upload hooks fail, people are forced to use --no-verify to upload CLs anyways. When projects have flaky hooks, this trains people to always use that option. This is obviously bad: hooks might get fixed, or some of the hooks are always good & people should review. Lets add an --ignore-hooks option. This still runs the hooks, but any failures will be ignored and allow the user to upload anyways. Bug: https://crbug.com/gerrit/12230 Change-Id: Ide2ac8a40a656bfcd6aae20c3ce8118e06bf909b Reviewed-on: https://gerrit-review.googlesource.com/c/git-repo/+/254452 Tested-by: Mike Frysinger <vapier@google.com> Reviewed-by: David Pursehouse <dpursehouse@collab.net>
* Remove trailing blank linesDavid Pursehouse2020-02-122-2/+0
| | | | | | | | | | | flake8 reports: W391 blank line at end of file Change-Id: I5498b2de2d1268d4f1f4b9e1760f9fa93a6da4cd Reviewed-on: https://gerrit-review.googlesource.com/c/git-repo/+/254594 Tested-by: David Pursehouse <dpursehouse@collab.net> Reviewed-by: Mike Frysinger <vapier@google.com>
* test_project.py: Remove unused variable in 'with' statementDavid Pursehouse2020-02-121-1/+1
| | | | | | | | | | | flake8 reports: F841 local variable 'f' is assigned to but never used Change-Id: If808eb381ee44c7da71e6281615a06a6723cf945 Reviewed-on: https://gerrit-review.googlesource.com/c/git-repo/+/254593 Tested-by: David Pursehouse <dpursehouse@collab.net> Reviewed-by: Mike Frysinger <vapier@google.com>
* Fix duplicate method name in test_project.pyDavid Pursehouse2020-02-121-2/+2
| | | | | | | | | | | | | | flake8 reports: F811 redefinition of unused 'test_src_block_dir' from line 259 which is caused by having two methods with the same name. Rename them both to better desribe their purpose. Change-Id: If7612a42001776d71bb1a6a80fc631d3d262e6ce Reviewed-on: https://gerrit-review.googlesource.com/c/git-repo/+/254449 Reviewed-by: Mike Frysinger <vapier@google.com> Tested-by: David Pursehouse <dpursehouse@collab.net>
* Revert "Save cookies back to jar when fetching clone.bundle"v2.2Mike Frysinger2020-02-121-1/+1
| | | | | | | | | | | | | | | This reverts commit 4abf8e6ef81e78469148b156ae2d2da70ace627a. The curl process for updating the cookie file is not atomic. When fetching many bundles in parallel, we can sometimes corrupt the file causing it to be cleared. Since users should manage gitcookies on their own, leave it read-only. Bug: https://crbug.com/gerrit/12300 Change-Id: Id472c99b197bc4cf8533c649f8881509f38643c1 Reviewed-on: https://gerrit-review.googlesource.com/c/git-repo/+/254092 Reviewed-by: David Pursehouse <dpursehouse@collab.net> Tested-by: Mike Frysinger <vapier@google.com>
* repo: lower min version of git a bitMike Frysinger2020-02-123-5/+24
| | | | | | | | | | | | | | | | | | | | | | We were perhaps a bit too hasty to jump to git-2.10. Existing LTS releases of Ubuntu are quite old still: Trusty has 1.9 while Xenial has 2.5. While we plan on dropping support for those eventually as we migrate to Python 3.6, we don't need to be so strict just yet on the git versions. We also want to disconnect the version the repo launcher requires from the version the rest of the source tree requires. The repo launcher doesn't need as many features, and being flexible there allows us more freedom to upgrade & rollback as needed. So we'll allow git-1.7 again, but start warning on any users older than git-1.9. This aligns better with existing LTS releases, and gives users a chance to start upgrading before we cut them off. Change-Id: I140305dd8e42c9719c84e2aee0dc6a5c5b18da25 Reviewed-on: https://gerrit-review.googlesource.com/c/git-repo/+/254573 Reviewed-by: David Pursehouse <dpursehouse@collab.net> Tested-by: Mike Frysinger <vapier@google.com>
* docs: document git/python/Ubuntu/Debian release schedulesMike Frysinger2020-02-121-1/+85
| | | | | | | | | | | | | | | | Going purely on upstream package release cycles doesn't tell the whole story: a lot of people run LTS distros which will have older versions of software we want to support. Build out a table for us to quickly reference when making decisions as to what versions of git/python we want to support, and when we can drop them. This will also help to refer users to as why we made a specific decision that might be affecting them. Change-Id: I7aea24bbefd50e358aeacf11e8c15a346c8fb8a9 Reviewed-on: https://gerrit-review.googlesource.com/c/git-repo/+/254572 Tested-by: Mike Frysinger <vapier@google.com> Reviewed-by: David Pursehouse <dpursehouse@collab.net>
* sync: change how we preserve objects in shared reposMike Frysinger2020-02-111-2/+13
| | | | | | | | | | | | | | | | | | | Some automatic git operations will prune objects on us, and not just the gc step. Normally we don't care, but with shared projects, we will have multiple git checkouts with refs that the others cannot see, but with a shared object dir. Any pruning of objects based on refs in just one repo can easily break the others. git-2.7.0 introduced a preciousObjects setting which tells git to never prune objects for this exact scenario: there might be refs in some location that git is unable to see. Change-Id: I781de27c5bbe1d4c70f0187566141c9cce088bd8 Reviewed-on: https://gerrit-review.googlesource.com/c/git-repo/+/254392 Reviewed-by: Nasser Grainawi <nasser@codeaurora.org> Reviewed-by: David Riley <davidriley@google.com> Reviewed-by: Mike Frysinger <vapier@google.com> Tested-by: Mike Frysinger <vapier@google.com>
* project: fix bytes/str encoding when updating git submodulesMike Frysinger2020-02-111-1/+1
| | | | | | | | | | | | Since tempfile.mkstemp() returns a file handle in binary mode, make sure we turn our strings into bytes before writing. Bug: https://crbug.com/gerrit/12043 Change-Id: I3e84d595e84b8bc12a1fbc7fd0bb3ea0ba2832b0 Reviewed-on: https://gerrit-review.googlesource.com/c/git-repo/+/254393 Reviewed-by: Michael Mortensen <mmortensen@google.com> Reviewed-by: Mike Frysinger <vapier@google.com> Tested-by: Mike Frysinger <vapier@google.com>
* project: allow src=. with symlinksv2.1.1Mike Frysinger2020-02-112-1/+29
| | | | | | | | | | | | | Some Android/Nest manifests are using <linkfile> with src="." to create stable paths to specific projects. Allow that specific use case as it seems reasonable to support. Bug: https://crbug.com/gerrit/11218 Change-Id: I16dbe8d9fe42ea45440afcb61404c753bff1930d Reviewed-on: https://gerrit-review.googlesource.com/c/git-repo/+/254330 Reviewed-by: Chanho Park <parkch98@gmail.com> Reviewed-by: Mike Frysinger <vapier@google.com> Tested-by: Mike Frysinger <vapier@google.com>