Commit Graph

23 Commits

Author SHA1 Message Date
Eric Huss 888100352a Move ProcessBuilder to cargo-util. 2021-03-20 15:19:03 -07:00
Patrick More d27170e75f Modified the fossil repo initialization function to run the commands to
set the target directory as ignoreable and cleanable.
2020-09-01 11:56:36 -07:00
Alex Tokarev 45ad3f9986 Remove unused imports 2020-02-20 23:58:10 +03:00
Alex Crichton 5102de2b7d Improve error messages on mkdir failure
This commit ensures that `fs::create_dir*` isn't called throughout Cargo
and is instead routed through our own wrapper `paths::create_dir_all`
which brings with it a few benefits:

* Gracefully handles when the directory already exists (which is the
  behavior we always want anyway)
* Includes the path name in the error message of what failed
* Handles races of creating a directory by default

Closes #7304
2019-08-27 13:52:15 -07:00
Eric Huss 00c562df56 Allow `cargo fix` if gitignore matches root working dir. 2019-03-20 12:22:44 -07:00
Alex Crichton fecb724643 Format with `cargo fmt` 2018-12-08 03:19:47 -08:00
Dale Wijnand 04ddd4d0fc
Upgrade to Rust 2018 2018-12-06 20:18:35 +01:00
Zach Lute 3492a3905c Replace 'project' with 'package' in many strings and comments. 2018-09-20 23:47:09 -07:00
Dale Wijnand eea58f205f
Move existing_vcs_repo to the util::vcs module
Rather than being in cargo_new publically exposed and used by cargo fix.
2018-07-26 22:09:45 +01:00
Dale Wijnand 36cd1c3219
Fix HgRepo::discover
Replace the duplicate .cwd call with an invocation taken from
https://stackoverflow.com/a/3138925/463761

Match the semantics of the other vcs calls, which is invoke from 'cwd'
targeting 'path'. Looks a little confusing because hg takes a '--cwd'
argument.
2018-07-26 08:52:07 +01:00
Alex Crichton 1e6828485e cargo fmt 2018-03-14 17:48:23 -07:00
David King 7eca7f271d Add fossil VCS support to `cargo new`
Fossil is a simple, high-reliability, distributed software configuration
management system <https://www.fossil-scm.org/>
2017-06-09 18:03:28 -07:00
Paul Woolcock 2b31978cc7 Add Pijul support to cargo
[Pijul](https://pijul.org) is a version control system written in Rust. This commit adds the ability to create a cargo project using pijul as the vcs for the project.

To use it, run `cargo new my-awesome-project --vcs=pijul`
2017-03-31 14:22:04 -04:00
Sascha Grunert 82655b461f Changed try! macros to ? operator
Since the stabilization of the ? operator (release 1.13.0)
the ? operator should be used to use idiomatic Rust.
2016-11-11 14:25:20 +01:00
mcarton 3a852a0f2a Remove useless returns
Fix most of Clippy’s needless_return warnings. Remaining cases are
false positives.
2016-01-16 12:42:56 +01:00
Marvin Löbel 6abca78af4 Made cwd setting in process builder optional 2015-10-28 12:15:37 +01:00
Marvin Löbel 09d62a6525 Made cargo derive more working directory locations from its Config 2015-10-28 12:15:37 +01:00
Alex Crichton a6dad62221 Update to rust master and std::{io, path} 2015-02-27 15:34:13 -08:00
Wesley Wiser 16d3e72a8f git option in config should be an enumeration
The option in ~/.cargo/config is now called `vcs` and has the following
options: "git", "hg", and "none". This corresponds to the options for
the --vcs argument to `cargo new`.

This also fixes detection for hg repositories. Previously, we only tried
to discover if the working directory was contained in a git repository.
If it was, we would skip creating a git repo. Now, we check if the
working directory is contained in either a git or mecurial repo. If it
is, we skip creating a new repo.

Fixes #1116
2015-01-05 21:04:06 -05:00
Alex Crichton bc96e116dc Bump rustc version 2014-12-11 20:20:29 -08:00
Jakub Bukaj df9cf06663 Update to newest Rust 2014-11-23 17:02:45 -05:00
Paul Woolcock 6c20085429 cargo new: Don't create a git repo in subdirectory
Running `cargo new` to create a subpackage shouldn't create another
git repository if one exists in a parent directory.

Closes #664
2014-10-24 14:34:11 -04:00
Mark J. Berger 021f70afac Create hg repo with --hg flag on cargo new 2014-09-14 20:06:32 -07:00