Add support for -X to the Bazaar SCM Client.
Review Request #6349 — Created Sept. 20, 2014 and submitted
Information | |
---|---|
brennie | |
RBTools | |
release-0.6.x | |
|
|
6358 | |
cc6e620... | |
Reviewers | |
rbtools, students | |
Bazaar now supports excluding files from diffs and posts via
rbtools.utils.diffs.filter_diff
, which looks through the
output of bzr diff for lines indicating the start of a file's
diff. If the file specified matches any pattern, that file's
diff is excluded from the resulting diff or post.Add a test for checking the result of the BazaarClient's diff
with file exclusion.
Unit tests pass.
Ran
rbt dff -X ..
in a Bazaar repository and got the specified file was
not included.
Description | From | Last Updated |
---|---|---|
If there's a diff but no exclude_patterns, I think this would end up calling join() and passing in a single … |
|
|
This isn't aligned properly. The result... is a parameter to filter(), not len() |
|
|
This is very minor, but there's an extra blank line here. |
|
|
'fnmatch' imported but unused |
![]() |
|
'fnmatch' imported but unused |
![]() |
Change Summary:
Update docs to reflect that Bazaar supports -X.
Commit: |
|
||||
---|---|---|---|---|---|
Diff: |
Revision 2 (+67 -7) |

-
Tool: Pyflakes Processed Files: rbtools/clients/tests.py rbtools/clients/bazaar.py Ignored Files: docs/rbtools/rbt/commands/post.rst docs/rbtools/rbt/commands/diff.rst Tool: PEP8 Style Checker Processed Files: rbtools/clients/tests.py rbtools/clients/bazaar.py Ignored Files: docs/rbtools/rbt/commands/post.rst docs/rbtools/rbt/commands/diff.rst
-
-
rbtools/clients/bazaar.py (Diff revision 2) If there's a diff but no exclude_patterns, I think this would end up calling
join()
and passing in a single string (which probably works since strings are iterable but could be very inefficient). How about something like this:if exclude_patterns: return ''.join(self._filter_diff(diff, exclude_patterns)) else: return diff
-
-
rbtools/clients/tests.py (Diff revision 2) This is very minor, but there's an extra blank line here.
-
-
rbtools/clients/tests.py (Diff revision 2) This isn't aligned properly. The
result...
is a parameter tofilter()
, notlen()
Change Summary:
Refactor to use a util function instead of methods in the individual classes.
Description: |
|
||||||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Commit: |
|
||||||||||||||||||||||||||||||||||||||||||||||||
Diff: |
Revision 3 (+70 -36) |

-
Tool: Pyflakes Processed Files: rbtools/clients/tests.py rbtools/clients/svn.py rbtools/clients/bazaar.py rbtools/utils/diffs.py Ignored Files: docs/rbtools/rbt/commands/post.rst docs/rbtools/rbt/commands/diff.rst Tool: PEP8 Style Checker Processed Files: rbtools/clients/tests.py rbtools/clients/svn.py rbtools/clients/bazaar.py rbtools/utils/diffs.py Ignored Files: docs/rbtools/rbt/commands/post.rst docs/rbtools/rbt/commands/diff.rst
-
-
Change Summary:
Remove unnecessary imports.
Commit: |
|
||||
---|---|---|---|---|---|
Diff: |
Revision 4 (+69 -37) |

-
Tool: Pyflakes Processed Files: rbtools/clients/tests.py rbtools/clients/svn.py rbtools/clients/bazaar.py rbtools/utils/diffs.py Ignored Files: docs/rbtools/rbt/commands/post.rst docs/rbtools/rbt/commands/diff.rst Tool: PEP8 Style Checker Processed Files: rbtools/clients/tests.py rbtools/clients/svn.py rbtools/clients/bazaar.py rbtools/utils/diffs.py Ignored Files: docs/rbtools/rbt/commands/post.rst docs/rbtools/rbt/commands/diff.rst
Change Summary:
Depend on the SVN refactor review request.
Description: |
|
|||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Depends On: |
|
|||||||||||||||||||||||||||||||||
Commit: |
|
|||||||||||||||||||||||||||||||||
Diff: |
Revision 5 (+41 -7) |

-
Tool: Pyflakes Processed Files: rbtools/clients/tests.py rbtools/clients/bazaar.py Ignored Files: docs/rbtools/rbt/commands/post.rst docs/rbtools/rbt/commands/diff.rst Tool: PEP8 Style Checker Processed Files: rbtools/clients/tests.py rbtools/clients/bazaar.py Ignored Files: docs/rbtools/rbt/commands/post.rst docs/rbtools/rbt/commands/diff.rst