~ubuntu-branches/debian/lenny/bzr/lenny

« back to all changes in this revision

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

  • Committer: Bazaar Package Importer
  • Author(s): Thomas Viehmann
  • Date: 2008-08-22 20:06:37 UTC
  • mfrom: (3.1.63 intrepid)
  • Revision ID: james.westby@ubuntu.com-20080822200637-kxobfsnjlzojhqra
Tags: 1.5-1.1
* Non-maintainer upload.
* Apply patch from upstream VCS to fix FTBFS in tools/rst2html.py
  with older docutils. Thanks to Olivier Tétard for digging it
  up.
  Closes: #494246.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
# Copyright (C) 2006, Michael Ellerman
 
1
# Copyright (C) 2006 Canonical Ltd
2
2
#
3
3
# This program is free software; you can redistribute it and/or modify
4
4
# it under the terms of the GNU General Public License as published by
34
34
        return tree
35
35
 
36
36
    def _check_revision_history(self, location=''):
37
 
        rh = self.capture('revision-history ' + location)
 
37
        rh = self.run_bzr(['revision-history', location])[0]
38
38
        self.assertEqual(rh, 'revision_1\nrevision_2\nrevision_3\n')
39
39
 
40
40
    def test_revision_history(self):
52
52
        """Tests 'revision_history' command with a location that is a
53
53
        repository branch."""
54
54
        self._build_branch()
55
 
        self.run_bzr('init-repo', 'repo')
56
 
        self.run_bzr('branch', 'test', 'repo/test')
 
55
        self.run_bzr('init-repo repo')
 
56
        self.run_bzr('branch test repo/test')
57
57
        self._check_revision_history('repo/test')
58
58
 
59
59
    def test_revision_history_with_checkout(self):
60
60
        """Tests 'revision_history' command with a location that is a
61
61
        checkout of a repository branch."""
62
62
        self._build_branch()
63
 
        self.run_bzr('init-repo', 'repo')
64
 
        self.run_bzr('branch', 'test', 'repo/test')
65
 
        self.run_bzr('checkout', 'repo/test', 'test-checkout')
 
63
        self.run_bzr('init-repo repo')
 
64
        self.run_bzr('branch test repo/test')
 
65
        self.run_bzr('checkout repo/test test-checkout')
66
66
        self._check_revision_history('test-checkout')
67
67
 
68
68
    def test_revision_history_with_lightweight_checkout(self):
69
69
        """Tests 'revision_history' command with a location that is a
70
70
        lightweight checkout of a repository branch."""
71
71
        self._build_branch()
72
 
        self.run_bzr('init-repo', 'repo')
73
 
        self.run_bzr('branch', 'test', 'repo/test')
74
 
        self.run_bzr('checkout', '--lightweight', 'repo/test', 'test-checkout')
 
72
        self.run_bzr('init-repo repo')
 
73
        self.run_bzr('branch test repo/test')
 
74
        self.run_bzr('checkout --lightweight repo/test test-checkout')
75
75
        self._check_revision_history('test-checkout')