Module cargo_update::ops

source ·
Expand description

Main functions doing actual work.

Use installed_registry_packages() to list the installed packages, then use intersect_packages() to confirm which ones should be updated, poll the packages’ latest versions by calling RegistryPackage::pull_version() on them, continue with doing whatever you wish.

Structs§

Enums§

  • A single operation to be executed upon configuration of a package.
  • One of elements with which to filter required packages.
  • Either an open git repository with a git registry, or a map of (package, sorted versions), populated by update_index()
  • A git tree corresponding to the latest revision of a git registry.

Functions§

  • Get the location of the registry index corresponding ot the given URL; if not present – make it and its parents.
  • Stolen from and equivalent to short_hash() from https://github.com/rust-lang/cargo/blob/74f2b400d2be43da798f99f94957d359bc223988/src/cargo/util/hex.rs
  • Parse the raw crate descriptor from the repository into a collection of Semvers.
  • Follow install.root in the config or config.toml file in the cargo directory specified.
  • Find the bare git repository in the specified directory for the specified crate
  • Find package data in the specified cargo git index tree.
  • Check if there’s a proxy specified to be used.
  • Get the URL to update index from, whether it’s “sparse”, and the cargo name for it from the config file parallel to the specified crates file
  • List the installed packages at the specified location that originate from a remote git repository.
  • List the installed packages at the specified location that originate from the a cargo registry.
  • Filter out the installed packages not specified to be updated and add the packages you specify to install, if they aren’t already installed via git.
  • Opens or initialises a git repository at registry, or returns a blank sparse registry.
  • Get FETCH_HEAD or origin/HEAD, then unwrap it to the tree it points to.
  • The short filesystem name for the repository, as used by cargo
  • Split and lower-case cargo-update into [ca, rg, cargo-update], jot into [3, j, jot], &c.
  • Update the specified index repository from the specified URL.