Rev 4428: (igc) fix rule handling so that eol is optional in file:///home/pqm/archives/thelove/bzr/%2Btrunk/
Canonical.com Patch Queue Manager
pqm at pqm.ubuntu.com
Thu Jun 11 01:37:26 BST 2009
At file:///home/pqm/archives/thelove/bzr/%2Btrunk/
------------------------------------------------------------
revno: 4428
revision-id: pqm at pqm.ubuntu.com-20090611003722-a15ofjj3n248m646
parent: pqm at pqm.ubuntu.com-20090610103331-ht76b0l92gj1gn9d
parent: ian.clatworthy at canonical.com-20090610232948-srfxg31kurqa769c
committer: Canonical.com Patch Queue Manager <pqm at pqm.ubuntu.com>
branch nick: +trunk
timestamp: Thu 2009-06-11 01:37:22 +0100
message:
(igc) fix rule handling so that eol is optional
modified:
NEWS NEWS-20050323055033-4e00b5db738777ff
bzrlib/filters/__init__.py __init__.py-20080416080515-mkxl29amuwrf6uir-2
bzrlib/tests/test_eol_filters.py test_eol_filters.py-20090327060429-todzdjmqt3bpv5r8-2
bzrlib/tests/test_filters.py test_filters.py-20080417120614-tc3zok0vvvprsc99-1
------------------------------------------------------------
revno: 4427.1.1
revision-id: ian.clatworthy at canonical.com-20090610232948-srfxg31kurqa769c
parent: pqm at pqm.ubuntu.com-20090610103331-ht76b0l92gj1gn9d
parent: ian.clatworthy at canonical.com-20090610090117-tdfn0tqx6b23ohl2
committer: Ian Clatworthy <ian.clatworthy at canonical.com>
branch nick: integration
timestamp: Thu 2009-06-11 09:29:48 +1000
message:
(igc) fix rule handling so that eol is optional
modified:
NEWS NEWS-20050323055033-4e00b5db738777ff
bzrlib/filters/__init__.py __init__.py-20080416080515-mkxl29amuwrf6uir-2
bzrlib/tests/test_eol_filters.py test_eol_filters.py-20090327060429-todzdjmqt3bpv5r8-2
bzrlib/tests/test_filters.py test_filters.py-20080417120614-tc3zok0vvvprsc99-1
------------------------------------------------------------
revno: 4423.2.2
revision-id: ian.clatworthy at canonical.com-20090610090117-tdfn0tqx6b23ohl2
parent: ian.clatworthy at canonical.com-20090610085456-0dr01245tf4b83n6
committer: Ian Clatworthy <ian.clatworthy at canonical.com>
branch nick: eol-none-bug
timestamp: Wed 2009-06-10 19:01:17 +1000
message:
add NEWS item
modified:
NEWS NEWS-20050323055033-4e00b5db738777ff
------------------------------------------------------------
revno: 4423.2.1
revision-id: ian.clatworthy at canonical.com-20090610085456-0dr01245tf4b83n6
parent: pqm at pqm.ubuntu.com-20090610010249-5iyq9oics6tysru4
committer: Ian Clatworthy <ian.clatworthy at canonical.com>
branch nick: eol-none-bug
timestamp: Wed 2009-06-10 18:54:56 +1000
message:
fix bug #379370
modified:
bzrlib/filters/__init__.py __init__.py-20080416080515-mkxl29amuwrf6uir-2
bzrlib/tests/test_eol_filters.py test_eol_filters.py-20090327060429-todzdjmqt3bpv5r8-2
bzrlib/tests/test_filters.py test_filters.py-20080417120614-tc3zok0vvvprsc99-1
=== modified file 'NEWS'
--- a/NEWS 2009-06-10 09:34:02 +0000
+++ b/NEWS 2009-06-10 23:29:48 +0000
@@ -84,6 +84,9 @@
* Fix problem of "directory not empty" when contending for a lock over
sftp. (Martin Pool, #340352)
+* Fix rule handling so that eol is optional, not mandatory.
+ (Ian Clatworthy, #379370)
+
* Reconcile can now deal with text revisions that originated in revisions
that are ghosts. (Jelmer Vernooij, #336749)
=== modified file 'bzrlib/filters/__init__.py'
--- a/bzrlib/filters/__init__.py 2009-04-20 08:37:32 +0000
+++ b/bzrlib/filters/__init__.py 2009-06-10 08:54:56 +0000
@@ -247,6 +247,8 @@
return stack
stack = []
for k, v in preferences:
+ if v is None:
+ continue
try:
stack_map_lookup = _filter_stacks_registry.get(k)
except KeyError:
=== modified file 'bzrlib/tests/test_eol_filters.py'
--- a/bzrlib/tests/test_eol_filters.py 2009-05-07 05:08:46 +0000
+++ b/bzrlib/tests/test_eol_filters.py 2009-06-10 23:29:48 +0000
@@ -66,3 +66,11 @@
"""
prefs = (('eol','unknown-value'),)
self.assertRaises(errors.BzrError, _get_filter_stack_for, prefs)
+
+ def test_eol_missing_altogether_is_ok(self):
+ """
+ Not having eol in the set of preferences should be ok.
+ """
+ # In this case, 'eol' is looked up with a value of None.
+ prefs = (('eol', None),)
+ self.assertEqual([], _get_filter_stack_for(prefs))
=== modified file 'bzrlib/tests/test_filters.py'
--- a/bzrlib/tests/test_filters.py 2009-04-08 03:34:31 +0000
+++ b/bzrlib/tests/test_filters.py 2009-06-10 23:29:48 +0000
@@ -148,7 +148,7 @@
self.assertEqual(a_stack, _get_filter_stack_for(prefs))
prefs = (('foo','v2'),)
self.assertEqual(z_stack, _get_filter_stack_for(prefs))
- prefs = (('foo','v1'),('bar','v1'))
+ prefs = (('foo','v1'), ('bar','v1'))
self.assertEqual(a_stack + d_stack, _get_filter_stack_for(prefs))
# Test an unknown preference
prefs = (('baz','v1'),)
@@ -156,6 +156,9 @@
# Test an unknown value
prefs = (('foo','v3'),)
self.assertEqual([], _get_filter_stack_for(prefs))
+ # Test a value of None is skipped
+ prefs = (('foo',None), ('bar', 'v1'))
+ self.assertEqual(d_stack, _get_filter_stack_for(prefs))
finally:
# Restore the real registry
filters._reset_registry(original_registry)
More information about the bazaar-commits
mailing list