1486
1486
assert history == self._lefthand_history(history[-1])
1487
1487
self.set_last_revision(history[-1])
1490
def set_parent(self, url):
1491
"""Set the parent branch"""
1492
if isinstance(url, unicode):
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")
1500
url = urlutils.relative_url(self.base, url)
1501
self.get_config().set_user_option('parent_location', url)
1504
def get_parent(self):
1505
"""Set the parent branch"""
1506
return self.get_config().get_user_option('parent_location')
1508
def set_push_location(self, location):
1509
"""See Branch.set_push_location."""
1510
self.get_config().set_user_option('push_location', location)
1512
def set_bound_location(self, location):
1513
"""See Branch.set_push_location."""
1514
self.get_config().set_user_option('bound_location', location)
1516
def get_bound_location(self):
1517
"""See Branch.set_push_location."""
1518
return self.get_config().get_user_option('bound_location')
1490
1521
class BranchTestProviderAdapter(object):
1491
1522
"""A tool to generate a suite testing multiple branch formats at once.