commit | c08566e6e27cf671133e2787fd49ca9451535163 | [log] [tgz] |
---|---|---|
author | Aiden Benner <[email protected]> | Wed Oct 03 17:52:42 2018 |
committer | Commit Bot <[email protected]> | Wed Oct 03 17:52:42 2018 |
tree | a7a74976563d5caa1b808bad855167ca63562b68 | |
parent | 6af3aa85495695d609a881ad1c75fd2aa5407135 [diff] |
Add non --full support to python git cl format Parses git diff for changed python files in a method similar to clang-diff and feeds the resulting line ranges into yapf. Also sets the default style to the yapf file included in depot tools by searching parent directories of each changed file to find a yapf style config (.style.yapf). If none is found the default style file will be the chromium .style.yapf included in depot tools. Note: Even if line ranges are specified, yapf will fix indentation issues for the entire file. This is intended see https://github.com/google/yapf/issues/499 This may cause some issues if git cl format is run on a file with lots of indentation issues or on a file or when run on a third_party file that is formatted with pep8 and does not include a .style.yapf and may make many more changes then the user expects. Still undecided on whether this should be turned on by default but if not I think the non --full support is a positive change anyways. Bug:846432 Change-Id: Ib85797f4a8e1021870901ff465ec10f7e70deb87 Reviewed-on: https://chromium-review.googlesource.com/1249642 Commit-Queue: Aiden Benner <[email protected]> Reviewed-by: Nodir Turakulov <[email protected]> Reviewed-by: agrieve <[email protected]>
Tools for working with Chromium development. It requires python 2.7.
The most important tools are:
fetch
: A gclient
wrapper to checkout a project. Use fetch --help
for more details.gclient
: A meta-checkout tool. Think repo or git submodules, except that it support OS-specific rules, e.g. do not checkout Windows only dependencies when checking out for Android. Use gclient help
for more details and README.gclient.md.git cl
: A code review tool to interact with Rietveld or Gerrit. Use git cl help
for more details and README.git-cl.md.roll-dep
: A gclient dependency management tool to submit a dep roll, updating a dependency to a newer revision.There are a lot of git utilities included.
depot_tools
updates itself automatically when running gclient
tool. To disable auto update, set the environment variable DEPOT_TOOLS_UPDATE=0
.
To update package manually, run update_depot_tools.bat
on Windows, or ./update_depot_tools
on Linux or Mac.
On Windows only, running gclient
will install git
and python
.
To contribute change for review:
git new-branch <somename> # Hack git add . git commit -a -m "Fixes goat teleporting" # find reviewers git cl owners git log -- <yourfiles> # Request a review. git cl upload -r [email protected],[email protected] --send-mail # Edit change description if needed. git cl desc # If change is approved, flag it to be committed. git cl set-commit # If change needs more work. git rebase-update ... git cl upload -t "Fixes goat teleporter destination to be Australia"
See also open bugs, open reviews, forum or report problems.
To update cpplint.py, please submit the change upstream first at https://github.com/google/styleguide/tree/gh-pages/cpplint then copy it down.