rhq-core

Crates.iorhq-core
lib.rsrhq-core
version0.3.0
sourcesrc
created_at2017-10-14 10:29:11.899929
updated_at2017-10-18 10:42:18.528572
descriptionCore library for rhq
homepagehttps://github.com/ubnt-intrepid/rhq
repositoryhttps://github.com/ubnt-intrepid/rhq.git
max_upload_size
id35596
size35,728
Yusuke Sasaki (ubnt-intrepid)

documentation

https://docs.rs/rhq

README

rhq - Manages your local repositories

License: MIT Build Status Build status Gitter

Japanese

rhq is a repository management tool, written in Rust. rhq provides a way to create/manage local repositories of decentrized version control systems (DVCSs).

Currently, only Git, Mercurial, Darcs and Pijul are supported.

Installation

You can download prebuilt binaries from GitHub releases page.

If you have already installed Rust toolchain, You can build itself manually by using cargo, as follows:

# from crates.io
$ cargo install rhq
# from GitHub
$ cargo install --git https://github.com/ubnt-intrepid/rhq.git

Usage

See command line help for details.

Clone Repository

To clone remote repository, use rhq clone. Roughly speaking, this command can be used as commands like git clone. For example, the command cloning this project is as follows:

$ rhq clone ubnt-intrepid/rhq

The first argument of rhq clone is a string which specify the remote repository. Available patterns are:

  • URL - https://github.com/ubnt-intrepid/rhq.git
  • SCP - git@github.com:ubnt-intrepid/rhq.git
  • Relative path - ubnt-intrepid/rhq
    The host is fixed to github.com.

The second argument is target directory of cloned repository. If it is omitted, the location of cloned repository are determined from URL of remote repository, as follows:

~/.rhq/
  `- github.com/
     `- ubnt-intrepid/
        `- rhq/

Add existed repositories into management

For adding existed repositories into management, the command rhq add is provided. For example, your "dotfiles" repository can be add as follows:

$ rhq add ~/.dotfiles

By default, all arguments should be given as "absolute" path of added repository. You can change this behavior by using an option --import, to find repositories from subdirectories of given paths.

For example, if you want to add all repositories cloned by Go toolchain:

$ rhq add --import $GOPATH/src

Display and Manage Repositories

The list of managed repositories are saved to cache file. If you want to list them, use rhq list as follows:

$ rhq list

To refresh information of managed repositories, use rhq refresh:

$ rhq refresh

Configuration

The behaviour of rhq can change by using configuration files. Configuration file is located at ~/.config/rhq/config.toml.

The example of configuration file is as follows:

# The path of root directory to put in local repositories.
# The default value is `~/.rhq`.
root = "/path/to/repos"  

# Entry for lookup local repositories.
includes = [
  "~/go/src",
  "~/.vim/plugged",
  "~/.dotfiles"
]

# 
excludes = [
  "**/temp/*"
]

Plugins

Visual Studio Code

The owner of rhq also manages extension for Visual Studio Code.
See here for details.

Similar projects

Commit count: 241

cargo fmt