mirror of
https://github.com/facebook/sapling.git
synced 2024-10-10 08:47:12 +03:00
mononoke: dump pretty json when changing xrepo mapping
Summary: It makes it more readable Reviewed By: ikostia Differential Revision: D26100720 fbshipit-source-id: 7f9b37f1e3e9f4a476e89ff59740004070d066f9
This commit is contained in:
parent
339788a95e
commit
5eedbf488b
@ -794,7 +794,7 @@ async fn create_file_changes(
|
||||
}
|
||||
map.insert("overrides".to_string(), map_overrides.into());
|
||||
|
||||
let content = (get_generated_string() + &serde_json::to_string(&map)?).into_bytes();
|
||||
let content = (get_generated_string() + &serde_json::to_string_pretty(&map)?).into_bytes();
|
||||
let content = bytes::Bytes::from(content);
|
||||
let size = content.len() as u64;
|
||||
let content_metadata = filestore::store(
|
||||
|
@ -88,8 +88,13 @@ After the change
|
||||
$ hg ci -Aqm "after config change"
|
||||
$ REPONAME=small-mon hgmn push -r . --to master_bookmark -q
|
||||
$ cat mapping.json
|
||||
@generated by the megarepo bind, reach out to Source Control @ FB with any questions
|
||||
{"default_prefix":"smallrepofolder_after","overrides":{"non_path_shifting":"non_path_shifting"}} (no-eol)
|
||||
*generated by the megarepo bind, reach out to Source Control @ FB with any questions (glob)
|
||||
{
|
||||
"default_prefix": "smallrepofolder_after",
|
||||
"overrides": {
|
||||
"non_path_shifting": "non_path_shifting"
|
||||
}
|
||||
} (no-eol)
|
||||
$ log -r master_bookmark
|
||||
@ after config change [public;rev=4;*] default/master_bookmark (glob)
|
||||
│
|
||||
@ -113,5 +118,10 @@ After the change
|
||||
smallrepofolder_after/boo
|
||||
-- check mapping
|
||||
$ cat smallrepofolder_after/mapping.json
|
||||
@generated by the megarepo bind, reach out to Source Control @ FB with any questions
|
||||
{"default_prefix":"smallrepofolder_after","overrides":{"non_path_shifting":"non_path_shifting"}} (no-eol)
|
||||
*generated by the megarepo bind, reach out to Source Control @ FB with any questions (glob)
|
||||
{
|
||||
"default_prefix": "smallrepofolder_after",
|
||||
"overrides": {
|
||||
"non_path_shifting": "non_path_shifting"
|
||||
}
|
||||
} (no-eol)
|
||||
|
Loading…
Reference in New Issue
Block a user