Add support for -X/--exclude/EXCLUDE_FILES.
Review Request #6317 — Created Sept. 12, 2014 and submitted
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 … |
chipx86 | |
"or" |
chipx86 | |
Can we rename the existing parameter files to be include_files, and put the new parameter right after that one? Same … |
david | |
We prefer the % formatting scheme over this one (change "{0}" to "%s" and replace ".format(tool.name)" with "% tool.name"). |
david | |
Can you wrap the whole conditional in parens and remove the continuation character? |
david | |
Same comment about .format vs % |
david | |
Col: 80 E501 line too long (80 > 79 characters) |
reviewbot |
-
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
-
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
-
-
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:
-
+ Unit tests pass.
+ Running rbt diff
with-X
or--exclude
flags, or with+ EXCLUDE_FILES
set in.reviewboardrc
causes the expected error+ message - Commit:
-
10202e0005e98b1d17e04042764acb5f1c1fad164a3c7be0aeb917f6dfe822f7d257bf718365202f
-
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:
-
Rename files -> include_files in SCMClient.diff methods.
Use % formatting instead of str.format()
Fix formatting in multi-line if statement.
- Commit:
-
4a3c7be0aeb917f6dfe822f7d257bf718365202fe60ebd0c57199b5a122ff0e7748573fac092ec12
-
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:
-
e60ebd0c57199b5a122ff0e7748573fac092ec12422122cedafee46dbd68733ccb1ab4952d15cbe0
-
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