Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upLoad prefs.json from profile-dir if --profile-dir is specified at launch #10114
Conversation
highfive
commented
Mar 22, 2016
|
Thanks for the pull request, and welcome! The Servo team is excited to review your changes, and you should hear from @jdm (or someone else) soon. |
50d9d9b
to
aa48a40
|
follow up: #10338 |
| extend_prefs(prefs); | ||
| } | ||
| } else { | ||
| println!("Error opening prefs.json from profile_dir"); |
This comment has been minimized.
This comment has been minimized.
|
Looks good to me overall, minor nit |
|
I updated it to write to stderr. I'm not sure if I did it right; I just googled and used the first example. |
|
Looks good. Do you want to squash any commits? |
|
Should I? I could probably squash the first 2 together and second two together. |
|
That sounds good. |
|
Squash'd |
|
@bors-servo r+ thanks! |
|
|
Load prefs.json from profile-dir if --profile-dir is specified at launch In response to #10098 Tries to load `prefs.json` from the profile-dir and merge them into the preferences if `--profile-dir` is specified at launch. The profile-dir preferences take precedence over the default preferences, but command line preferences still take precedence over everything. Also adds some tests for `prefs.rs`. These rely on the contents of `resources/prefs.json` (at least `test_get_set_reset_extend()` does), so they may need to be re-worked a bit. <!-- Reviewable:start --> --- This change is [<img src="https://reviewable.io/review_button.svg" height="35" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/10114) <!-- Reviewable:end -->
|
|
Load prefs.json from profile-dir if --profile-dir is specified at launch In response to #10098 Tries to load `prefs.json` from the profile-dir and merge them into the preferences if `--profile-dir` is specified at launch. The profile-dir preferences take precedence over the default preferences, but command line preferences still take precedence over everything. Also adds some tests for `prefs.rs`. These rely on the contents of `resources/prefs.json` (at least `test_get_set_reset_extend()` does), so they may need to be re-worked a bit. <!-- Reviewable:start --> --- This change is [<img src="https://reviewable.io/review_button.svg" height="35" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/10114) <!-- Reviewable:end -->
|
|
matthewbentley commentedMar 22, 2016
In response to #10098
Tries to load
prefs.jsonfrom the profile-dir and merge them into the preferences if--profile-diris specified at launch. The profile-dir preferences take precedence over the default preferences, but command line preferences still take precedence over everything.Also adds some tests for
prefs.rs. These rely on the contents ofresources/prefs.json(at leasttest_get_set_reset_extend()does), so they may need to be re-worked a bit.This change is