mirror of
https://github.com/facebook/sapling.git
synced 2024-10-05 14:28:17 +03:00
Add bubble id to FetchSnapshotResponse and store it on client for snapshot update
Summary: Added bubble id to FetchSnapshotResponse. Also updated hg client to store latest bubble information when updating snapshot. Reviewed By: yancouto Differential Revision: D34042287 fbshipit-source-id: 3c206caba4fa7b833cf1f8e23123b5b6006e2890
This commit is contained in:
parent
799801cf79
commit
63ba8c7d8d
@ -443,6 +443,7 @@ impl EdenApiHandler for FetchSnapshotHandler {
|
||||
))
|
||||
})
|
||||
.collect::<Result<_, Error>>()?,
|
||||
bubble_id: Some(bubble_id.into()),
|
||||
};
|
||||
Ok(stream::once(async move { Ok(response) }).boxed())
|
||||
}
|
||||
|
@ -144,5 +144,4 @@ def update(ui, repo, csid, clean=False):
|
||||
if wctx[path].isexec():
|
||||
wctx[path].setflags(l=False, x=False)
|
||||
|
||||
# TODO(yancouto): Also update bubble here, need to get it from server
|
||||
storelatest(repo.metalog(), csid, None)
|
||||
storelatest(repo.metalog(), csid, snapshot["bubble_id"])
|
||||
|
@ -519,6 +519,8 @@ pub struct FetchSnapshotResponse {
|
||||
pub time: i64,
|
||||
#[id(5)]
|
||||
pub tz: i32,
|
||||
#[id(6)]
|
||||
pub bubble_id: Option<NonZeroU64>,
|
||||
}
|
||||
|
||||
#[derive(Clone, Debug, Deserialize, Serialize, Eq, PartialEq)]
|
||||
@ -604,6 +606,7 @@ impl Arbitrary for FetchSnapshotResponse {
|
||||
tz: Arbitrary::arbitrary(g),
|
||||
hg_parents: Arbitrary::arbitrary(g),
|
||||
file_changes: Arbitrary::arbitrary(g),
|
||||
bubble_id: Arbitrary::arbitrary(g),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -3,4 +3,4 @@ source: commit.rs
|
||||
expression: "WireFetchSnapshotResponse::arbitrary(&mut g)"
|
||||
|
||||
---
|
||||
{"2":[["eunu/tbfkhej/l/av/rc",{"1":[{"1":{"1":{"5":[4,46,38,85,25,36,58,55,101,239,1,100,81,21,29,1,4,212,7,211,178,104,186,230,81,160,133,254,52,10,95,232]}},"2":{"1":[130,59,15]}},"1"]}]],"3":"","4":2786141136387072907,"5":1972664653}
|
||||
{"2":[["eunu/tbfkhej/l/av/rc",{"1":[{"1":{"1":{"5":[4,46,38,85,25,36,58,55,101,239,1,100,81,21,29,1,4,212,7,211,178,104,186,230,81,160,133,254,52,10,95,232]}},"2":{"1":[130,59,15]}},"1"]}]],"3":"","4":2786141136387072907,"5":1972664653,"6":170816030284369967}
|
||||
|
Loading…
Reference in New Issue
Block a user