~ubuntu-branches/ubuntu/quantal/bzr-svn/quantal

« back to all changes in this revision

Viewing changes to tests/test_repository.py

  • Committer: Bazaar Package Importer
  • Author(s): Jelmer Vernooij
  • Date: 2008-11-10 02:31:45 UTC
  • mfrom: (1.1.16 upstream)
  • Revision ID: james.westby@ubuntu.com-20081110023145-h7vtophkjmcajp9g
Tags: 0.4.15-1
New upstream release.

Show diffs side-by-side

added added

removed removed

Lines of Context:
345
345
                          repos.generate_revision_id(2, 'branches/abranch', repos.get_mapping())
346
346
                          ], items)
347
347
 
 
348
    def test_follow_history_corrupt_fileprops(self):
 
349
        repos_url = self.make_repository("a")
 
350
 
 
351
        dc = self.get_commit_editor(repos_url)
 
352
        trunk = dc.add_dir("trunk")
 
353
        trunk.change_prop("bzr:revision-id:v3-trunk0", "1 bla\n")
 
354
        trunk.add_file("trunk/afile").modify("data")
 
355
        dc.add_dir("branches")
 
356
        dc.close()
 
357
 
 
358
        dc = self.get_commit_editor(repos_url)
 
359
        trunk = dc.open_dir("trunk")
 
360
        trunk.change_prop("bzr:revision-id:v3-trunk0", "1 bla\n2 blie\n")
 
361
        dc.close()
 
362
 
 
363
        dc = self.get_commit_editor(repos_url)
 
364
        trunk = dc.open_dir("trunk")
 
365
        trunk.change_prop("bzr:revision-id:v3-trunk0", "1 bla\n")
 
366
        dc.close()
 
367
 
 
368
        dc = self.get_commit_editor(repos_url)
 
369
        trunk = dc.open_dir("trunk")
 
370
        trunk.change_prop("bzr:revision-id:v3-trunk0", "1 bla\n2 hoi\n")
 
371
        dc.close()
 
372
 
 
373
        repos = Repository.open(repos_url)
 
374
        set_branching_scheme(repos, TrunkBranchingScheme())
 
375
 
 
376
        items = list(repos.iter_reverse_revision_history("hoi"))
 
377
        self.assertEqual(["hoi", 
 
378
                          repos.get_mapping().generate_revision_id(repos.uuid, 3, 'trunk'),
 
379
                          "blie", "bla"], items)
 
380
 
348
381
    def test_branch_log_specific(self):
349
382
        repos_url = self.make_client("a", "dc")
350
383
        self.build_tree({