-
Notifications
You must be signed in to change notification settings - Fork 39
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
replication: create rad/id and rad/self symref #709
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think that this should‘ve worked without this patch, but whatever....
a125d37
to
723a08b
Compare
`get_user` should return `Person`, and we add `get_local` which gets a `LocalIdentity`. Signed-off-by: Fintan Halpenny <[email protected]>
723a08b
to
39cd7fb
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
utACK
🗾 ♻️ 🍮 ⛳️
librad/src/git/replication.rs
Outdated
fn adopt_rad_self(storage: &Storage, urn: &Urn, peer: PeerId) -> Result<(), Error> { | ||
let rad_self = Reference::rad_self(Namespace::from(urn), peer); | ||
|
||
// We only need to crate the rad/id there's a rad/self |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
// We only need to crate the rad/id there's a rad/self | |
// We only need to create the rad/id there's a rad/self |
Before this patch a `rad/self` would be replicated, however, there would be no corresponding `rad/id` at the top-level. This patch introduces the adding of the `rad/id` and creating a symbolic ref between `rad/id` and `rad/self` for each tracked peer. Signed-off-by: Fintan Halpenny <[email protected]>
39cd7fb
to
a98218d
Compare
Fixes #708
We add
rad/id
at the top level and create a symbolic ref betweenrad/id
andrad/self
for each tracked peer.In the
daemon
code I changed theget_user
function to return a regularPerson
document and addedget_local
for getting the local identity.I chose to add the test to
daemon/replication
because I thought it would have fitted with themenage
tests but they're no bueno right now.