'Export the Bazaar repository at the url to the destination location'

def export(self, location):

    temp_dir = tempfile.mkdtemp('-export', 'pip-')
    self.unpack(temp_dir)
    if os.path.exists(location):
        rmtree(location)
    try:
        call_subprocess([self.cmd, 'export', location], cwd=temp_dir, filter_stdout=self._filter, show_stdout=False)
    finally:
        rmtree(temp_dir)
