-
Notifications
You must be signed in to change notification settings - Fork 2.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[vcs] cargo new --vcs fossil
changes global settings for fossil-scm.
#9449
Comments
Yea, it seems like it would make sense to have those be repository settings. I don't use fossil, but it sounds reasonable to me to change it. |
@yasuoohno #9469 hopefully fixed this part of the code. If you have a bit of time to try this out when it lands on nightly, I would love to hear some feedback! |
Update cargo 8 commits in e51522ab3db23b0d8f1de54eb1f0113924896331..070e459c2d8b79c5b2ac5218064e7603329c92ae 2021-05-07 21:29:52 +0000 to 2021-05-11 18:12:23 +0000 - Fix rustdoc warnings (rust-lang/cargo#9468) - Improve performance of git status check in `cargo package`. (rust-lang/cargo#9478) - Link to the new rustc tests chapter. (rust-lang/cargo#9477) - Bump index cache version to deal with semver metadata version mismatch. (rust-lang/cargo#9476) - Fix Url::into_string deprecation warning (rust-lang/cargo#9475) - Fix rust-lang/cargo#4482 and rust-lang/cargo#9449: set Fossil ignore and clean settings locally (rust-lang/cargo#9469) - Improve two error messages (rust-lang/cargo#9472) - Fix `cargo install` with a semver metadata version. (rust-lang/cargo#9467)
Hi @PaulDance, Thank you for the fix. I'll try this and give you some feedback when I have time. |
I confirmed with cargo 1.54.0-nightly. # the global settings are unchanged :-)
$ fossil settings ignore-glob --global
ignore-glob
$ fossil settings clean-glob --global
clean-glob
# and local settings are versionable
$ fossil settings ignore-glob
ignore-glob
(overridden by contents of file .fossil-settings/ignore-glob)
$ fossil settings clean-glob
clean-glob
(overridden by contents of file .fossil-settings/clean-glob)
$ cat .fossil-settings/ignore-glob
target
$ cat .fossil-settings/clean-glob
target Thanks! |
@yasuoohno Cool, glad to hear it works as expected! |
Problem
cargo new --vcs fossil
changes global ignore-glob/clean-glob settings for fossil-scm instead of repository local settings.It will also affect other fossil-scm working copies.
Steps
cargo new project_name --vcs fossil
Possible Solution(s)
https://github.com/rust-lang/cargo/blob/master/src/cargo/util/vcs.rs#L99-L111
It seems that cargo executes
fossil settings
on the current working directory for cargo.If it has to change the local settings of the repository, we need to do it in the project working directory.
just like this?
But it is unversioned settings.
I think it would be better using versioned setting files in the project working directory.
.fossil-settings/ignore-glob
and.fossil-settings/clean-glob
files.fossil add .fossil-settings/ignore-glob .fossil-settings/clean-glob
Notes
Output of
cargo version
:cargo 1.51.0 (43b129a 2021-03-16)
output of
rustup show
:Default host: x86_64-pc-windows-msvc
stable-x86_64-pc-windows-msvc (default)
rustc 1.51.0 (2fd73fabe 2021-03-23)
Output of
fossil version
:This is fossil version 2.15.1 [2f901f98b3] 2021-04-08 01:05:44 UTC
The text was updated successfully, but these errors were encountered: