Skip to content

Commit 0d783d4

Browse files
lmvasquezgfacebook-github-bot
authored andcommitted
easy: modern sync: cleanups
Summary: Tiny stupid things that annoy me Differential Revision: D68020138 Privacy Context Container: L1201105 fbshipit-source-id: f1bdb3c1f26c1d223b8bbf2c7e4e5092fad7ef52
1 parent 60cee29 commit 0d783d4

File tree

3 files changed

+10
-9
lines changed

3 files changed

+10
-9
lines changed

eden/mononoke/modern_sync/src/sync.rs

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -290,18 +290,18 @@ pub async fn process_one_changeset(
290290
sender: Arc<dyn ModernSyncSender + Send + Sync>,
291291
log_to_ods: bool,
292292
) -> Result<()> {
293-
info!(logger, "Processing commit {:?}", cs_id);
293+
info!(logger, "Processing changeset {:?}", cs_id);
294294

295295
let cs_info = repo
296296
.repo_derived_data()
297297
.derive::<ChangesetInfo>(ctx, cs_id.clone())
298298
.await?;
299299
let bs = cs_id.load(ctx, repo.repo_blobstore()).await?;
300-
let thing: Vec<_> = bs.file_changes().collect();
300+
let bs_fc: Vec<_> = bs.file_changes().collect();
301301

302302
let mut contents = Vec::new();
303303

304-
for (_path, file_change) in thing {
304+
for (_path, file_change) in bs_fc {
305305
let cid = match file_change {
306306
FileChange::Change(change) => Some(change.content_id()),
307307
FileChange::UntrackedChange(change) => Some(change.content_id()),
@@ -332,6 +332,7 @@ pub async fn process_one_changeset(
332332
let (mut mf_ids, file_ids) =
333333
sort_manifest_changes(ctx, repo.repo_blobstore(), hg_mf_id, mf_ids_p).await?;
334334
mf_ids.push(hg_mf_id);
335+
335336
sender.upload_trees(mf_ids).await?;
336337
sender.upload_filenodes(file_ids).await?;
337338
sender.upload_identical_changeset(vec![(hg_cs, bs)]).await?;

eden/mononoke/tests/integration/modern_sync/test-modern-sync.t

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -60,32 +60,32 @@ Sync all bookmarks moves
6060
Running sync-once loop
6161
Connecting to https://localhost:$LOCAL_PORT/edenapi/
6262
Health check outcome: Ok(ResponseMeta { version: HTTP/2.0, status: 200, server: Some("edenapi_server"), request_id: Some("*"), tw_task_handle: None, tw_task_version: None, tw_canary_id: None, server_load: Some(1), content_length: Some(10), content_encoding: None, mononoke_host: Some("*") }) (glob)
63-
Processing commit ChangesetId(Blake2(53b034a90fe3002a707a7da9cdf6eac3dea460ad72f7c6969dfb88fd0e69f856))
63+
Processing changeset ChangesetId(Blake2(53b034a90fe3002a707a7da9cdf6eac3dea460ad72f7c6969dfb88fd0e69f856))
6464
Uploading contents: [ContentId(ContentId("eb56488e97bb4cf5eb17f05357b80108a4a71f6c3bab52dfcaec07161d105ec9")), ContentId(ContentId("be87911855af0fc33a75f2c1cba2269dd90faa7f5c5358eb640d9d65f55fced3"))]
6565
Uploaded 2 contents successfully
6666
Uploaded 3 trees successfully
6767
Uploaded 2 filenodes successfully
6868
Upload hg changeset response: [UploadTokensResponse { token: UploadToken { data: UploadTokenData { id: HgChangesetId(HgId("e20237022b1290d98c3f14049931a8f498c18c53")), bubble_id: None, metadata: None }, signature: UploadTokenSignature { signature: [102, 97, 107, 101, 116, 111, 107, 101, 110, 115, 105, 103, 110, 97, 116, 117, 114, 101] } } }]
6969
Move bookmark response SetBookmarkResponse { data: Ok(()) }
70-
Processing commit ChangesetId(Blake2(8a9d572a899acdef764b88671c24b94a8b0780c1591a5a9bca97184c2ef0f304))
70+
Processing changeset ChangesetId(Blake2(8a9d572a899acdef764b88671c24b94a8b0780c1591a5a9bca97184c2ef0f304))
7171
Uploading contents: [ContentId(ContentId("55662471e2a28db8257939b2f9a2d24e65b46a758bac12914a58f17dcde6905f")), ContentId(ContentId("fbc4b9b407225e86008840c4095edb4f66a62bad80529b6e120bfa7d605f9423"))]
7272
Uploaded 2 contents successfully
7373
Uploaded 3 trees successfully
7474
Uploaded 2 filenodes successfully
7575
Upload hg changeset response: [UploadTokensResponse { token: UploadToken { data: UploadTokenData { id: HgChangesetId(HgId("5a95ef0f59a992dcb5385649217862599de05565")), bubble_id: None, metadata: None }, signature: UploadTokenSignature { signature: [102, 97, 107, 101, 116, 111, 107, 101, 110, 115, 105, 103, 110, 97, 116, 117, 114, 101] } } }]
76-
Processing commit ChangesetId(Blake2(41deea4804cd27d1f4efbec135d839338804a5dfcaf364863bd0289067644db5))
76+
Processing changeset ChangesetId(Blake2(41deea4804cd27d1f4efbec135d839338804a5dfcaf364863bd0289067644db5))
7777
Uploading contents: [ContentId(ContentId("896ad5879a5df0403bfc93fc96507ad9c93b31b11f3d0fa05445da7918241e5d")), ContentId(ContentId("c86e7a7ee4c102efc1e5166dd95c1c73fcbff59dc3b04dc79fbbf3d1d10350ed"))]
7878
Uploaded 2 contents successfully
7979
Uploaded 3 trees successfully
8080
Uploaded 2 filenodes successfully
8181
Upload hg changeset response: [UploadTokensResponse { token: UploadToken { data: UploadTokenData { id: HgChangesetId(HgId("fc03e5f3125836eb107f2fa5b070f841d0b62b85")), bubble_id: None, metadata: None }, signature: UploadTokenSignature { signature: [102, 97, 107, 101, 116, 111, 107, 101, 110, 115, 105, 103, 110, 97, 116, 117, 114, 101] } } }]
82-
Processing commit ChangesetId(Blake2(ba1a2b3ca64cead35117cb2b707da1211cf43639ade917aee655f3875f4922c3))
82+
Processing changeset ChangesetId(Blake2(ba1a2b3ca64cead35117cb2b707da1211cf43639ade917aee655f3875f4922c3))
8383
Uploading contents: [ContentId(ContentId("90c8e211c758a9bbcd33e463c174f1693692677cb76c7aaf4ce41aa0a29334c0")), ContentId(ContentId("5d3bfab620332130430c7f540f9fe0b3b0079d0b9b632e0dae96a1424a7a4242"))]
8484
Uploaded 2 contents successfully
8585
Uploaded 3 trees successfully
8686
Uploaded 2 filenodes successfully
8787
Upload hg changeset response: [UploadTokensResponse { token: UploadToken { data: UploadTokenData { id: HgChangesetId(HgId("2571175c538cc794dc974c705fcb12bc848efab4")), bubble_id: None, metadata: None }, signature: UploadTokenSignature { signature: [102, 97, 107, 101, 116, 111, 107, 101, 110, 115, 105, 103, 110, 97, 116, 117, 114, 101] } } }]
88-
Processing commit ChangesetId(Blake2(5b1c7130dde8e54b4285b9153d8e56d69fbf4ae685eaf9e9766cc409861995f8))
88+
Processing changeset ChangesetId(Blake2(5b1c7130dde8e54b4285b9153d8e56d69fbf4ae685eaf9e9766cc409861995f8))
8989
Uploading contents: [ContentId(ContentId("1b1e26f01a806e123b37492672d2756e1c25bb31f1e15cfda410c149c317e130")), ContentId(ContentId("96475ef07b63bf02679e9964ff65f0f96883f53d0718671bd44cce830bbf2ebd"))]
9090
Uploaded 2 contents successfully
9191
Uploaded 3 trees successfully

eden/mononoke/tests/integration/modern_sync/test-sync-one.t

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@
5757
$ with_stripped_logs mononoke_modern_sync sync-one orig dest --cs-id 53b034a90fe3002a707a7da9cdf6eac3dea460ad72f7c6969dfb88fd0e69f856
5858
Connecting to https://localhost:$LOCAL_PORT/edenapi/
5959
Health check outcome: Ok(ResponseMeta { version: HTTP/2.0, status: 200, server: Some("edenapi_server"), request_id: Some("*"), tw_task_handle: None, tw_task_version: None, tw_canary_id: None, server_load: Some(1), content_length: Some(10), content_encoding: None, mononoke_host: Some("*") }) (glob)
60-
Processing commit ChangesetId(Blake2(53b034a90fe3002a707a7da9cdf6eac3dea460ad72f7c6969dfb88fd0e69f856))
60+
Processing changeset ChangesetId(Blake2(53b034a90fe3002a707a7da9cdf6eac3dea460ad72f7c6969dfb88fd0e69f856))
6161
Uploading contents: [ContentId(ContentId("eb56488e97bb4cf5eb17f05357b80108a4a71f6c3bab52dfcaec07161d105ec9")), ContentId(ContentId("be87911855af0fc33a75f2c1cba2269dd90faa7f5c5358eb640d9d65f55fced3"))]
6262
Uploaded 2 contents successfully
6363
Uploaded 3 trees successfully

0 commit comments

Comments
 (0)