~abentley/thekraken/1.1

« back to all changes in this revision

Viewing changes to tests/test_pipeline.py

  • Committer: Aaron Bentley
  • Date: 2010-12-03 00:55:12 UTC
  • Revision ID: aaron@aaronbentley.com-20101203005512-i8c03kkhomn6ybwz
ImplementĀ pumpĀ --reprocess.

Show diffs side-by-side

added added

removed removed

Lines of Context:
462
462
            >>>>>>> MERGE-SOURCE
463
463
            """) , text)
464
464
 
 
465
    def get_conflict_text(self, manager, mc):
 
466
        manager.pipeline_merge(merge_config=mc)
 
467
        foo = manager.checkout
 
468
        return foo.get_file_text(foo.path2id('foo'))
 
469
 
 
470
    def test_reprocess(self):
 
471
        foo = self.create_conflict_pipeline('base\n', 'common\none\n',
 
472
                'common\ntwo\n')
 
473
        manager = PipeManager(foo.branch, foo)
 
474
        text = self.get_conflict_text(manager, MergeConfig(reprocess=True))
 
475
        self.assertEqual(dedent("""\
 
476
            common
 
477
            <<<<<<< TREE
 
478
            two
 
479
            =======
 
480
            one
 
481
            >>>>>>> MERGE-SOURCE
 
482
            """) , text)
 
483
 
465
484
    def test_sync_pipeline_creates_branches(self):
466
485
        self.build_tree(['a/', 'b/'])
467
486
        tree = self.make_branch_and_tree('a/foo')