Skip to content

Commit 6d447bb

Browse files
authored
fix(revset): support builtin immutable-head aliases (#61)
1 parent cb1d329 commit 6d447bb

25 files changed

Lines changed: 526 additions & 360 deletions

crates/jayjay-core/src/dag.rs

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -116,17 +116,15 @@ fn assign_lane(
116116
#[cfg(test)]
117117
mod tests {
118118
use super::*;
119-
use crate::types::{ChangeInfo, GraphEdge};
119+
use crate::types::{ChangeInfo, CommitAuthor, GraphEdge};
120120

121121
fn entry(commit_id: &str, parents: &[&str]) -> GraphEntry {
122122
GraphEntry {
123123
change: ChangeInfo {
124124
change_id: format!("change-{commit_id}"),
125125
commit_id: commit_id.to_owned(),
126126
description: String::new(),
127-
author: String::new(),
128-
email: String::new(),
129-
timestamp_millis: 0,
127+
author: CommitAuthor::empty(0),
130128
parents: parents.iter().map(|s| (*s).to_owned()).collect(),
131129
bookmarks: Vec::new(),
132130
is_working_copy: false,

crates/jayjay-core/src/repo/mod.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -122,11 +122,11 @@ impl Repo {
122122
}
123123

124124
pub(crate) fn commit_transaction(&self, tx: Transaction, description: &str) -> CoreResult<()> {
125-
let old_wc_id = self.current_wc_commit_id();
125+
let old_working_copy_commit_id = self.current_wc_commit_id();
126126
let new_repo = self.commit_transaction_to_repo(tx, description)?;
127127
self.set_repo(new_repo);
128128
// If @ changed, sync the working directory on disk
129-
if self.current_wc_commit_id() != old_wc_id {
129+
if self.current_wc_commit_id() != old_working_copy_commit_id {
130130
self.check_out_current_working_copy("sync working copy after transaction")?;
131131
}
132132
Ok(())

crates/jayjay-core/src/repo/resolve.rs

Lines changed: 0 additions & 321 deletions
This file was deleted.

0 commit comments

Comments
 (0)