flake8
-
rbtools/clients/__init__.py (Diff revision 1) -
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
Review Request #9620 — Created Feb. 11, 2018 and submitted
Without the presence of a .reviewboardrc file which defines
REPOSITORY_TYPE, RBTools will try to auto-detect the repository type by running
various commands like "svn info", "hg root", etc. This will run through each
repository type until one is found that works.Unfortunately, if people have nested repositories, this means
RBTools can select the wrong one. For example, some people may have
/home/user/ as a git directory, and /home/user/src/project/ is a subversion
checkout, running "rbt" within their "project" directory may detect it as git
instead of svn.This change auto-detects all repository types, and then selects the
deepest one. In the case of multiple matching repositories, we output a
warning suggesting that people define REPOSITORY_TYPE in .reviewboardrc in
order to speed up detection.
Description | From | Last Updated |
---|---|---|
Can you wrap your description to 70 columns? |
david | |
E265 block comment should start with '# ' |
reviewbot | |
E501 line too long (98 > 79 characters) |
reviewbot | |
E501 line too long (83 > 79 characters) |
reviewbot | |
E266 too many leading '#' for block comment |
reviewbot | |
E266 too many leading '#' for block comment |
reviewbot | |
E266 too many leading '#' for block comment |
reviewbot | |
E501 line too long (95 > 79 characters) |
reviewbot | |
E266 too many leading '#' for block comment |
reviewbot | |
E266 too many leading '#' for block comment |
reviewbot | |
E266 too many leading '#' for block comment |
reviewbot | |
E265 block comment should start with '# ' |
reviewbot | |
E266 too many leading '#' for block comment |
reviewbot | |
E266 too many leading '#' for block comment |
reviewbot | |
E501 line too long (80 > 79 characters) |
reviewbot | |
E265 block comment should start with '# ' |
reviewbot | |
E501 line too long (110 > 79 characters) |
reviewbot | |
E266 too many leading '#' for block comment |
reviewbot | |
E266 too many leading '#' for block comment |
reviewbot | |
E501 line too long (80 > 79 characters) |
reviewbot | |
E266 too many leading '#' for block comment |
reviewbot | |
E266 too many leading '#' for block comment |
reviewbot | |
E501 line too long (80 > 79 characters) |
reviewbot | |
E266 too many leading '#' for block comment |
reviewbot | |
E501 line too long (80 > 79 characters) |
reviewbot | |
E266 too many leading '#' for block comment |
reviewbot | |
E501 line too long (82 > 79 characters) |
reviewbot | |
E266 too many leading '#' for block comment |
reviewbot | |
E266 too many leading '#' for block comment |
reviewbot | |
E266 too many leading '#' for block comment |
reviewbot | |
E266 too many leading '#' for block comment |
reviewbot | |
E266 too many leading '#' for block comment |
reviewbot | |
E501 line too long (95 > 79 characters) |
reviewbot | |
E266 too many leading '#' for block comment |
reviewbot | |
E266 too many leading '#' for block comment |
reviewbot | |
E266 too many leading '#' for block comment |
reviewbot | |
E265 block comment should start with '# ' |
reviewbot | |
E266 too many leading '#' for block comment |
reviewbot | |
E266 too many leading '#' for block comment |
reviewbot | |
E501 line too long (80 > 79 characters) |
reviewbot | |
E265 block comment should start with '# ' |
reviewbot | |
E501 line too long (110 > 79 characters) |
reviewbot | |
E266 too many leading '#' for block comment |
reviewbot | |
E266 too many leading '#' for block comment |
reviewbot | |
E501 line too long (80 > 79 characters) |
reviewbot | |
E266 too many leading '#' for block comment |
reviewbot | |
E266 too many leading '#' for block comment |
reviewbot | |
E501 line too long (80 > 79 characters) |
reviewbot | |
E266 too many leading '#' for block comment |
reviewbot | |
E501 line too long (80 > 79 characters) |
reviewbot | |
E266 too many leading '#' for block comment |
reviewbot | |
E266 too many leading '#' for block comment |
reviewbot | |
E501 line too long (82 > 79 characters) |
reviewbot | |
E266 too many leading '#' for block comment |
reviewbot | |
E261 at least two spaces before inline comment |
reviewbot | |
E114 indentation is not a multiple of four (comment) |
reviewbot | |
E116 unexpected indentation (comment) |
reviewbot | |
E114 indentation is not a multiple of four (comment) |
reviewbot | |
E116 unexpected indentation (comment) |
reviewbot | |
E126 continuation line over-indented for hanging indent |
reviewbot | |
E261 at least two spaces before inline comment |
reviewbot | |
E114 indentation is not a multiple of four (comment) |
reviewbot | |
E116 unexpected indentation (comment) |
reviewbot | |
E501 line too long (80 > 79 characters) |
reviewbot | |
E251 unexpected spaces around keyword / parameter equals |
reviewbot | |
E501 line too long (86 > 79 characters) |
reviewbot | |
E251 unexpected spaces around keyword / parameter equals |
reviewbot | |
E261 at least two spaces before inline comment |
reviewbot | |
E114 indentation is not a multiple of four (comment) |
reviewbot | |
E116 unexpected indentation (comment) |
reviewbot | |
E251 unexpected spaces around keyword / parameter equals |
reviewbot | |
E261 at least two spaces before inline comment |
reviewbot | |
E114 indentation is not a multiple of four (comment) |
reviewbot | |
E116 unexpected indentation (comment) |
reviewbot | |
E501 line too long (80 > 79 characters) |
reviewbot | |
F841 local variable 'local_root' is assigned to but never used |
reviewbot | |
W293 blank line contains whitespace |
reviewbot | |
E501 line too long (80 > 79 characters) |
reviewbot | |
E303 too many blank lines (2) |
reviewbot | |
E501 line too long (80 > 79 characters) |
reviewbot | |
E501 line too long (80 > 79 characters) |
reviewbot | |
These should be in alphabetical order. |
david | |
Should be "self.path". Even though it's starting a sentence, self refers to a symbol. |
david | |
There's an extra space at the beginning of this comment line. |
david | |
Add a blank line between these (we like to have a bit of space before and after blocks) |
david | |
Add a blank line between these. |
david | |
Hmmm. We should probably just make sure that get_repository_info doesn't change things. Needing a special case here is ugly. |
david | |
Add a blank line between these. |
david | |
We generally prefer to have the joining space at the end of the previous line instead of the beginning of … |
david | |
Blank line between these. |
david | |
Blank line between these. |
david | |
Blank line between these. |
david | |
Also not necessary if we fix up GitClient. |
david | |
This looks like leftover debug output. Can we get rid of it? |
david | |
More fallout from GitClient being dumb. |
david | |
And here. |
david | |
Blank line between these. |
david | |
I think this function might be a bit too long. Might be a good idea to break it up, for … |
rpolyano | |
Too many blank lines here now. |
david | |
Not enough blank lines here now. |
david | |
Blank line here. |
david | |
Would it make sense to move all of these Regexes out into one place and a) have them organized by … |
rpolyano | |
Blank line here. |
david | |
Blank line here. |
david | |
Blank line here. |
david | |
This should fit all on one line. |
david | |
From my understanding, the idea here is to find the deepest repo in terms of directory depth right? Using the … |
jshephard | |
This would wrap more nicely as: if (repo.local_root and len(os.path.normpath(repo.local_root)) > deepest_repo): |
david | |
Does the >>>>>>>> mean anything or is it a part of the reviewboard UI? |
JT jtrang | |
Oh I see! That makes a lot more sense. Thank you! |
JT jtrang | |
Please use single quotes instead of double, and add a blank line above this. |
david | |
Same comment as above. I'm not sure if the chevrons are appearing as part of the UI or not. |
JT jtrang |
Check if git changes the CWD, roll back until other clients find their repos, and then find deepest repo. Cannot stop gitClient from changing CWD as that ensures diffs on server are not messed up. Check if git changes the CWD, roll back until other clients find their repos, and then find deepest. Cannot stop gitClient from changing CWD as that ensures diffs on server are not messed up.
Diff: |
Revision 2 (+186 -72) |
---|
Description: |
|
|||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Commit: |
|
|||||||||||||||||||||
Diff: |
Revision 3 (+247 -117) |
rbtools/clients/__init__.py (Diff revision 3) |
---|
E126 continuation line over-indented for hanging indent
rbtools/clients/perforce.py (Diff revision 3) |
---|
E251 unexpected spaces around keyword / parameter equals
Rebased the branch on release-0.7.x to avoid rbt post error after new changes on master were pulled.
Testing Done: |
|
|||||||||
---|---|---|---|---|---|---|---|---|---|---|
Branch: |
|
|||||||||
Commit: |
|
|||||||||
Diff: |
Revision 4 (+102 -46) |
rbtools/clients/svn.py (Diff revision 4) |
---|
F841 local variable 'local_root' is assigned to but never used
Diff: |
Revision 5 (+104 -46) |
---|
Testing Done: |
|
||||||
---|---|---|---|---|---|---|---|
Diff: |
Revision 6 (+103 -46) |
Summary: |
|
||||||
---|---|---|---|---|---|---|---|
Testing Done: |
|
||||||
Diff: |
Revision 7 (+104 -46) |
Fixed spacing issues
Commit: |
|
||||
---|---|---|---|---|---|
Diff: |
Revision 8 (+106 -46) |
rbtools/clients/__init__.py (Diff revision 8) |
---|
Should be "self.path". Even though it's starting a sentence,
self
refers to a symbol.
rbtools/clients/__init__.py (Diff revision 8) |
---|
There's an extra space at the beginning of this comment line.
rbtools/clients/__init__.py (Diff revision 8) |
---|
Add a blank line between these (we like to have a bit of space before and after blocks)
rbtools/clients/__init__.py (Diff revision 8) |
---|
Hmmm. We should probably just make sure that
get_repository_info
doesn't change things. Needing a special case here is ugly.
rbtools/clients/__init__.py (Diff revision 8) |
---|
We generally prefer to have the joining space at the end of the previous line instead of the beginning of the next.
rbtools/clients/__init__.py (Diff revision 8) |
---|
This looks like leftover debug output. Can we get rid of it?
rbtools/clients/git.py (Diff revision 8) |
---|
I think this function might be a bit too long. Might be a good idea to break it up, for example some of the if/branches can be separate functions.
rbtools/clients/git.py (Diff revision 8) |
---|
Would it make sense to move all of these Regexes out into one place and a) have them organized by version ranges (e.x. git may change these in some version) and b) compile them
Description: |
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Commit: |
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||
Diff: |
Revision 9 (+113 -44) |
rbtools/clients/__init__.py (Diff revision 9) |
---|
From my understanding, the idea here is to find the deepest repo in terms of directory depth right? Using the length of the path to determine this might result in selecting a repo that is in a directory with a large name over another repo that is deeper.
I'm not sure if this is an issue here though, as your description makes it sound like you're just looking at parent directories of the user's current working directory. In that case this is a non-issue.
rbtools/clients/__init__.py (Diff revision 9) |
---|
Does the
>>>>>>>>
mean anything or is it a part of the reviewboard UI?
rbtools/clients/git.py (Diff revision 9) |
---|
Same comment as above. I'm not sure if the chevrons are appearing as part of the UI or not.
rbtools/clients/__init__.py (Diff revision 9) |
---|
This would wrap more nicely as:
if (repo.local_root and len(os.path.normpath(repo.local_root)) > deepest_repo):
rbtools/clients/__init__.py (Diff revision 9) |
---|
Please use single quotes instead of double, and add a blank line above this.