~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/test_version_info.py

  • Committer: John Arbash Meinel
  • Date: 2010-08-13 19:08:57 UTC
  • mto: (5050.17.7 2.2)
  • mto: This revision was merged to the branch mainline in revision 5379.
  • Revision ID: john@arbash-meinel.com-20100813190857-mvzwnimrxvm0zimp
Lots of documentation updates.

We had a lot of http links pointing to the old domain. They should
all now be properly updated to the new domain. (only bazaar-vcs.org
entry left is for pqm, which seems to still reside at the old url.)

Also removed one 'TODO' doc entry about switching to binary xdelta, since
we basically did just that with groupcompress.

Show diffs side-by-side

added added

removed removed

Lines of Context:
23
23
 
24
24
from bzrlib import (
25
25
    errors,
 
26
    registry,
26
27
    symbol_versioning,
27
28
    tests,
28
29
    version_info_formats,
148
149
        stanza = regen(check_for_clean=True, include_file_revisions=True)
149
150
        self.assertEqual(['False'], stanza.get_all('clean'))
150
151
 
151
 
        # XXX: This assumes it's being run against a repository that updates
152
 
        # the root revision on every commit.  Newer ones that use
153
 
        # RootCommitBuilder won't update it on each commit.
 
152
        # This assumes it's being run against a tree that does not update the
 
153
        # root revision on every commit.
154
154
        file_rev_stanza = get_one_stanza(stanza, 'file-revisions')
155
155
        self.assertEqual(['', 'a', 'b', 'c'], file_rev_stanza.get_all('path'))
156
 
        self.assertEqual(['r3', 'r3', 'r2', 'unversioned'],
 
156
        self.assertEqual(['r1', 'r3', 'r2', 'unversioned'],
157
157
            file_rev_stanza.get_all('revision'))
158
158
        os.remove('branch/c')
159
159
 
171
171
        file_rev_stanza = get_one_stanza(stanza, 'file-revisions')
172
172
        self.assertEqual(['', 'a', 'b', 'c', 'd'],
173
173
                          file_rev_stanza.get_all('path'))
174
 
        self.assertEqual(['r3', 'modified', 'renamed to d', 'new',
 
174
        self.assertEqual(['r1', 'modified', 'renamed to d', 'new',
175
175
                          'renamed from b'],
176
176
                         file_rev_stanza.get_all('revision'))
177
177
 
181
181
        stanza = regen(check_for_clean=True, include_file_revisions=True)
182
182
        file_rev_stanza = get_one_stanza(stanza, 'file-revisions')
183
183
        self.assertEqual(['', 'a', 'c', 'd'], file_rev_stanza.get_all('path'))
184
 
        self.assertEqual(['r4', 'r4', 'unversioned', 'removed'],
 
184
        self.assertEqual(['r1', 'r4', 'unversioned', 'removed'],
185
185
                         file_rev_stanza.get_all('revision'))
186
186
 
187
187
    def test_python_null(self):
326
326
 
327
327
    def setUp(self):
328
328
        super(TestVersionInfoFormatRegistry, self).setUp()
329
 
        registry = version_info_formats.format_registry
330
 
        self._default_key = registry._default_key
331
 
        self._dict = registry._dict.copy()
332
 
        self._help_dict = registry._help_dict.copy()
333
 
        self._info_dict = registry._info_dict.copy()
334
 
        self.addCleanup(self._cleanup)
335
 
 
336
 
    def _cleanup(self):
337
 
        # Restore the registry to pristine state after the test runs
338
 
        registry = version_info_formats.format_registry
339
 
        registry._default_key = self._default_key
340
 
        registry._dict = self._dict
341
 
        registry._help_dict = self._help_dict
342
 
        registry._info_dict = self._info_dict
 
329
        self.overrideAttr(version_info_formats,
 
330
                          'format_registry', registry.Registry())
343
331
 
344
332
    def test_register_remove(self):
345
333
        registry = version_info_formats.format_registry