Print a message when diffing huge files (git-p4)
Review Request #12256 — Created April 25, 2022 and discarded
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 | ID |
---|---|
06921eb19a0f937699f0058a23d1e017e88c5800 |
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 … |
chipx86 | |
E201 whitespace after '(' |
reviewbot | |
E202 whitespace before ')' |
reviewbot | |
E225 missing whitespace around operator |
reviewbot | |
E201 whitespace after '[' |
reviewbot | |
E202 whitespace before ']' |
reviewbot | |
E201 whitespace after '[' |
reviewbot | |
E201 whitespace after '(' |
reviewbot | |
E201 whitespace after '(' |
reviewbot | |
E202 whitespace before ')' |
reviewbot | |
E202 whitespace before ')' |
reviewbot | |
E202 whitespace before ']' |
reviewbot | |
E202 whitespace before ')' |
reviewbot |
- Change Summary:
-
Fix flake8 lints
- Commits:
-
Summary ID db4b087e2b14bb10cf6bb73448af7af5f2cee14e 06921eb19a0f937699f0058a23d1e017e88c5800 - Diff:
-
Revision 2 (+32)
Checks run (2 succeeded)
-
-
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.