~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

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

  • Committer: Canonical.com Patch Queue Manager
  • Date: 2010-09-01 08:02:42 UTC
  • mfrom: (5390.3.3 faster-revert-593560)
  • Revision ID: pqm@pqm.ubuntu.com-20100901080242-esg62ody4frwmy66
(spiv) Avoid repeatedly calling self.target.all_file_ids() in
 InterTree.iter_changes. (Andrew Bennetts)

Show diffs side-by-side

added added

removed removed

Lines of Context:
22
22
import sys
23
23
 
24
24
from bzrlib import (
 
25
    bzrdir,
25
26
    osutils,
26
27
    ignores,
27
28
    msgeditor,
757
758
        osutils.set_or_unset_env('BZR_EMAIL', None)
758
759
        out, err = self.run_bzr(['commit', '-m', 'initial'], 3)
759
760
        self.assertContainsRe(err, 'Unable to determine your name')
 
761
 
 
762
    def test_commit_recursive_checkout(self):
 
763
        """Ensure that a commit to a recursive checkout fails cleanly.
 
764
        """
 
765
        self.run_bzr(['init', 'test_branch'])
 
766
        self.run_bzr(['checkout', 'test_branch', 'test_checkout'])
 
767
        os.chdir('test_checkout')
 
768
        self.run_bzr(['bind', '.']) # bind to self
 
769
        open('foo.txt', 'w').write('hello')
 
770
        self.run_bzr(['add'])
 
771
        out, err = self.run_bzr(['commit', '-m', 'addedfoo'], 3)
 
772
        self.assertEqual(out, '')
 
773
        self.assertContainsRe(err,
 
774
            'Branch.*test_checkout.*appears to be bound to itself')
 
775