def pull name, source, dest, kwargs={}
      packages = kwargs.arg :packages, []
      deps = kwargs.arg :deps, true
      remove = kwargs.arg :remove, true

      if packages.length == 0
        raise AptlyError.new "1 or more package names are required"
      end

      cmd = 'aptly snapshot pull'
      cmd += ' -no-deps' if !deps
      cmd += ' -no-remove' if !remove
      cmd += " #{name.quote} #{source.quote} #{dest.quote}"
      if !packages.empty?
        packages.each {|p| cmd += " #{p.quote}"}
      end

      Aptly::runcmd cmd
      Aptly::Snapshot.new dest
    end
def pull name, source, dest, kwargs={}
      packages = kwargs.arg :packages, []
      deps = kwargs.arg :deps, true
      remove = kwargs.arg :remove, true

      if packages.length == 0
        raise AptlyError.new "1 or more package names are required"
      end

      cmd = 'aptly snapshot pull'
      cmd += ' -no-deps' if !deps
      cmd += ' -no-remove' if !remove
      cmd += " #{name.quote} #{source.quote} #{dest.quote}"
      if !packages.empty?
        packages.each {|p| cmd += " #{p.quote}"}
      end

      Aptly::runcmd cmd
      Aptly::Snapshot.new dest
    end
Pull packages from a snapshot into another, creating a new snapshot.

  == Parameters:
 name::
   The name of the snapshot to pull to
 source::
   The repository containing the packages to pull in
 dest::
   The name for the new snapshot which will be created
 packages::
   An array of package names to search
 deps::
   When true, process dependencies
 remove::
   When true, removes package versions not found in source