def copy from_repo, to_repo, kwargs={}
      deps = kwargs.arg :deps, false
      packages = kwargs.arg :packages, []

      if packages.length == 0
        raise AptlyError.new '1 or more packages are required'
      end

      cmd = 'aptly repo copy'
      cmd += ' -with-deps' if deps
      cmd += " #{from_repo.quote} #{to_repo.quote}"
      packages.each {|p| cmd += " #{p.quote}"}

      Aptly::runcmd cmd
    end
def copy from_repo, to_repo, kwargs={}
      deps = kwargs.arg :deps, false
      packages = kwargs.arg :packages, []

      if packages.length == 0
        raise AptlyError.new '1 or more packages are required'
      end

      cmd = 'aptly repo copy'
      cmd += ' -with-deps' if deps
      cmd += " #{from_repo.quote} #{to_repo.quote}"
      packages.each {|p| cmd += " #{p.quote}"}

      Aptly::runcmd cmd
    end
Copy package resources from one repository to another

 == Parameters:
 from_repo::
   The source repository name
 to_repo::
   The destination repository name
 packages::
   A list of debian pkg_spec strings
 deps::
   When true, follow deps and copy them