Repository navigation
feat(workspaces): follow a moved change with origin pull
#104
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -82,7 +82,8 @@ impl<P: Platform> Session<'_, '_, P> { | |
| } | ||
| }; | ||
| let revision: Revision = self.store().get(head)?; | ||
| if self.has_landed(head, &revision)? { | ||
| let landing = self.store().landing(head, &revision)?; | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Check the target before reading the base target's log in
Only a revision based on an acceptance of Suggested fix
|
||
| if landing.is_some_and(|landing| landing.body().target == self.onto.id()) { | ||
| break; | ||
| } | ||
| let claims = self.annotations.claims(RecordId::Revision(head))?; | ||
|
|
@@ -108,30 +109,6 @@ impl<P: Platform> Session<'_, '_, P> { | |
| Ok(stack) | ||
| } | ||
|
|
||
| /// Whether the revision `id` landed on the target. A revision only lands on | ||
| /// the tip it is based on, so this checks the acceptance after that tip. | ||
| fn has_landed(&self, id: RevisionId, revision: &Revision) -> Result<bool, StoreError> { | ||
| let Base::Acceptance(base) = revision.base else { | ||
| return Ok(false); | ||
| }; | ||
| let base = self.store().get(base)?; | ||
| if base.body().target != self.onto.id() { | ||
| return Ok(false); | ||
| } | ||
| let Some(next) = self | ||
| .store() | ||
| .acceptance_at(&self.onto, base.body().seq + 1)? | ||
| else { | ||
| return Ok(false); | ||
| }; | ||
| Ok(self | ||
| .store() | ||
| .get(next)? | ||
| .body() | ||
| .landed | ||
| .contains(&Source::Revision(id))) | ||
| } | ||
|
|
||
| /// Rebases the revision `id` onto the tip and lands it, as part of the | ||
| /// landing of `stack`. If it has to wait, the queue keeps `stack` waiting. | ||
| pub(super) fn land_revision( | ||
|
|
||
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.
Distinguish text and binary conflicts in the pull instructions.
A binary conflict leaves one version in the working file, not both versions between markers. State that markers apply to text files, and direct users to the conflict list before they accept a binary file with
origin resolve.