Rev 2762: Fix status -r path / Tree.conflicts (Lukas Lalinsky) in file:///home/pqm/archives/thelove/bzr/%2Btrunk/

Canonical.com Patch Queue Manager pqm at pqm.ubuntu.com
Tue Aug 28 16:52:05 BST 2007


At file:///home/pqm/archives/thelove/bzr/%2Btrunk/

------------------------------------------------------------
revno: 2762
revision-id: pqm at pqm.ubuntu.com-20070828155202-pcq659o80mx4f4p3
parent: pqm at pqm.ubuntu.com-20070828134844-fg5g3a447hu2h8u7
parent: abentley at panoramicfeedback.com-20070828144042-4sval3dj75qul0sf
committer: Canonical.com Patch Queue Manager <pqm at pqm.ubuntu.com>
branch nick: +trunk
timestamp: Tue 2007-08-28 16:52:02 +0100
message:
  Fix status -r path / Tree.conflicts (Lukas Lalinsky)
modified:
  NEWS                           NEWS-20050323055033-4e00b5db738777ff
  bzrlib/tests/blackbox/test_status.py teststatus.py-20050712014354-508855eb9f29f7dc
  bzrlib/tests/tree_implementations/test_tree.py test_tree.py-20061215160206-usu7lwcj8aq2n3br-1
  bzrlib/tree.py                 tree.py-20050309040759-9d5f2496be663e77
    ------------------------------------------------------------
    revno: 2761.1.3
    merged: abentley at panoramicfeedback.com-20070828144042-4sval3dj75qul0sf
    parent: abentley at panoramicfeedback.com-20070828143701-4bsy8mth0r01d6mr
    committer: Aaron Bentley <abentley at panoramicfeedback.com>
    branch nick: tree-conflicts
    timestamp: Tue 2007-08-28 10:40:42 -0400
    message:
      Update test to use assertIsInstance
    ------------------------------------------------------------
    revno: 2761.1.2
    merged: abentley at panoramicfeedback.com-20070828143701-4bsy8mth0r01d6mr
    parent: abentley at panoramicfeedback.com-20070828143510-om578jg17c2824sl
    committer: Aaron Bentley <abentley at panoramicfeedback.com>
    branch nick: tree-conflicts
    timestamp: Tue 2007-08-28 10:37:01 -0400
    message:
      Fix line wrapping
    ------------------------------------------------------------
    revno: 2761.1.1
    merged: abentley at panoramicfeedback.com-20070828143510-om578jg17c2824sl
    parent: pqm at pqm.ubuntu.com-20070828134844-fg5g3a447hu2h8u7
    parent: lalinsky at gmail.com-20070827165950-lhyo878rxmeud3mj
    committer: Aaron Bentley <abentley at panoramicfeedback.com>
    branch nick: tree-conflicts
    timestamp: Tue 2007-08-28 10:35:10 -0400
    message:
      Merge Tree.conficts fix
    ------------------------------------------------------------
    revno: 2748.2.2
    merged: lalinsky at gmail.com-20070827165950-lhyo878rxmeud3mj
    parent: lalinsky at gmail.com-20070827145548-s89tzqovpyvqdp61
    committer: Lukáš Lalinsky <lalinsky at gmail.com>
    branch nick: conflicts
    timestamp: Mon 2007-08-27 18:59:50 +0200
    message:
      Add TestConflicts to tests.tree_implementations.test_tree. Update NEWS.
    ------------------------------------------------------------
    revno: 2748.2.1
    merged: lalinsky at gmail.com-20070827145548-s89tzqovpyvqdp61
    parent: pqm at pqm.ubuntu.com-20070825182243-a3w20rpadbfz8euc
    committer: Lukáš Lalinsky <lalinsky at gmail.com>
    branch nick: conflicts
    timestamp: Mon 2007-08-27 16:55:48 +0200
    message:
      Return ConflictsList() instead of [] from Tree.conflicts.
=== modified file 'NEWS'
--- a/NEWS	2007-08-28 12:19:35 +0000
+++ b/NEWS	2007-08-28 14:35:10 +0000
@@ -54,6 +54,8 @@
       names ending in a '.' at the end of messages were confused with a
       full stop that may or not have been there. (Daniel Watkins, #129791)
 
+    * Fix ``status FILE -r X..Y``. (Lukáš Lalinský)
+
   IMPROVEMENTS:
 
     * ``pull`` and ``merge`` are much faster at installing bundle format 4.

=== modified file 'bzrlib/tests/blackbox/test_status.py'
--- a/bzrlib/tests/blackbox/test_status.py	2007-08-08 02:00:07 +0000
+++ b/bzrlib/tests/blackbox/test_status.py	2007-08-28 14:37:01 +0000
@@ -230,6 +230,13 @@
         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):
         tree = self.make_branch_and_tree('.')
         self.build_tree(['dir2/'])

=== modified file 'bzrlib/tests/tree_implementations/test_tree.py'
--- a/bzrlib/tests/tree_implementations/test_tree.py	2007-08-20 14:27:40 +0000
+++ b/bzrlib/tests/tree_implementations/test_tree.py	2007-08-28 14:40:42 +0000
@@ -17,6 +17,7 @@
 from bzrlib import (
     errors,
     tests,
+    conflicts,
     )
 from bzrlib.tests import TestSkipped
 from bzrlib.tests.tree_implementations import TestCaseWithTree
@@ -142,3 +143,12 @@
         self.assertRaises(errors.NoSuchId, lambda: list(
                           tree.iter_files_bytes(
                           [('qux-id', 'file1-notpresent')])))
+
+
+class TestConflicts(TestCaseWithTree):
+
+    def test_conflicts(self):
+        """Tree.conflicts() should return a ConflictList instance."""
+        work_tree = self.make_branch_and_tree('wt')
+        tree = self._convert_tree(work_tree)
+        self.assertIsInstance(tree.conflicts(), conflicts.ConflictList)

=== modified file 'bzrlib/tree.py'
--- a/bzrlib/tree.py	2007-08-20 13:47:09 +0000
+++ b/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."""




More information about the bazaar-commits mailing list