~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/selftest/blackbox.py

  • Committer: Robert Collins
  • Date: 2005-10-17 23:13:00 UTC
  • mto: This revision was merged to the branch mainline in revision 1462.
  • Revision ID: robertc@robertcollins.net-20051017231300-e1c9e931bcfacd6a
Branch.open_containing now returns a tuple (Branch, relative-path).

This allows direct access to the common case of 'get me this file
from its branch'. (Robert Collins)

Show diffs side-by-side

added added

removed removed

Lines of Context:
821
821
        branch = Branch.open('to')
822
822
        self.assertEqual(1, len(branch.revision_history()))
823
823
 
 
824
    def test_log(self):
 
825
        self.build_tree(['branch/', 'branch/file'])
 
826
        branch = Branch.initialize('branch')
 
827
        branch.add(['file'])
 
828
        branch.commit('add file', rev_id='A')
 
829
        url = self.get_remote_url('branch/file')
 
830
        output = self.capture('log %s' % url)
 
831
        self.assertEqual(7, len(output.split('\n')))
 
832
        
 
833
 
 
834
 
824
835