flake8
-
rbtools/clients/git.py (Diff revision 1) Show all issues -
-
-
-
-
-
-
-
-
-
-
Review Request #12256 — Created April 25, 2022 and discarded
Information | |
---|---|
puremourning | |
RBTools | |
master | |
Reviewers | |
rbtools | |
In order to create diffs that work with the perforce server, when posting from a git-p4 repo, we have to in effect linewise process the diff output from git diff. For very large files this can take quite a while and users can be confused as to what is going on. The solution is to print something to the standard output when diffing a very large file and update it with a bit of progress every 1000 lines.
in a git repo with extremely large text files, rbt post. See that the output 'Creating diff for large file...' is printed and a little spinner animation updated every 1000 lines.
Summary | |
---|---|
Description | From | Last Updated |
---|---|---|
We're trying to move away from a model where SCMClients, or really anything but command code, generates non-logging output or … |
|
|
E201 whitespace after '(' |
![]() |
|
E202 whitespace before ')' |
![]() |
|
E225 missing whitespace around operator |
![]() |
|
E201 whitespace after '[' |
![]() |
|
E202 whitespace before ']' |
![]() |
|
E201 whitespace after '[' |
![]() |
|
E201 whitespace after '(' |
![]() |
|
E201 whitespace after '(' |
![]() |
|
E202 whitespace before ')' |
![]() |
|
E202 whitespace before ')' |
![]() |
|
E202 whitespace before ']' |
![]() |
|
E202 whitespace before ')' |
![]() |
Fix flake8 lints
Commits: |
|
|||||||||
---|---|---|---|---|---|---|---|---|---|---|
Diff: |
Revision 2 (+32) |
We're trying to move away from a model where SCMClients, or really anything but command code, generates non-logging output or otherwise assumes anything about the environment in which it's being run. We therefore can't put progress information here.
Plus, this probably breaks
rbt diff
, which will get the progress info in the output.What I'd suggest instead is introducing a spinner or something in
rbt post
for diff generation.A larger change could involve some optional progress callback during diff generation that could supply the number of total files and generated files, and to use that to construct a progress bar (similar to those used for diff validation/upload), but a basic spinner should be fine.