Merge lp:~parthm/bzr/300062-bad-pattern-error-part-2 into lp:bzr
Status: | Rejected | ||||
---|---|---|---|---|---|
Rejected by: | Parth Malwankar | ||||
Proposed branch: | lp:~parthm/bzr/300062-bad-pattern-error-part-2 | ||||
Merge into: | lp:bzr | ||||
Diff against target: |
272 lines (+128/-38) 6 files modified
NEWS (+1/-0) bzrlib/builtins.py (+8/-0) bzrlib/globbing.py (+73/-23) bzrlib/tests/blackbox/test_ignore.py (+16/-0) bzrlib/tests/per_workingtree/test_is_ignored.py (+25/-13) bzrlib/tests/test_globbing.py (+5/-2) |
||||
To merge this branch: | bzr merge lp:~parthm/bzr/300062-bad-pattern-error-part-2 | ||||
Related bugs: |
|
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
bzr-core | Pending | ||
Review via email: mp+29467@code.launchpad.net |
Description of the change
=== Fix towards bug #300062 ===
This is the second patch towards bug #300062. The first patch can be found at [1].
This does the following:
1. `bzr ignore` now fails in case an invalid pattern is supplied. The bad pattern is displayed to the user.
2. In case an invalid pattern is encountered in .bzrignore or user ignore file, the error message shown now displays the specific pattern(s) that caused the failure.
3. Some code cleanup is done Globster.
One thing pending is that the error messages do not show what file the bad pattern came from. Ideally, I would like to show a message like "file:line_
Sample output:
[a1234]% ~/src/bzr.
bzr: error: Invalid ignore pattern(s) found.
RE:[
RE:*.cpp
bzr: ERROR: Invalid pattern(s) found.
[a1234]% ~/src/bzr.
bzr: ERROR: Invalid pattern(s) found. File ~/.bazaar/ignore or .bzrignore contains error(s).
RE:[
[a1234]%
[1] https:/
Unmerged revisions
- 5348. By Parth Malwankar
-
order of patterns added using _add_pattern is predictable
Is 2.2b4 being considered a feature freeze or can this patch be considered for 2.2?
IMO it would be nice to have this in if possible as the user gets to see the failing pattern in the error message. The specific failing ignore file is not shown but that can be a 2.3 feature.