mirror of
https://github.com/martinvonz/jj.git
synced 2025-01-18 10:07:28 +00:00
working_copy: remove a working_copy_path argument I missed earlier
This should clearly have been removed in 4734eb6
.
This commit is contained in:
parent
4ce2aed17f
commit
9ade41078a
1 changed files with 6 additions and 8 deletions
|
@ -23,7 +23,7 @@ use std::os::unix::fs::symlink;
|
||||||
use std::os::unix::fs::PermissionsExt;
|
use std::os::unix::fs::PermissionsExt;
|
||||||
#[cfg(windows)]
|
#[cfg(windows)]
|
||||||
use std::os::windows::fs::symlink_file;
|
use std::os::windows::fs::symlink_file;
|
||||||
use std::path::{Path, PathBuf};
|
use std::path::PathBuf;
|
||||||
use std::time::UNIX_EPOCH;
|
use std::time::UNIX_EPOCH;
|
||||||
|
|
||||||
use protobuf::Message;
|
use protobuf::Message;
|
||||||
|
@ -397,11 +397,7 @@ impl TreeState {
|
||||||
fs::set_permissions(disk_path, fs::Permissions::from_mode(mode)).unwrap();
|
fs::set_permissions(disk_path, fs::Permissions::from_mode(mode)).unwrap();
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn check_out(
|
pub fn check_out(&mut self, tree_id: TreeId) -> Result<CheckoutStats, CheckoutError> {
|
||||||
&mut self,
|
|
||||||
tree_id: TreeId,
|
|
||||||
working_copy_path: &Path,
|
|
||||||
) -> Result<CheckoutStats, CheckoutError> {
|
|
||||||
let old_tree = self
|
let old_tree = self
|
||||||
.store
|
.store
|
||||||
.get_tree(&DirRepoPath::root(), &self.tree_id)
|
.get_tree(&DirRepoPath::root(), &self.tree_id)
|
||||||
|
@ -424,7 +420,9 @@ impl TreeState {
|
||||||
};
|
};
|
||||||
|
|
||||||
old_tree.diff(&new_tree, &mut |path, diff| {
|
old_tree.diff(&new_tree, &mut |path, diff| {
|
||||||
let disk_path = working_copy_path.join(PathBuf::from(path.to_internal_string()));
|
let disk_path = self
|
||||||
|
.working_copy_path
|
||||||
|
.join(PathBuf::from(path.to_internal_string()));
|
||||||
|
|
||||||
// TODO: Check that the file has not changed before overwriting/removing it.
|
// TODO: Check that the file has not changed before overwriting/removing it.
|
||||||
match diff {
|
match diff {
|
||||||
|
@ -663,7 +661,7 @@ impl WorkingCopy {
|
||||||
.tree_state()
|
.tree_state()
|
||||||
.as_mut()
|
.as_mut()
|
||||||
.unwrap()
|
.unwrap()
|
||||||
.check_out(commit.tree().id().clone(), &self.working_copy_path)?;
|
.check_out(commit.tree().id().clone())?;
|
||||||
|
|
||||||
self.commit_id.replace(Some(commit.id().clone()));
|
self.commit_id.replace(Some(commit.id().clone()));
|
||||||
self.commit.replace(Some(commit));
|
self.commit.replace(Some(commit));
|
||||||
|
|
Loading…
Reference in a new issue