~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/blackbox/test_log.py

  • Committer: Alexander Belchenko
  • Date: 2007-04-19 19:28:39 UTC
  • mto: This revision was merged to the branch mainline in revision 2439.
  • Revision ID: bialix@ukr.net-20070419192839-p964uu06n6vbjgrt
changes after John's review

Show diffs side-by-side

added added

removed removed

Lines of Context:
118
118
        out, err = self.run_bzr('log', 'does-not-exist', retcode=3)
119
119
        self.assertContainsRe(
120
120
            err, 'Path does not have any revision history: does-not-exist')
121
 
        
 
121
 
122
122
    def test_log_with_tags(self):
123
123
        self._prepare(format='dirstate-tags')
124
124
        self.runbzr('tag -r1 tag1')
131
131
        log = self.runbzr("log -r1")[0]
132
132
        # I guess that we can't know the order of tags in the output
133
133
        # since dicts are unordered, need to check both possibilities
134
 
        self.assertTrue(('tags: tag1, tag1.1' in log) or 
135
 
                        ('tags: tag1.1, tag1' in log))
136
 
                        
 
134
        self.assertContainsRe(log, r'tags: (tag1, tag1\.1|tag1\.1, tag1)')
 
135
 
137
136
    def test_merged_log_with_tags(self):
138
137
        os.mkdir('branch1')
139
138
        os.chdir('branch1')
140
139
        self._prepare(format='dirstate-tags')
141
140
        os.chdir('..')
142
 
        self.run_bzr('branch', 'branch1', 'branch2')
 
141
        self.runbzr('branch branch1 branch2')
143
142
        os.chdir('branch1')
144
 
        self.run_bzr('commit', '-m', 'foobar', '--unchanged')
 
143
        self.runbzr('commit -m foobar --unchanged')
145
144
        self.runbzr('tag tag1')
146
145
        os.chdir('../branch2')
147
 
        self.run_bzr('merge', '../branch1')
148
 
        self.run_bzr('commit', '-m', 'merge branch 1')
 
146
        self.runbzr('merge ../branch1')
 
147
        self.runbzr('commit -m merge_branch_1')
149
148
        log = self.runbzr("log -r-1")[0]
150
 
        self.assertTrue('    tags: tag1' in log)
 
149
        self.assertContainsRe(log, r'    tags: tag1')
151
150
 
152
151
 
153
152
class TestLogMerges(ExternalBase):