~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/test_bundle.py

  • Committer: Robert Collins
  • Date: 2009-03-27 04:10:25 UTC
  • mfrom: (4208 +trunk)
  • mto: This revision was merged to the branch mainline in revision 4216.
  • Revision ID: robertc@robertcollins.net-20090327041025-rgutx4q03xo4pq6l
Resolve NEWS conflicts.

Show diffs side-by-side

added added

removed removed

Lines of Context:
12
12
#
13
13
# You should have received a copy of the GNU General Public License
14
14
# along with this program; if not, write to the Free Software
15
 
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
 
15
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
16
16
 
17
17
from cStringIO import StringIO
18
18
import os
1342
1342
        install_bundle(target_repo, serializer.read(s))
1343
1343
        target_repo.lock_read()
1344
1344
        self.addCleanup(target_repo.unlock)
 
1345
        # Turn the 'iterators_of_bytes' back into simple strings for comparison
 
1346
        repo_texts = dict((i, ''.join(content)) for i, content
 
1347
                          in target_repo.iter_files_bytes(
 
1348
                                [('fileid-2', 'rev1', '1'),
 
1349
                                 ('fileid-2', 'rev2', '2')]))
1345
1350
        self.assertEqual({'1':'contents1\nstatic\n',
1346
 
            '2':'contents2\nstatic\n'},
1347
 
            dict(target_repo.iter_files_bytes(
1348
 
                [('fileid-2', 'rev1', '1'), ('fileid-2', 'rev2', '2')])))
 
1351
                          '2':'contents2\nstatic\n'},
 
1352
                         repo_texts)
1349
1353
        rtree = target_repo.revision_tree('rev2')
1350
1354
        inventory_vf = target_repo.inventories
1351
1355
        # If the inventory store has a graph, it must match the revision graph.