~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

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

  • Committer: Martin Pool
  • Date: 2010-07-17 16:36:00 UTC
  • mfrom: (5050.3.9 2.2)
  • mto: (5050.3.10 2.2)
  • mto: This revision was merged to the branch mainline in revision 5365.
  • Revision ID: mbp@canonical.com-20100717163600-jaw27ncuhkhkz8sy
merge news from 2.2b4

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