Add support for -X to the Bazaar SCM Client.
Review Request #6349 — Created Sept. 20, 2014 and submitted
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 … |
david | |
This isn't aligned properly. The result... is a parameter to filter(), not len() |
david | |
This is very minor, but there's an extra blank line here. |
anselina | |
'fnmatch' imported but unused |
reviewbot | |
'fnmatch' imported but unused |
reviewbot |
- Change Summary:
-
Added students group
- Groups:
- Change Summary:
-
Update docs to reflect that Bazaar supports -X.
- Commit:
-
90181785819b5f37a3493df9f1bda38312f61c4d03f32f1c465e4636d3baa5bc953218626cf6ba1c
-
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
-
-
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
- Change Summary:
-
Refactor to use a util function instead of methods in the individual classes.
- Description:
-
Bazaar now supports excluding files from diffs and posts via
~ `_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. ~ 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. ~ Add a test for checking the result of the BazaarClient's diff
~ with file exclusion. + + The SVN support for -X has been refactored to use
+ rbtools.utils.diffs.filter_diff
instead of a method. - Commit:
-
03f32f1c465e4636d3baa5bc953218626cf6ba1c4904293342305d865124818351880c2ff002540d
-
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:
-
4904293342305d865124818351880c2ff002540ddf4c04dde65eb476d09eef7268490186b92dd38d
-
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:
-
Bazaar now supports excluding files from diffs and posts via
rbtools.utils.diffs.filter_diff
, which looks through theoutput 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. - - The SVN support for -X has been refactored to use
- rbtools.utils.diffs.filter_diff
instead of a method. - Depends On:
-
- Commit:
df4c04dde65eb476d09eef7268490186b92dd38dcc6e62090fb8e3bc6528def1066ad119b8524050
-
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