~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

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

  • Committer: Neil Martinsen-Burrell
  • Date: 2010-01-28 15:19:45 UTC
  • mto: (5003.1.1 integration)
  • mto: This revision was merged to the branch mainline in revision 5004.
  • Revision ID: nmb@wartburg.edu-20100128151945-m7b8g17wpa5sjn7n
better error message for bzr bind on and already bound branch

Show diffs side-by-side

added added

removed removed

Lines of Context:
420
420
        # both the local and master should have been updated.
421
421
        self.check_revno(4)
422
422
        self.check_revno(4, '../base')
 
423
 
 
424
 
 
425
from bzrlib.tests import script
 
426
class TestBind(script.TestCaseWithTransportAndScript):
 
427
 
 
428
    def test_bind_when_bound(self):
 
429
        self.run_script("""
 
430
$ bzr init trunk
 
431
$ bzr init copy
 
432
$ cd copy
 
433
$ bzr bind ../trunk
 
434
$ bzr bind
 
435
2>bzr: ERROR: Branch is already bound
 
436
""")
 
437
 
 
438
    def test_bind_before_bound(self):
 
439
        self.run_script("""
 
440
$ bzr init trunk
 
441
$ cd trunk
 
442
$ bzr bind
 
443
2>bzr: ERROR: No location supplied and no previous location known
 
444
""")