summaryrefslogtreecommitdiffstats
path: root/pager.py
Commit message (Collapse)AuthorAgeFilesLines
* 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>
* Fix blank line issues reported by flake8David Pursehouse2020-02-121-0/+6
| | | | | | | | | | | | | | | | | | | | - 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>
* 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 spurious +x bitsMike Frysinger2020-02-091-0/+0
| | | | | | | | | These files are not directly executable, so drop the +x bits. Change-Id: Iaf19a03a497686cc21103e7ddf08073173440dd1 Reviewed-on: https://gerrit-review.googlesource.com/c/git-repo/+/254076 Tested-by: Mike Frysinger <vapier@google.com> Reviewed-by: David Pursehouse <dpursehouse@collab.net>
* 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
* Support pager on WindowsRenaud Paquay2017-08-311-2/+36
| | | | | | | | | 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
* Change print statements to work in python3Sarah Owens2012-11-131-1/+2
| | | | | | This is part of a series of changes to introduce Python3 support. Change-Id: I373be5de7141aa127d7debdbce1df39148dbec32
* Coding style cleanupDavid Pursehouse2012-10-091-2/+2
| | | | | | | | | | | | | | | Fix the following issues reported by pylint: C0321: More than one statement on a single line W0622: Redefining built-in 'name' W0612: Unused variable 'name' W0613: Unused argument 'name' W0102: Dangerous default value 'value' as argument W0105: String statement has no effect Also fixed a few cases of inconsistent indentation. Change-Id: Ie0db839e7c57d576cff12d8c055fe87030d00744
* Correct call to `sys.exit()`David Pursehouse2012-10-041-1/+1
| | | | | | It should be `sys.exit()` not `os.exit()`. Change-Id: Iaeeef456ddf2d17f5df2b712e50e3630bed856c3
* Don't start the pager if stdout is a pipev1.6.4Shawn O. Pearce2009-04-011-1/+1
| | | | | | | | | | | | | | | The repo script often uses a pager by default and will produce control characters (coloring) to standard output when using the pager, even if the output is redirected to another pipe or script. This is because the pager setup checked for the terminal presence on FD 0, and in case of redirection FD 0 is still attached to the terminal. Instead require that both FD 0 and FD 1 are connected to the terminal in order to start the pager. Bug: REPO-19, b.android.com/2004 Signed-off-by: Shawn O. Pearce <sop@google.com>
* Initial Contributionv1.0The Android Open Source Project2008-10-211-0/+84