~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/branch_implementations/test_branch.py

  • Committer: Robert Collins
  • Date: 2006-02-16 07:20:25 UTC
  • mto: (1534.1.24 integration)
  • mto: This revision was merged to the branch mainline in revision 1554.
  • Revision ID: robertc@robertcollins.net-20060216072025-8a97e0b2c3f3cc92
Start factoring out the upgrade policy logic.

Show diffs side-by-side

added added

removed removed

Lines of Context:
41
41
from bzrlib.upgrade import upgrade
42
42
from bzrlib.workingtree import WorkingTree
43
43
 
 
44
 
44
45
# TODO: Make a branch using basis branch, and check that it 
45
46
# doesn't request any files that could have been avoided, by 
46
47
# hooking into the Transport.
271
272
                            'sig').read())
272
273
 
273
274
    def test_upgrade_preserves_signatures(self):
274
 
        # this is in the current test format
275
275
        wt = self.make_branch_and_tree('source')
276
276
        wt.commit('A', allow_pointless=True, rev_id='A')
277
277
        wt.branch.repository.sign_revision('A',
278
278
            bzrlib.gpg.LoopbackGPGStrategy(None))
279
279
        old_signature = wt.branch.repository.revision_store.get('A',
280
280
            'sig').read()
281
 
        upgrade(wt.basedir)
 
281
        try:
 
282
            upgrade(wt.basedir)
 
283
        except errors.UpToDateFormat:
 
284
            # this is in the most current format already.
 
285
            return
282
286
        wt = WorkingTree.open(wt.basedir)
283
287
        new_signature = wt.branch.repository.revision_store.get('A',
284
288
            'sig').read()