docs: def clone(cls, srcpath, destpath):
          """Copy a main repository to a new location."""
          try:
              os.makedirs(destpath)
          except OSError as e:
              if not e.errno == errno.EEXIST:
                  raise
          cmd = [SVNADMIN, 'dump', '--quiet', '.']
          dump = subprocess.Popen(
                 cmd, cwd=srcpath, stdout=subprocess.PIPE,
                 stderr=subprocess.PIPE,
          )
          repo = cls.create(destpath)
          repo.load(dump.stdout)
          stderr = dump.stderr.read()
          dump.stdout.close()
          dump.stderr.close()
          dump.wait()
          if dump.returncode != 0:
              raise subprocess.CalledProcessError(dump.returncode, cmd, stderr)
          return repo