Add support for -X/--exclude/EXCLUDE_FILES.
Review Request #6317 — Created Sept. 12, 2014 and submitted
Information | |
---|---|
brennie | |
RBTools | |
master | |
6331 | |
422122c... | |
Reviewers | |
rbtools, students | |
rbtools now recognizes the -X and --exclude command line options for
excluding files from diffs and review requests. The EXCLUDE_FILES
option in .reviewboardrc adds the same functionality, but can be
committed to the repository.Currently no backends support this option.
Unit tests pass.
Runningrbt diff
with-X
or--exclude
flags, or with
EXCLUDE_FILES
set in.reviewboardrc
causes the expected error
message
Description | From | Last Updated |
---|---|---|
The SCMClients shouldn't be handling these as command line arguments. Instead, diff should be updated to take an excluded_files= argument … |
|
|
"or" |
|
|
Can we rename the existing parameter files to be include_files, and put the new parameter right after that one? Same … |
|
|
We prefer the % formatting scheme over this one (change "{0}" to "%s" and replace ".format(tool.name)" with "% tool.name"). |
|
|
Can you wrap the whole conditional in parens and remove the continuation character? |
|
|
Same comment about .format vs % |
|
|
Col: 80 E501 line too long (80 > 79 characters) |
![]() |

-
Tool: PEP8 Style Checker Processed Files: rbtools/clients/cvs.py rbtools/commands/__init__.py rbtools/clients/clearcase.py rbtools/clients/plastic.py rbtools/clients/mercurial.py rbtools/clients/git.py rbtools/clients/perforce.py rbtools/clients/bazaar.py rbtools/clients/svn.py Ignored Files: docs/rbtools/rbt/commands/post.rst docs/rbtools/rbt/commands/diff.rst
Commit: |
|
||||
---|---|---|---|---|---|
Diff: |
Revision 2 (+81 -1) |

