~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

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

Merge cleanup into texinfo

Show diffs side-by-side

added added

removed removed

Lines of Context:
158
158
        self.make_linear_branch()
159
159
        self.assertLogRevnos(['-c1'], ['1'])
160
160
 
 
161
    def test_branch_revspec(self):
 
162
        foo = self.make_branch_and_tree('foo')
 
163
        bar = self.make_branch_and_tree('bar')
 
164
        self.build_tree(['foo/foo.txt', 'bar/bar.txt'])
 
165
        foo.add('foo.txt')
 
166
        bar.add('bar.txt')
 
167
        foo.commit(message='foo')
 
168
        bar.commit(message='bar')
 
169
        self.run_bzr('log -r branch:../bar', working_dir='foo')
 
170
        self.assertEqual([bar.branch.get_rev_id(1)],
 
171
                         [r.rev.revision_id
 
172
                          for r in self.get_captured_revisions()])
 
173
 
 
174
 
 
175
class TestLogExcludeCommonAncestry(TestLogWithLogCatcher):
 
176
 
 
177
    def test_exclude_common_ancestry_simple_revnos(self):
 
178
        self.make_linear_branch()
 
179
        self.assertLogRevnos(['-r1..3', '--exclude-common-ancestry'],
 
180
                             ['3', '2'])
 
181
 
161
182
 
162
183
class TestLogMergedLinearAncestry(TestLogWithLogCatcher):
163
184
 
167
188
        # stop calling run_bzr, there is no point) --vila 100118.
168
189
        builder = branchbuilder.BranchBuilder(self.get_transport())
169
190
        builder.start_series()
 
191
        # 1
 
192
        # | \
 
193
        # 2  1.1.1
 
194
        # | / |
 
195
        # 3  1.1.2
 
196
        # |   |
 
197
        # |  1.1.3
 
198
        # | / |
 
199
        # 4  1.1.4
 
200
        # | /
 
201
        # 5
 
202
 
170
203
        # mainline
171
204
        builder.build_snapshot('1', None, [
172
205
            ('add', ('', 'root-id', 'directory', ''))])