summaryrefslogtreecommitdiffstats
path: root/subcmds/branches.py
Commit message (Collapse)AuthorAgeFilesLines
* Fix blank line issues reported by flake8David Pursehouse2020-02-121-0/+2
| | | | | | | | | | | | | | | | | | | | - 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 various whitespace issues reported by pyflakesDavid Pursehouse2020-02-121-3/+3
| | | | | | | | | | | | | | | | | | | | | | - 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>
* Fix tests for membership to use 'not in'David Pursehouse2020-02-121-1/+1
| | | | | | | | | | | 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>
* 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
* update markdown/help header formatMike Frysinger2018-10-101-2/+1
| | | | | | | Since gitiles recommends using # headers over ---/=== underlines, change the manifest-format.md over and all our help texts. Change-Id: I96391d41fba769e9f26870d497cf7cf01c8d8ab3
* Provide detail print-out when not all projects of a branch are current.Etan Cohen2014-07-111-3/+17
| | | | | | | | | | | | | When current is "split" (i.e. some projects are current while others are not): - Disable 'not in' printout (i.e. will print out all projects) - Disable printing of multiple projects on one line - Print current projects in green, non-current in white Since using color to differentiate current from non-current in "split" cases: - In non-split cases also print out project names in color (green for current white for non-current) Change-Id: Ia6b826612c708447cecfe5954dc767f7b2ea2ea7
* Remove trailing whitespaceChirayu Desai2013-11-211-1/+1
| | | | Change-Id: I56bcb559431277d40070fa33c580c6c3525ff9bc
* Some fixes for supporting python3Chirayu Desai2013-04-181-3/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | * 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>
* 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
* More coding style cleanupDavid Pursehouse2012-10-221-6/+6
| | | | | | | | | | | | | | | | Fixing more issues found with pylint. Some that were supposed to have been fixed in the previous sweep (Ie0db839e) but were missed: C0321: More than one statement on a single line W0622: Redefining built-in 'name' And some more: W0631: Using possibly undefined loop variable 'name' W0223: Method 'name' is abstract in class 'name' but is not overridden W0231: __init__ method from base class 'name' is not called Change-Id: Ie119183708609d6279e973057a385fde864230c3
* Coding style cleanupDavid Pursehouse2012-10-091-4/+4
| | | | | | | | | | | | | | | 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
* branches: Enable output of multiple projectsPär Åsfält2010-05-041-5/+7
| | | | | | | Fixes a bug introduced by 498a0e8a79ab76eeb6adc40f12b04d59820716f9 ("Make 'repo branches -a' the default behavior"). Change-Id: Ib739f82f4647890c46d7c9fb2f2e63a16a0481de
* branches: Describe output format in `repo help branches`v1.6.8.3Shawn O. Pearce2009-06-121-0/+27
| | | | Signed-off-by: Shawn O. Pearce <sop@google.com>
* Make 'repo branches -a' the default behaviorv1.6.7.5Shawn O. Pearce2009-05-181-18/+1
| | | | | | | Extensive discussion with users lead to the fact that needing to supply -a to view what they really wanted to see was just wrong. Signed-off-by: Shawn O. Pearce <sop@google.com>
* Print '(no branches)' if the output of `repo branches` is emptyShawn O. Pearce2009-04-181-0/+4
| | | | | | | | This way its clear the command did something, and reported that it had nothing to show you, because you have no active branches in this client. Signed-off-by: Shawn O. Pearce <sop@google.com>
* Add a repo branches subcommand to describe current branchesShawn O. Pearce2009-04-101-0/+150
We now display a summary of the available topic branches in this client, based upon a sorted union of all existing projects. Bug: REPO-21 Signed-off-by: Shawn O. Pearce <sop@google.com>