give a better message for an invalid ignore regexp
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Bazaar |
Fix Released
|
Medium
|
Parth Malwankar |
Bug Description
C:\temp\bt>bzr init
Standalone tree (format: pack-0.92)
Location:
branch root: .
C:\temp\bt>bzr ignore RE:*.cpp
bzr: ERROR: sre_constants.
Traceback (most recent call last):
File "bzrlib\
File "bzrlib\
File "bzrlib\
File "bzrlib\
File "bzrlib\
File "bzrlib\
File "bzrlib\
File "bzrlib\
File "re.pyo", line 188, in compile
File "re.pyo", line 241, in _compile
error: nothing to repeat
bzr 1.9 on python 2.5.2 (win32)
arguments: ['bzr', 'ignore', 'RE:*.cpp']
encoding: 'cp1252', fsenc: 'mbcs', lang: None
plugins:
bzrtools C:\Program Files\Bazaar\
launchpad C:\Program Files\Bazaar\
qbzr C:\Program Files\Bazaar\
svn C:\Program Files\Bazaar\
*** Bazaar has encountered an internal error.
Please report a bug at https:/
including this traceback, and a description of what you
were doing when the error occurred.
Related branches
- John A Meinel: Needs Fixing
- Robert Collins (community): Needs Fixing
-
Diff: 698 lines (+360/-66)17 files modifiedNEWS (+8/-0)
bzrlib/builtins.py (+11/-2)
bzrlib/errors.py (+7/-0)
bzrlib/globbing.py (+134/-4)
bzrlib/ignores.py (+2/-3)
bzrlib/lazy_regex.py (+13/-6)
bzrlib/log.py (+1/-3)
bzrlib/osutils.py (+0/-23)
bzrlib/tests/__init__.py (+1/-2)
bzrlib/tests/blackbox/test_add.py (+30/-0)
bzrlib/tests/blackbox/test_ignore.py (+33/-0)
bzrlib/tests/blackbox/test_ignored.py (+14/-0)
bzrlib/tests/blackbox/test_log.py (+2/-5)
bzrlib/tests/blackbox/test_status.py (+53/-0)
bzrlib/tests/test_globbing.py (+50/-0)
bzrlib/tests/test_ignores.py (+1/-0)
bzrlib/tests/test_osutils.py (+0/-18)
- John A Meinel: Needs Fixing
- Robert Collins: Pending requested
- bzr-core: Pending requested
-
Diff: 680 lines (+383/-39)12 files modifiedNEWS (+5/-0)
bzrlib/builtins.py (+10/-0)
bzrlib/errors.py (+1/-1)
bzrlib/globbing.py (+143/-28)
bzrlib/lazy_regex.py (+6/-6)
bzrlib/tests/blackbox/test_add.py (+28/-0)
bzrlib/tests/blackbox/test_ignore.py (+32/-0)
bzrlib/tests/blackbox/test_ignored.py (+15/-0)
bzrlib/tests/blackbox/test_ls.py (+23/-0)
bzrlib/tests/blackbox/test_status.py (+69/-0)
bzrlib/tests/test_globbing.py (+41/-4)
bzrlib/tests/test_ignores.py (+10/-0)
- Martin Pool: Approve
- John A Meinel: Needs Information
- Diff: 0 lines
- bzr-core: Pending requested
-
Diff: 272 lines (+128/-38)6 files modifiedNEWS (+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)
- Vincent Ladeuil: Approve
- John A Meinel: Needs Fixing
-
Diff: 279 lines (+135/-39)6 files modifiedNEWS (+5/-0)
bzrlib/builtins.py (+8/-0)
bzrlib/globbing.py (+75/-23)
bzrlib/tests/blackbox/test_ignore.py (+16/-0)
bzrlib/tests/per_workingtree/test_is_ignored.py (+25/-13)
bzrlib/tests/test_globbing.py (+6/-3)
description: | updated |
Changed in bzr: | |
status: | Triaged → Confirmed |
summary: |
- "bzr ignore RE:*.cpp" just crashed in an empty repo. + give a better message for an invalid ignore regexp |
tags: | added: easy ignore traceback |
*.cpp
is an invalid regex, I would guess you actually just wanted a glob, which would be "*.cpp".
If you wanted a regex, then you would need "RE:.*\.cpp"
That said, bzr could be a bit better about giving you a single line "Invalid regex: '*.cpp'" or something of the sort.