summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* git_config: add support for repo-specific settingsMike Frysinger2020-02-202-1/+16
| | | | | | | | | | | This allows people to write ~/.repoconfig/config akin to ~/.gitconfig and .repo/config akin to .git/config. This allows us to add settings specific to repo without mixing up git, and to persist in general. Change-Id: I1c6fbe31e63fb8ce26aa85335349c6ae5b1712c6 Reviewed-on: https://gerrit-review.googlesource.com/c/git-repo/+/255832 Reviewed-by: David Pursehouse <dpursehouse@collab.net> Tested-by: Mike Frysinger <vapier@google.com>
* project/sync: move DeleteProject helper to ProjectMike Frysinger2020-02-202-81/+120
| | | | | | | | | | | | Since deleting a source checkout involves a good bit of internal knowledge of .repo/, move the DeleteProject helper out of the sync code and into the Project class itself. This allows us to add git worktree support to it so we can unlock/unlink project checkouts. Change-Id: If9af8bd4a9c7e29743827d8166bc3db81547ca50 Reviewed-on: https://gerrit-review.googlesource.com/c/git-repo/+/256072 Reviewed-by: Jonathan Nieder <jrn@google.com> Tested-by: Mike Frysinger <vapier@google.com>
* project: set core.repositoryFormatVersion=1 when using extensionsMike Frysinger2020-02-192-4/+21
| | | | | | | | | | | When using extensions, make sure we set the git repo format version so git knows to check the extension compatibility. We can add a helper to the Project API to simplify this and make it foolproof. Change-Id: I9ab6c32d92fe2b8e5df6e2b080ca71556332e909 Reviewed-on: https://gerrit-review.googlesource.com/c/git-repo/+/256035 Tested-by: Mike Frysinger <vapier@google.com> Reviewed-by: Jonathan Nieder <jrn@google.com>
* git_config: add GetInt helperMike Frysinger2020-02-193-0/+84
| | | | | | | Change-Id: Ic034ae2fd962299d1b352e597b391b6582ecf44b Reviewed-on: https://gerrit-review.googlesource.com/c/git-repo/+/256052 Tested-by: Mike Frysinger <vapier@google.com> Reviewed-by: Jonathan Nieder <jrn@google.com>
* docs: improve project-objects & worktrees layout infoMike Frysinger2020-02-191-9/+13
| | | | | | | | | | Make it clear that the paths have a .git suffix, and clarify the reason for not using remote servers in the layout. Change-Id: I62c6977ee6f4e1e9882d45727eb239cf5489d2b6 Reviewed-on: https://gerrit-review.googlesource.com/c/git-repo/+/256033 Reviewed-by: Jonathan Nieder <jrn@google.com> Tested-by: Mike Frysinger <vapier@google.com>
* 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>
* repo: reexec into Python 3 under WindowsMike Frysinger2020-02-191-4/+2
| | | | | | | | | | Hopefully enough issues should be resolved now that we can start forcing Windows users into Python 3 too. Change-Id: Ic4aad6a0b35ffec7d1372e3da6fca11a2b6fde0b Reviewed-on: https://gerrit-review.googlesource.com/c/git-repo/+/255353 Reviewed-by: David Pursehouse <dpursehouse@collab.net> Tested-by: Mike Frysinger <vapier@google.com>
* add experimental git worktree supportMike Frysinger2020-02-196-23/+138
| | | | | | | | | | | | | | | | | This provides initial support for using git worktrees internally instead of our own ad-hoc symlink tree. It's been lightly tested which is why it's not currently exposed via --help. When people opt-in to worktrees in an existing repo client checkout, no projects are migrated. Instead, only new projects will use the worktree method. This allows for limited testing/opting in without having to completely blow things away or get a second checkout. Bug: https://crbug.com/gerrit/11486 Change-Id: Ic3ff891b30940a6ba497b406b2a387e0a8517ed8 Reviewed-on: https://gerrit-review.googlesource.com/c/git-repo/+/254075 Tested-by: Mike Frysinger <vapier@google.com> Reviewed-by: Mike Frysinger <vapier@google.com>
* assume environment always accepts stringsMike Frysinger2020-02-193-23/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Different Python & OS versions have different environ behavior wrt accepted types & encoding. Since we're migrating to be Python 3 only, lets change our code to assume strings always work as that's what the newer Python 3 does. This will fail under Python 2 for some env vars, mostly on Windows, but the effort of maintaining shim layers that can handle these edge cases isn't worth it when we're dropping that code. We leave the logic in the `repo` launcher for now as it is simple, and we want it to be able to switch versions a bit longer than the rest of the tree. Here's the support table: | *NIX | Windows | Python 2 | ASCII string | str or bytes, not unicode | Python 3 | str or bytes | str only | Windows uses strings natively in its environment all the time. But it doesn't allow unicode strings under Python 2, so we have to encode. Python 2 on *NIX is funky in that it always lowers to ASCII, so we had to manually encode to avoid errors regardless of unicode or str. Python 3 on Windows & *NIX will accept strings. *NIX will also accept bytes but Windows will not. Bug: https://crbug.com/gerrit/12145 Change-Id: I3cf8f95a06902754ea1f08ad4b28503f7063531b Reviewed-on: https://gerrit-review.googlesource.com/c/git-repo/+/248972 Tested-by: Mike Frysinger <vapier@google.com> Reviewed-by: Michael Mortensen <mmortensen@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-192-2/+11
| | | | | | | 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-193-0/+29
| | | | | | | | | | | 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>
* command: add a `repo help` tip to --help outputMike Frysinger2020-02-191-1/+2
| | | | | | | | | | | For people used to running `repo xxx --help`, they might not realize that there are detailed man pages behind `repo help xxx`. Add a note to all --help commands to improve discoverability. Change-Id: I84af58aa0514cc7ead185f6c2534a8f88e09a236 Reviewed-on: https://gerrit-review.googlesource.com/c/git-repo/+/255853 Tested-by: Mike Frysinger <vapier@google.com> Reviewed-by: David Pursehouse <dpursehouse@collab.net>
* project: handle verbose with initial clone bundleMike Frysinger2020-02-191-9/+17
| | | | | | | | | | | If we're not in --verbose mode with repo sync, then omit the per-project clone bundle progress bar. Bug: https://crbug.com/gerrit/11293 Change-Id: Ibdf3be86d35fcbccbf6788c192189f38c577e6e9 Reviewed-on: https://gerrit-review.googlesource.com/c/git-repo/+/255854 Tested-by: Mike Frysinger <vapier@google.com> Reviewed-by: David Pursehouse <dpursehouse@collab.net>
* main: fix pager logic after negation cleanupMike Frysinger2020-02-191-1/+1
| | | | | | | | | | | | | The pager setting is tristate (where None means "auto"), so make sure we still handle that setting. Change-Id: I89fe352572dd15922c61e3bb65ac33f847d01ee0 Test: `repo help upload` triggers the pager Test: `repo -p help upload` triggers the pager Test: `repo --no-pager help upload` doesn't trigger the pager Reviewed-on: https://gerrit-review.googlesource.com/c/git-repo/+/255852 Tested-by: Mike Frysinger <vapier@google.com> Reviewed-by: David Pursehouse <dpursehouse@collab.net>
* 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>
* docs: add per-project review/remote/branch settingsMike Frysinger2020-02-191-1/+59
| | | | | | | Change-Id: Iae7dc438b4a145140b4e105a61024a11e30b2c2b Reviewed-on: https://gerrit-review.googlesource.com/c/git-repo/+/255792 Tested-by: Mike Frysinger <vapier@google.com> Reviewed-by: David Pursehouse <dpursehouse@collab.net>
* avoid negative variablesMike Frysinger2020-02-197-32/+34
| | | | | | | | | | | Trying to use booleans with names like "no_xxx" are hard to follow due to the double negatives. Invert all of them so we only have positive meanings to follow. Change-Id: Ifd37d0368f97034d94aa2cf38db52c723ac0c6ed Reviewed-on: https://gerrit-review.googlesource.com/c/git-repo/+/255493 Tested-by: Mike Frysinger <vapier@google.com> Reviewed-by: David Pursehouse <dpursehouse@collab.net>
* Open temporary cookie file as writable in sync.pyCollin Fijalkovich2020-02-181-1/+1
| | | | | | | | | | | | | Named Temporary file defaults to mode 'w+b' which causes repo sync to fail. By opening the tmpcookiefile in PersistentTransport.request as writable, we are able to run sync successfully. Bug: https://crbug.com/gerrit/12370 Test: Ran smartsync successfully Change-Id: I01ddf915fc30eb3ff0e4d440a6f1aa261c63e88d Reviewed-on: https://gerrit-review.googlesource.com/c/git-repo/+/255692 Tested-by: Jonathan Nieder <jrn@google.com> Reviewed-by: Jonathan Nieder <jrn@google.com>
* platform_utils: have Windows select stream return "" at EOFMike Frysinger2020-02-181-1/+1
| | | | | | | | | | This matches *NIX behavior where the last read is '', not None. Bug: https://crbug.com/gerrit/12329 Change-Id: I48b026b4d1b8d7c6abbce198757b970931869e1a Reviewed-on: https://gerrit-review.googlesource.com/c/git-repo/+/255352 Reviewed-by: David Pursehouse <dpursehouse@collab.net> Tested-by: Mike Frysinger <vapier@google.com>
* main: add python version checkingMike Frysinger2020-02-181-0/+28
| | | | | | | | | | | | If an older launcher script is used with newer repo source tree, we might be issuing python version warnings. Plus, we want to be able to roll Python version requirements independently of the launcher. Add some version checking here too. Change-Id: Ia35fc821f93c429296bdf5fd578276fef796b649 Reviewed-on: https://gerrit-review.googlesource.com/c/git-repo/+/255592 Tested-by: Mike Frysinger <vapier@google.com> Reviewed-by: David Pursehouse <dpursehouse@collab.net>
* resort a few module imports to follow PEP8Mike Frysinger2020-02-183-8/+9
| | | | | | | | | All the stdlib imports are supposed to come before any local imports. Change-Id: I10c0335ba2ff715fd34c9eb91bfe6560e904df08 Reviewed-on: https://gerrit-review.googlesource.com/c/git-repo/+/255593 Tested-by: Mike Frysinger <vapier@google.com> Reviewed-by: David Pursehouse <dpursehouse@collab.net>
* project: Fix E125 continuation line with same indent as next logical lineDavid Pursehouse2020-02-181-5/+5
| | | | | | | Change-Id: I71d2b105baacf6968a29391e9e2a74bba1b4fd0b Reviewed-on: https://gerrit-review.googlesource.com/c/git-repo/+/255555 Reviewed-by: Mike Frysinger <vapier@google.com> Tested-by: David Pursehouse <dpursehouse@collab.net>
* project: move successful fetch output behind verboseMike Frysinger2020-02-182-3/+10
| | | | | | | | | | | | | Syncing projects works fine the majority of the time. So rather than dump all of that noisy output to stdout, lets capture it and only show when things fail or in verbose mode. This tidies up the default `repo sync` output. Bug: https://crbug.com/gerrit/11293 Change-Id: I8314dd92e1e6aadeb26e36a8c92610da419684e6 Reviewed-on: https://gerrit-review.googlesource.com/c/git-repo/+/255413 Reviewed-by: David Pursehouse <dpursehouse@collab.net> Tested-by: Mike Frysinger <vapier@google.com>
* diff: delete unused nested funcMike Frysinger2020-02-171-4/+0
| | | | | | | Change-Id: I43ab4bc944269e43a6cd7b2ac350c09b7c700a6c Reviewed-on: https://gerrit-review.googlesource.com/c/git-repo/+/255492 Tested-by: Mike Frysinger <vapier@google.com> Reviewed-by: David Pursehouse <dpursehouse@collab.net>
* sync: introduce --verbose optionMike Frysinger2020-02-172-25/+31
| | | | | | | | | | | | | This allows us to control sync output better by having three levels of output: quiet (only errors), default (progress bars), verbose (all the things). For now, we just put the chatty "already have persistent ref" message behind the verbose level. Bug: https://crbug.com/gerrit/11293 Change-Id: Ia61333fd8085719f3e99edb7b466cdb04031b67f Reviewed-on: https://gerrit-review.googlesource.com/c/git-repo/+/255414 Reviewed-by: David Pursehouse <dpursehouse@collab.net> Tested-by: Mike Frysinger <vapier@google.com>
* project: disable stat output when fast forwarding mergesMike Frysinger2020-02-171-1/+1
| | | | | | | | | | Our sync output is pretty chatty, and the stat output on fast forward merges doesn't really help. Suppress it to tighten up the output. Change-Id: I91e50639b3cd8db9df3d13a7da6d1aaa70d7932f Reviewed-on: https://gerrit-review.googlesource.com/c/git-repo/+/255412 Reviewed-by: David Pursehouse <dpursehouse@collab.net> Tested-by: Mike Frysinger <vapier@google.com>
* Update commit-msg hook to version from Gerrit 3.1.3David Pursehouse2020-02-171-173/+45
| | | | | | | | | | | | | | Includes the following commits (redacted to those that are relevant): da300bd9bd8 - Do not create a change id if gerrit.createChangeId == false 731eb42b8ae - Do not strip out "-- >8 --" comment in commit-msg hook 627d07c2bfc - Handle messages with only comments in the commit-msg hook 68296f71804 - Simplify the hook script using git-interpret-trailers Change-Id: I7a82836495427df3c5437ba88a9576b47629065f Reviewed-on: https://gerrit-review.googlesource.com/c/git-repo/+/255393 Reviewed-by: Mike Frysinger <vapier@google.com> Tested-by: David Pursehouse <dpursehouse@collab.net>
* github: enable github actions for postsubmit testingMike Frysinger2020-02-163-0/+40
| | | | | | | | | | | | This gives us a bit of feedback by running our testsuite on Linux, macOS, and Windows platforms. While Linux & macOS are passing, Windows fails some of them. We can figure that out later. This is better than what we have now which is manual one-offs. Change-Id: I9d2d644be97ec76645db0bc15739e7679310a647 Reviewed-on: https://gerrit-review.googlesource.com/c/git-repo/+/255314 Reviewed-by: David Pursehouse <dpursehouse@collab.net> Tested-by: Mike Frysinger <vapier@google.com>
* tox: get tests passing a bit on WindowsMike Frysinger2020-02-152-4/+10
| | | | | | | | | | | We need to use the path separators provided by the python library, and we need to set the git env vars so the name is always known. Not all tests pass, but at least the basic frameworks work now. Change-Id: Icea67098a8d7d58bbf918c78325681cf12a2e5f2 Reviewed-on: https://gerrit-review.googlesource.com/c/git-repo/+/255313 Reviewed-by: David Pursehouse <dpursehouse@collab.net> Tested-by: Mike Frysinger <vapier@google.com>
* README: add <> around linksMike Frysinger2020-02-151-5/+5
| | | | | | | | | | Some markdown renderers want <> around links to linkify them. Other renderers strip them out as redundant. Change-Id: Ib7f9962ce1dd47b4494a824c69358c75d98eb838 Reviewed-on: https://gerrit-review.googlesource.com/c/git-repo/+/255312 Reviewed-by: David Pursehouse <dpursehouse@collab.net> Tested-by: Mike Frysinger <vapier@google.com>
* Reword the documentation regarding coding styleDavid Pursehouse2020-02-151-22/+13
| | | | | | | | | | | | | | | | | | | | | - flake8 is a wrapper around pyflakes, so it's redundant to mention both of them. Roll the explicit sections about coding errors and coding style violations into a single section. - After recent cleanups the project now has zero warnings or errors from flake8. Reword the requirements so that it is now mandatory to not introduce new warnings. - Expand the section on suppression of warnings to differentiate between suppressing inline individually and globally suppressing for the whole project. - Properly capitalize "Python Style Guide". Change-Id: I4b333d013e985db252873441b16cb719ed5be5b5 Reviewed-on: https://gerrit-review.googlesource.com/c/git-repo/+/255040 Tested-by: David Pursehouse <dpursehouse@collab.net> Reviewed-by: Mike Frysinger <vapier@google.com>
* repo: handle bad programs a bit betterMike Frysinger2020-02-151-5/+13
| | | | | | | | | | | | | | If programs emit non-UTF-8 output, we currently throw a fatal error. We largely only care about the exit status of programs, and even the output we do parse is a bit minimal. Lets make it into a warning and mangle the invalid bytes into U+FFFD. This should complain enough to annoy but not to break when it's not necessary. Bug: https://crbug.com/gerrit/12337#c2 Change-Id: Idbc94f19ff4d84d2e47e01960dd17d5b492d4a8a Reviewed-on: https://gerrit-review.googlesource.com/c/git-repo/+/255272 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-155-6/+6
| | | | | | | | | | | | | | | | 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>
* repo: rework gpg import for WindowsMike Frysinger2020-02-151-9/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Some versions of gpg on Windows mishandle native paths with homedir. It manifests itself like: gpg: keybox 'C:\Users\.../.repoconfig\gnupg/pubring.kbx' created gpg: C:\Users\.../.repoconfig\gnupg/trustdb.gpg: trustdb created gpg: key 16530D5E920F5C65: public key "Repo Maintainer <repo@android.kernel.org>" imported gpg: can't connect to the agent: Invalid value passed to IPC gpg: Total number processed: 1 gpg: imported: 1 fatal: registering repo maintainer keys failed It seems gpg (at least version 2.2.17) needs paths to be specified in cygwin form (e.g. "/c/Users/.../.repoconfig/gnupg") otherwise it fails to talk to its own processes. We can work around this with a minor trick: we cd to the right path and then invoke gpg with --homedir . and let gpg itself resolve . to whatever form it really wants. This is a bit hacky, but we don't control gpg, and this allows us to avoid having to muck with the environment. Since --homedir has been around since at least gpg-1.4.x from 2004, backwards compat shouldn't be an issue. While we're here, touch up the output a bit: there's no need to dump all the chatty gpg output if things don't fail, so always swallow the output. If things do fail, our exception handler takes care of dumping the full stdout & stderr. Change-Id: I74ab98e1e61e95318fda6faf57c6a8699f775935 Reviewed-on: https://gerrit-review.googlesource.com/c/git-repo/+/255120 Reviewed-by: David Pursehouse <dpursehouse@collab.net> Tested-by: Mike Frysinger <vapier@google.com>
* flake8: Suppress "E731 do not assign a lambda expression, use a def"David Pursehouse2020-02-151-0/+2
| | | | | | | | | | | | | The Google Python Style Guide [1] says that lambdas are OK for one-liners. All the current usages are one-liners, so let's just suppress it. [1] http://google.github.io/styleguide/pyguide.html#210-lambda-functions Change-Id: I404c7a8e5e71870caf0f4604862cbf01db495863 Reviewed-on: https://gerrit-review.googlesource.com/c/git-repo/+/255038 Tested-by: David Pursehouse <dpursehouse@collab.net> Reviewed-by: Mike Frysinger <vapier@google.com>
* repo: rework parser setup to handle `init -c`Mike Frysinger2020-02-142-28/+47
| | | | | | | | | | | | | | | | | | | | We added support for `repo init -c` to main.py, but not to the launcher, so the -c option only works after the first init has run which kind of defeats its purpose. Rework the parser setup so that we can tell it whether it's for "init" or "gitc-init" and then add the -c option in the same way we do in main.py. This has the benefit of getting the parser entirely out of the module scope which makes it a lot easier to reason about, and it means we can write some unittests. Change-Id: Icbc2ec3aceb938d5a8f941d5fbce1548553dc5f7 Test: repo help init Test: repo help gitc-init Test: repo init -u https://android.googlesource.com/platform/manifest -c Reviewed-on: https://gerrit-review.googlesource.com/c/git-repo/+/255113 Reviewed-by: David Pursehouse <dpursehouse@collab.net> Tested-by: Mike Frysinger <vapier@google.com>
* 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>