~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/versionedfile.py

  • Committer: Jelmer Vernooij
  • Date: 2008-07-17 09:13:16 UTC
  • mto: This revision was merged to the branch mainline in revision 3555.
  • Revision ID: jelmer@samba.org-20080717091316-p4ql8esopyyozfg8
Fix some stylistic issues pointed out by Ian.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1355
1355
 
1356
1356
    def get_parent_map(self, keys):
1357
1357
        """See VersionedFiles.get_parent_map."""
1358
 
        return dict([((k,), tuple([(p,) for p in v])) for k,v in self._get_parent_map([k for (k,) in keys]).iteritems()])
 
1358
        return dict([((k,), tuple([(p,) for p in v]))
 
1359
            for k,v in self._get_parent_map([k for (k,) in keys]).iteritems()])
1359
1360
 
1360
1361
    def get_sha1s(self, keys):
1361
1362
        """See VersionedFiles.get_sha1s."""
1363
1364
        for (k,) in keys:
1364
1365
            lines = self._get_lines(k)
1365
1366
            if lines is not None:
1366
 
                assert isinstance(lines, list)
 
1367
                if not isinstance(lines, list):
 
1368
                    raise AssertionError
1367
1369
                ret[(k,)] = osutils.sha_strings(lines)
1368
1370
        return ret
1369
1371
 
1372
1374
        for (k,) in list(keys):
1373
1375
            lines = self._get_lines(k)
1374
1376
            if lines is not None:
1375
 
                assert isinstance(lines, list)
 
1377
                if not isinstance(lines, list):
 
1378
                    raise AssertionError
1376
1379
                yield FulltextContentFactory((k,), None, 
1377
1380
                        sha1=osutils.sha_strings(lines),
1378
1381
                        text=''.join(lines))