/brz/remove-bazaar

To get this branch, use:
bzr branch http://gegoxaren.bato24.eu/bzr/brz/remove-bazaar

« back to all changes in this revision

Viewing changes to bzrlib/branch.py

  • Committer: Aaron Bentley
  • Date: 2007-01-12 21:39:24 UTC
  • mto: (2230.3.47 branch6)
  • mto: This revision was merged to the branch mainline in revision 2290.
  • Revision ID: abentley@panoramicfeedback.com-20070112213924-t9fm7x7foi5uqa83
Add more config testing

Show diffs side-by-side

added added

removed removed

Lines of Context:
1486
1486
            assert history == self._lefthand_history(history[-1])
1487
1487
            self.set_last_revision(history[-1])
1488
1488
 
 
1489
    @needs_write_lock
 
1490
    def set_parent(self, url):
 
1491
        """Set the parent branch"""
 
1492
        if isinstance(url, unicode):
 
1493
            try: 
 
1494
                url = url.encode('ascii')
 
1495
            except UnicodeEncodeError:
 
1496
                raise bzrlib.errors.InvalidURL(url,
 
1497
                    "Urls must be 7-bit ascii, "
 
1498
                    "use bzrlib.urlutils.escape")
 
1499
                
 
1500
        url = urlutils.relative_url(self.base, url)
 
1501
        self.get_config().set_user_option('parent_location', url)
 
1502
 
 
1503
    @needs_read_lock
 
1504
    def get_parent(self):
 
1505
        """Set the parent branch"""
 
1506
        return self.get_config().get_user_option('parent_location')
 
1507
 
 
1508
    def set_push_location(self, location):
 
1509
        """See Branch.set_push_location."""
 
1510
        self.get_config().set_user_option('push_location', location)
 
1511
 
 
1512
    def set_bound_location(self, location):
 
1513
        """See Branch.set_push_location."""
 
1514
        self.get_config().set_user_option('bound_location', location)
 
1515
 
 
1516
    def get_bound_location(self):
 
1517
        """See Branch.set_push_location."""
 
1518
        return self.get_config().get_user_option('bound_location')
 
1519
 
1489
1520
 
1490
1521
class BranchTestProviderAdapter(object):
1491
1522
    """A tool to generate a suite testing multiple branch formats at once.