~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/bundle/bundle_data.py

  • Committer: Gary van der Merwe
  • Date: 2010-08-02 19:56:52 UTC
  • mfrom: (5050.3.18 2.2)
  • mto: (5050.3.19 2.2)
  • mto: This revision was merged to the branch mainline in revision 5371.
  • Revision ID: garyvdm@gmail.com-20100802195652-o1ppjemhwrr98i61
Merge lp:bzr/2.2.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
# Copyright (C) 2006 Canonical Ltd
 
1
# Copyright (C) 2005-2010 Canonical Ltd
2
2
#
3
3
# This program is free software; you can redistribute it and/or modify
4
4
# it under the terms of the GNU General Public License as published by
278
278
        if rev.revision_id != revision_id:
279
279
            raise AssertionError()
280
280
        if sha1 != rev.inventory_sha1:
281
 
            open(',,bogus-inv', 'wb').write(s)
 
281
            f = open(',,bogus-inv', 'wb')
 
282
            try:
 
283
                f.write(s)
 
284
            finally:
 
285
                f.close()
282
286
            warning('Inventory sha hash mismatch for revision %s. %s'
283
287
                    ' != %s' % (revision_id, sha1, rev.inventory_sha1))
284
288
 
327
331
                try:
328
332
                    name, value = info_item.split(':', 1)
329
333
                except ValueError:
330
 
                    raise 'Value %r has no colon' % info_item
 
334
                    raise ValueError('Value %r has no colon' % info_item)
331
335
                if name == 'last-changed':
332
336
                    last_changed = value
333
337
                elif name == 'executable':