-
Tool: Pyflakes Processed Files: rbtools/clients/cvs.py rbtools/commands/__init__.py rbtools/clients/clearcase.py rbtools/clients/plastic.py rbtools/clients/mercurial.py rbtools/clients/git.py rbtools/clients/perforce.py rbtools/clients/bazaar.py rbtools/clients/svn.py Ignored Files: docs/rbtools/rbt/commands/post.rst docs/rbtools/rbt/commands/diff.rst AUTHORS Tool: PEP8 Style Checker Processed Files: rbtools/clients/cvs.py rbtools/commands/__init__.py rbtools/clients/clearcase.py rbtools/clients/plastic.py rbtools/clients/mercurial.py rbtools/clients/git.py rbtools/clients/perforce.py rbtools/clients/bazaar.py rbtools/clients/svn.py Ignored Files: docs/rbtools/rbt/commands/post.rst docs/rbtools/rbt/commands/diff.rst AUTHORS
-
-
rbtools/clients/clearcase.py (Diff revision 2) The SCMClients shouldn't be handling these as command line arguments. Instead,
diff
should be updated to take anexcluded_files=
argument and use that insead. We're trying to eventually move away from havingself.options
.I'm also hoping we can move away from these errors within
diff
. Instead, how about adding asupports_diff_exclude_files
flag on the class, and having the caller check this and provide the error? (We should probably do this for include as well, but that'd be a separate change.) -
Change Summary:
Add an exclude_files parameter to diff methods in all SCMClients.
Error handling for whether or not a tool can handle excluding is done
in the diff and post commands via checking the
SCMTool.supports_diff_exclude_files
flag.
Testing Done: |
|
||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Commit: |
|
||||||||||||
Diff: |
Revision 3 (+51 -9) |

-
Tool: Pyflakes Processed Files: rbtools/clients/cvs.py rbtools/commands/post.py rbtools/commands/__init__.py rbtools/commands/diff.py rbtools/clients/clearcase.py rbtools/clients/plastic.py rbtools/clients/__init__.py rbtools/clients/mercurial.py rbtools/clients/git.py rbtools/clients/perforce.py rbtools/clients/bazaar.py rbtools/clients/svn.py Ignored Files: docs/rbtools/rbt/commands/post.rst docs/rbtools/rbt/commands/diff.rst AUTHORS Tool: PEP8 Style Checker Processed Files: rbtools/clients/cvs.py rbtools/commands/post.py rbtools/commands/__init__.py rbtools/commands/diff.py rbtools/clients/clearcase.py rbtools/clients/plastic.py rbtools/clients/__init__.py rbtools/clients/mercurial.py rbtools/clients/git.py rbtools/clients/perforce.py rbtools/clients/bazaar.py rbtools/clients/svn.py Ignored Files: docs/rbtools/rbt/commands/post.rst docs/rbtools/rbt/commands/diff.rst AUTHORS
-
-
rbtools/clients/__init__.py (Diff revision 3) Can we rename the existing parameter
files
to beinclude_files
, and put the new parameter right after that one? Same in the rest of the clients. -
rbtools/commands/diff.py (Diff revision 3) We prefer the % formatting scheme over this one (change "{0}" to "%s" and replace ".format(tool.name)" with "% tool.name").
-
rbtools/commands/post.py (Diff revision 3) Can you wrap the whole conditional in parens and remove the continuation character?
-
Change Summary:
Rename files -> include_files in SCMClient.diff methods.
Use % formatting instead of str.format()
Fix formatting in multi-line if statement.
Commit: |
|
||||
---|---|---|---|---|---|
Diff: |
Revision 4 (+78 -26) |

-
Tool: Pyflakes Processed Files: rbtools/clients/cvs.py rbtools/commands/post.py rbtools/commands/__init__.py rbtools/commands/diff.py rbtools/clients/clearcase.py rbtools/clients/plastic.py rbtools/clients/__init__.py rbtools/clients/mercurial.py rbtools/clients/git.py rbtools/clients/perforce.py rbtools/clients/bazaar.py rbtools/clients/svn.py Ignored Files: docs/rbtools/rbt/commands/post.rst docs/rbtools/rbt/commands/diff.rst AUTHORS Tool: PEP8 Style Checker Processed Files: rbtools/clients/cvs.py rbtools/commands/post.py rbtools/commands/__init__.py rbtools/commands/diff.py rbtools/clients/clearcase.py rbtools/clients/plastic.py rbtools/clients/__init__.py rbtools/clients/mercurial.py rbtools/clients/git.py rbtools/clients/perforce.py rbtools/clients/bazaar.py rbtools/clients/svn.py Ignored Files: docs/rbtools/rbt/commands/post.rst docs/rbtools/rbt/commands/diff.rst AUTHORS
-
Change Summary:
Fix line too long error.
Commit: |
|
||||
---|---|---|---|---|---|
Diff: |
Revision 5 (+78 -26) |

-
Tool: Pyflakes Processed Files: rbtools/clients/cvs.py rbtools/commands/post.py rbtools/commands/__init__.py rbtools/commands/diff.py rbtools/clients/clearcase.py rbtools/clients/plastic.py rbtools/clients/__init__.py rbtools/clients/mercurial.py rbtools/clients/git.py rbtools/clients/perforce.py rbtools/clients/bazaar.py rbtools/clients/svn.py Ignored Files: docs/rbtools/rbt/commands/post.rst docs/rbtools/rbt/commands/diff.rst AUTHORS Tool: PEP8 Style Checker Processed Files: rbtools/clients/cvs.py rbtools/commands/post.py rbtools/commands/__init__.py rbtools/commands/diff.py rbtools/clients/clearcase.py rbtools/clients/plastic.py rbtools/clients/__init__.py rbtools/clients/mercurial.py rbtools/clients/git.py rbtools/clients/perforce.py rbtools/clients/bazaar.py rbtools/clients/svn.py Ignored Files: docs/rbtools/rbt/commands/post.rst docs/rbtools/rbt/commands/diff.rst AUTHORS