[MERGE] Return ConflictsList() instead of [] from Tree.conflicts

Aaron Bentley aaron.bentley at utoronto.ca
Mon Aug 27 16:29:58 BST 2007


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Lukáš Lalinský wrote:
> Hi,
> 
> running status with specified files and a revision range results in this
> error:

Oops.  Mea culpa.

> === modified file 'bzrlib/tests/blackbox/test_status.py'
> --- bzrlib/tests/blackbox/test_status.py	2007-08-08 02:00:07 +0000
> +++ bzrlib/tests/blackbox/test_status.py	2007-08-27 14:55:48 +0000
> @@ -230,6 +230,14 @@
>          tof.seek(0)
>          self.assertEquals(tof.readlines(), ['?   dir2/\n'])
>  
> +        tof = StringIO()
> +        revs = [RevisionSpec.from_string('0'), RevisionSpec.from_string('1')]
> +        show_tree_status(wt, specific_files=['test.c'], to_file=tof, short=True,
> +                         revision=revs)
> +        tof.seek(0)
> +        self.assertEquals(tof.readlines(), ['+N  test.c\n'])
> +
> +
>      def test_specific_files_conflicts(self):

There should only be one blank line between methods in a class.

> === modified file 'bzrlib/tree.py'
> --- bzrlib/tree.py	2007-08-20 13:47:09 +0000
> +++ bzrlib/tree.py	2007-08-27 14:55:48 +0000
> @@ -26,6 +26,7 @@
>      delta,
>      osutils,
>      revision as _mod_revision,
> +    conflicts as _mod_conflicts,
>      symbol_versioning,
>      )
>  from bzrlib.decorators import needs_read_lock
> @@ -104,7 +105,7 @@
>  
>          Each conflict is an instance of bzrlib.conflicts.Conflict.
>          """
> -        return []
> +        return _mod_conflicts.ConflictList()
>  
>      def extras(self):
>          """For trees that can have unversioned files, return all such paths."""
> 

Since the bug is in Tree, not status, I think we need a test in
bzrlib/tests/tree_implementations.

bb:resubmit

Aaron
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFG0u320F+nu1YWqI0RAnlnAJ0a0Yr7VF8NFOaKUoTTy9wLeOUT+gCdEjeG
2ZLrmEDCeLUI/xRyKh24D0A=
=GCBK
-----END PGP SIGNATURE-----



More information about the bazaar mailing list