summaryrefslogtreecommitdiffstats
path: root/main.py
Commit message (Collapse)AuthorAgeFilesLines
* main: re-exec self with the current interpMike Frysinger2020-04-281-1/+1
| | | | | | | | | | | | The launcher already raised itself up to use Python 3 on the fly, and the main.py script uses a plain `python` shebang. So make sure we use the active interpreter when re-execing ourselves to avoid falling back down to Python 2 (which then triggers warnings). Change-Id: Ic53c07dead3bc9233e4089a0a422f83bb5ac2f91 Reviewed-on: https://gerrit-review.googlesource.com/c/git-repo/+/263272 Tested-by: Mike Frysinger <vapier@google.com> Reviewed-by: David Pursehouse <dpursehouse@digital.ai>
* subcmds: stop instantiating at import timeMike Frysinger2020-03-171-1/+1
| | | | | | | | | | | | | | | | | | The current subcmds design has singletons in all_commands. This isn't exactly unusual, but the fact that our main & help subcommand will then attach members to the classes before invoking them is. This makes it hard to keep track of what members a command has access to, and the two code paths (main & help) attach different members depending on what APIs they then invoke. Lets pull this back a step by storing classes in all_commands and leave the instantiation step to when they're used. This doesn't fully clean up the confusion, but gets us closer. Change-Id: I6a768ff97fe541e6f3228358dba04ed66c4b070a Reviewed-on: https://gerrit-review.googlesource.com/c/git-repo/+/259154 Tested-by: Mike Frysinger <vapier@google.com> Reviewed-by: David Pursehouse <dpursehouse@collab.net>
* subcmds: centralize all_commands logicMike Frysinger2020-03-171-2/+0
| | | | | | | | | | | | | | | The branch->branches alias is setup in the main module when that really belongs in the existing all_commands setup. For help, rather than monkey patching all_commands to the class, switch it to use the state directly from the module. This makes it a bit more obvious where it's coming from rather than this one subcommand having a |commands| member added externally to it. Change-Id: I0200def09bf4774cad8012af0f4ae60ea3089dc0 Reviewed-on: https://gerrit-review.googlesource.com/c/git-repo/+/259153 Tested-by: Mike Frysinger <vapier@google.com> Reviewed-by: David Pursehouse <dpursehouse@collab.net>
* main: improve launcher update messaging wrt system installsMike Frysinger2020-02-261-4/+12
| | | | | | | | | | | | Some users get repo from their distro (e.g. /usr/bin/repo), so the suggestion to copy over top of it makes people uneasy, if it's even possible in the first place. Bug: https://crbug.com/gerrit/12335 Change-Id: I9a0c83d6ba0f466fa8e6d61f674ee13396f9a968 Reviewed-on: https://gerrit-review.googlesource.com/c/git-repo/+/256893 Tested-by: Mike Frysinger <vapier@google.com> Reviewed-by: David Pursehouse <dpursehouse@collab.net>
* main/repo: add support for subcommand aliasesMike Frysinger2020-02-201-1/+26
| | | | | | | | | This supports [alias] sections with repo subcommands just like git. Change-Id: Ie9235b5d4449414e6a745814f0110bd6af74ea93 Reviewed-on: https://gerrit-review.googlesource.com/c/git-repo/+/255833 Reviewed-by: David Pursehouse <dpursehouse@collab.net> Tested-by: Mike Frysinger <vapier@google.com>
* 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>
* avoid negative variablesMike Frysinger2020-02-191-2/+2
| | | | | | | | | | | 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>
* 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>
* 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>
* pyflakes: Fix remaining "E501 line too long" warningsDavid Pursehouse2020-02-131-1/+2
| | | | | | | | | | | 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>
* 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>
* Fix usage of bare 'except'David Pursehouse2020-02-121-3/+3
| | | | | | | | | | | | | | | | | | | | | | 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-121-0/+13
| | | | | | | | | | | | | | | | | | | | - 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-121-8/+8
| | | | | | | | | | | | | | | | | | | | | - 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>
* Fix various whitespace issues reported by pyflakesDavid Pursehouse2020-02-121-1/+1
| | | | | | | | | | | | | | | | | | | | | | - 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 unused importsDavid Pursehouse2020-02-121-1/+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>
* main: rework launcher version checkingv2.1Mike Frysinger2020-02-101-9/+23
| | | | | | | | | | | | | | | | | | | | The code has an ad-hoc check in that it requires the launcher major version to not be less than the source code version. We don't really care about that requirement, and it doesn't fit with our other version checks. Rework it so we explicitly declare the min launcher version that is supported. We'll start with requiring repo launcher 1.15 which was released back in 2012. Hopefully no one has anything older than that, although it's not clear we work with even newer versions than that :). But let's be a little conservative with the first update to this logic. Bug: https://crbug.com/gerrit/10418 Change-Id: I611d70c60324d313c76874e978b8499a491a5d00 Reviewed-on: https://gerrit-review.googlesource.com/c/git-repo/+/254278 Reviewed-by: Michael Mortensen <mmortensen@google.com> Reviewed-by: Mike Frysinger <vapier@google.com> Tested-by: Mike Frysinger <vapier@google.com>
* repo: include subcommands in --help outputMike Frysinger2019-12-051-2/+13
| | | | | | | | | | Also point people to `repo help` so it's easier to navigate the tool. Bug: https://crbug.com/gerrit/12022 Change-Id: Ib3be331a2cef32caa193640bf8d54bd1443fce60 Reviewed-on: https://gerrit-review.googlesource.com/c/git-repo/+/247292 Tested-by: Mike Frysinger <vapier@google.com> Reviewed-by: David Pursehouse <dpursehouse@collab.net>
* Only import imp on py2Rashed Abdel-Tawab2019-10-051-1/+1
| | | | | | | | | | | | imp is deprecatedon py3. It's also not used with py3, so just move it to the py2 import block Test: run `repo` command and verify warning is no longer present Test: verify `repo sync` and `repo upload` function as expected Change-Id: I9d59403d7819c4a478c9f54cbef114f8a96486a5 Reviewed-on: https://gerrit-review.googlesource.com/c/git-repo/+/239713 Tested-by: Rashed Abdel-Tawab <rashedabdeltawab@gmail.com> Reviewed-by: Mike Frysinger <vapier@google.com>
* git_command: refactor User-Agent settingsMike Frysinger2019-10-011-3/+3
| | | | | | | | | | | | | | | Convert the RepoUserAgent function into a UserAgent class. This makes it cleaner to hold internal state, and will make it easier to add a separate git User-Agent, although we don't do it here. We make the RepoSourceVersion independent of GitCommand so that it can be called by the class (later). Bug: https://crbug.com/gerrit/11144 Change-Id: Iab4e1f974b8733a36b243b2d03f5085a96effa19 Reviewed-on: https://gerrit-review.googlesource.com/c/git-repo/+/239232 Reviewed-by: David Pursehouse <dpursehouse@collab.net> Tested-by: Mike Frysinger <vapier@google.com>
* move UserAgent to git_command for wider userMike Frysinger2019-10-011-45/+3
| | | | | | | | | | | We can't import the main module, so move the UserAgent helper out of it and into the git_command module so it can be used in more places. Bug: https://crbug.com/gerrit/11144 Change-Id: I8093c8a20bd1dc7d612d0e2a85180341817c0d86 Reviewed-on: https://gerrit-review.googlesource.com/c/git-repo/+/231057 Tested-by: Mike Frysinger <vapier@google.com> Reviewed-by: David Pursehouse <dpursehouse@collab.net>
* split out cli validation from executionv1.13.5Mike Frysinger2019-08-281-0/+1
| | | | | | | | | | | | | | | | | | | A common pattern in our subcommands is to verify the arguments & options before executing things. For some subcommands, that check stage is quite long which makes the execution function even bigger. Lets split that logic out of the execute phase so it's easier to manage these. This is most noticeable in the sync subcommand whose Execute func is quite large, and the option checking makes up ~15% of it. The manifest command's Execute can be simplified significantly as the optparse configuration always sets output_file to a string. Change-Id: I7097847ff040e831345e63de6b467ee17609990e Reviewed-on: https://gerrit-review.googlesource.com/c/git-repo/+/234834 Reviewed-by: David Pursehouse <dpursehouse@collab.net> Tested-by: Mike Frysinger <vapier@google.com>
* add a --trace-python optionMike Frysinger2019-08-271-3/+20
| | | | | | | | | | This can help debug issues by tracing all the repo python code with the standard trace module. Change-Id: Ibb7f4496ab6c7f9e130238ddf3a07c831952697a Reviewed-on: https://gerrit-review.googlesource.com/c/git-repo/+/234833 Tested-by: Mike Frysinger <vapier@google.com> Reviewed-by: David Pursehouse <dpursehouse@collab.net>
* rename local trace moduleMike Frysinger2019-08-271-2/+2
| | | | | | | | | | There is a standard Python "trace" module, so having a local trace.py prevents us being able to import that. Rename the module to avoid. Change-Id: I23e29ec95a2204bb168a641323d05e76968d9b57 Reviewed-on: https://gerrit-review.googlesource.com/c/git-repo/+/234832 Reviewed-by: David Pursehouse <dpursehouse@collab.net> Tested-by: Mike Frysinger <vapier@google.com>
* repo/main: add module docstringsMike Frysinger2019-07-121-0/+6
| | | | | | | | | This should help people get some bearings in the codebase. Change-Id: I951238fe617a3ecb04a47ead3809ec72c8fbf5a1 Reviewed-on: https://gerrit-review.googlesource.com/c/git-repo/+/231232 Reviewed-by: David Pursehouse <dpursehouse@collab.net> Tested-by: Mike Frysinger <vapier@google.com>
* main: user-agent: include full git version infoMike Frysinger2019-07-111-1/+1
| | | | | | | | | | | | | | We've been truncating the git version info in the user agent to the first three components. So given an example `git --version` like "2.22.0.510.g264f2c817a-goog", we were cutting it down to "2.22.0". For user-agent purposes, we usually want that full string, so use the original full value instead. Bug: https://crbug.com/gerrit/11144 Change-Id: I8ffe3186bdaac96164c34ac835a54bb3fc85527e Reviewed-on: https://gerrit-review.googlesource.com/c/git-repo/+/231056 Reviewed-by: David Pursehouse <dpursehouse@collab.net> Tested-by: Mike Frysinger <vapier@google.com>
* set default file encoding to utf-8Mike Frysinger2019-06-131-0/+1
| | | | | | | | There's no reason to support any other encoding in these files. This only affects the files themselves and not streams they open. Bug: https://crbug.com/gerrit/10418 Change-Id: I053cb40cd3666ce5c8a0689b9dd938f24ca765bf
* Remove unused pylint suppressionsDavid Pursehouse2018-07-241-3/+1
| | | | | | | | | | | pylint is not used since bb5b1a0. The pyflakes cleanup mentioned in that commit has not been done, but given that this project is no longer being actively developed I don't think it's worth spending time doing it. Leaving the pylint suppressions causes confusion because it leads people to think that we are still using pylint. Change-Id: If7d9f280a0f408c780f15915ffdb80579ae21f69
* Support pager on WindowsRenaud Paquay2017-08-311-1/+2
| | | | | | | | | Windows does not support pipe|fork, but we can simulate by creating the pager as a child process, redirecting stdout/in/err appropriately and then waiting for the child process to terminate after we are done executing the repo command. Change-Id: I5dd2bdeb4095e4d93bc678802e53c6d4eda0235b
* sync: Add support to dump a JSON event log of all sync events.David Riley2017-05-291-1/+14
| | | | Change-Id: Id4852968ac1b2bf0093007cf2e5ca951ddab8b3b
* Set result if sys.exit() is called by subcommand.David Riley2017-05-271-0/+4
| | | | | | Allows the finally branch to make sure of the return code. Change-Id: I7a796da5b60269cbd71aad953f1b9bb762b8eef8
* pylint: Fix unused-{argument,variable} warningStefan Beller2016-06-211-1/+1
| | | | | | | | | | | | | | | | This commit fixes 4 out of the remaining 5 pylint warnings: $ pylint --rcfile=.pylintrc *.py ************* Module gitc_utils W:146, 0: TODO(sbasi/jorg): Come up with a solution to remove the sleep below. (fixme) W:130, 6: Unused variable 'name' (unused-variable) ************* Module main W:382,32: Unused argument 'fp' (unused-argument) W:382,36: Unused argument 'code' (unused-argument) W:382,42: Unused argument 'msg' (unused-argument) Change-Id: Ie3d77b9a65b7daefaa9aa4b80f4b682c1678fd58 Signed-off-by: Stefan Beller <sbeller@google.com>
* Add GitcClientCommand class for GITC-specific commandsDan Willemsen2015-09-291-2/+7
| | | | | | | These won't show up as common commands in the help text unless in a GITC client, and will refuse to execute. Change-Id: Iffe82adcc9d6ddde9cb4b204f83ff018042bdab0
* gitc: Improve help visibilityv1.12.28Dan Willemsen2015-09-011-0/+6
| | | | | | | This improves the visiblity of gitc-init if we can get the gitc config, and hides it otherwise. Change-Id: I82830b0b07c311e8c74397ba79eb4c361f8b6fb5
* GITC: Add repo start support.Simran Basi2015-08-281-1/+8
| | | | | | | | | | | | | | | | | | | | | Add repo start support for GITC checkouts. If the user is in the GITC FS view, they can now run repo start to check out the sources and create a new working branch. When "repo start" is called on a GITC project, the revision tag is set to an empty string and saved in a new tag: old-revision. This tells the GITC filesystem to display the local copy of the sources when being viewed. The local copy is created by pulling the project sources and the new branch is created based off the original project revision. Updated main.py to setup each command's gitc_manifest when appropriate. Updated repo sync's logic to sync opened projects and updating the GITC manifest file for the rest. Change-Id: I7e4809d1c4fc43c69b26f2f1bebe45aab0cae628
* Improve error message when syncing a project with invalid groups.Jarkko Pöyry2015-06-191-0/+7
| | | | Change-Id: Iaf5c2a0f00667dc09bcf455cfe2f39bfbaa2bfc0
* add a global --color optionMike Frysinger2014-12-301-0/+6
| | | | | | | | | | | If you want to turn off colors for commands, you have to manually adjust the git config settings (in various locations). If you're writing scripts though, you often don't want to modify those locations. Add a commandline option to explicitly control things. The default behavior is unchanged -- we still scan the config files. Change-Id: I54a3fd8e1918bac180aadd7c7d3004f069b02522
* More verbose errors for NoManifestExceptions.Dan Sandler2014-03-111-11/+16
| | | | | | | | | | | | | | | | The old "manifest required for this command -- please run init" is replaced by a more helpful message that lists the command repo was trying to execute (with arguments) as well as the str() of the NoManifestException. For example: > error: in `sync`: [Errno 2] No such file or directory: > 'path/to/.repo/manifests/.git/HEAD' > error: manifest missing or unreadable -- please run init Other failure points in basic command parsing and dispatch are more clearly explained in the same fashion. Change-Id: I6212e5c648bc5d57e27145d55a5391ca565e4149
* Implement Kerberos HTTP authentication handlerCarlos Aguado2014-02-041-0/+87
| | | | | | | | | | | | This commit implements a Kerberos HTTP authentication handler. It uses credentials from a local cache to perform an HTTP authentication negotiation using the GSSAPI. The purpose of this handler is to allow the use Kerberos authentication to access review endpoints without the need to transmit the user password. Change-Id: Id2c3fc91a58b15a3e83e4bd9ca87203fa3d647c8
* Add wrapper moduleConley Owens2014-01-301-15/+5
| | | | | | | | This takes the wrapper importing code from main.py and moves it into its own module so that other modules may import it without causing circular imports with main.py. Change-Id: I9402950573933ed6f14ce0bfb600f74f32727705
* Move Python version checking to a separate moduleDavid Pursehouse2013-05-231-8/+7
| | | | | | | | | | | | | | | | | Add a new module with methods for checking the Python version. Instead of handling Python3 imports with try...except blocks, first check the python version and then import the relevant modules. This makes the code a bit cleaner and will result in less diff when/if we remove support for Python < 3 later. Use the same mechanism to handle `input` vs. `raw_input` and add suppression of pylint warnings caused by redefinition of the built-in method `input`. Change-Id: Ia403e525b88d77640a741ac50382146e7d635924 Also-by: Chirayu Desai <cdesai@cyanogenmod.org> Signed-off-by: Chirayu Desai <cdesai@cyanogenmod.org>
* Some fixes for supporting python3Chirayu Desai2013-04-181-1/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | * Fix imports. * Use python3 syntax. * Wrap map() calls with list(). * Use list() only wherever needed. (Thanks Conley!) * Fix dictionary iteration methods (s/iteritems/items/). * Make use of sorted() in appropriate places * Use iterators directly in the loop. * Don't use .keys() wherever it isn't needed. * Use sys.maxsize instead of sys.maxint TODO: * Make repo work fully with python3. :) Some of this was done by the '2to3' tool [1], by applying the needed fixes in a way that doesn't break compatibility with python2. Links: [1]: http://docs.python.org/2/library/2to3.html Change-Id: Ibdf3bf9a530d716db905733cb9bfef83a48820f7 Signed-off-by: Chirayu Desai <cdesai@cyanogenmod.org>
* Allow command options to be set from environment variablesDavid Pursehouse2012-11-171-0/+1
| | | | | | | | | | | | Extend the Command base class to allow options to be set from values in environment variables, if the user has not given the option on the command line and the environment variable is set. Derived classes of Command can override the implementation of the method _GetEnvironmentOptions to configure which of its options may be set from environment variables. Change-Id: I7c780bcf9644d6567893d9930984c054bce7351e
* Raise a NoManifestException when the manifest DNEConley Owens2012-11-151-0/+5
| | | | | | | | | When a command (eg, `repo forall`) expects the manifest project to exist, but there is no manifest, an IOException gets raised. This change defines a new Exception type to be raised in these cases and raises it when project.py fails to read the manifest. Change-Id: Iac576c293a37f7d8f60cd4f6aa95b2c97f9e7957
* Merge "Simplify error handling in subcommand execution"Conley Owens2012-11-141-16/+15
|\
| * Simplify error handling in subcommand executionConley Owens2012-11-141-16/+15
| | | | | | | | | | | | | | Instead of using a nested try (which repo is plagued with), use a single try when executing the appropriate subcommand. Change-Id: I32dbfc010c740c0cc42ef8fb6a83dfe87f87e54a
* | Fix inconsistent indentationDavid Pursehouse2012-11-141-11/+11
|/ | | | | | | | | | The repo coding style is to indent at 2 characters, but there are many places where this is not followed. Enable pylint warning "W0311: Bad indentation" and make sure all indentation is at multiples of 2 characters. Change-Id: I68f0f64470789ce2429ab11104d15d380a63e6a8
* Change print statements to work in python3Sarah Owens2012-11-131-26/+24
| | | | | | This is part of a series of changes to introduce Python3 support. Change-Id: I373be5de7141aa127d7debdbce1df39148dbec32
* More code style cleanupDavid Pursehouse2012-11-141-1/+0
| | | | | | | | | Clean up a few more unnecessary usages of lambda in `repo` that were missed in the previous sweep that only considered files ending in .py. Remove a duplicate import. Change-Id: I03cf467a5630cbe4eee6649520c52e94a7db76be