mirror of https://github.com/astral-sh/uv
Log the path of the locked file
Currently, the acquire and release messages mismatch on what resource they act on, the acquire message shows only the resource, the release message shows only the locked file. ``` DEBUG Acquired lock for `https://github.com/tqdm/tqdm` DEBUG Using existing Git source `https://github.com/tqdm/tqdm` DEBUG Released lock at `C:\Users\Konsti\AppData\Local\uv\cache\git-v0\locks\16bb813afef8edd2` ```
This commit is contained in:
parent
7978122837
commit
75e5f69d44
|
|
@ -680,7 +680,10 @@ impl LockedFile {
|
||||||
);
|
);
|
||||||
match file.file().try_lock_exclusive() {
|
match file.file().try_lock_exclusive() {
|
||||||
Ok(()) => {
|
Ok(()) => {
|
||||||
debug!("Acquired lock for `{resource}`");
|
debug!(
|
||||||
|
"Acquired lock for `{resource}` at `{}`",
|
||||||
|
file.path().user_display()
|
||||||
|
);
|
||||||
Ok(Self(file))
|
Ok(Self(file))
|
||||||
}
|
}
|
||||||
Err(err) => {
|
Err(err) => {
|
||||||
|
|
@ -701,7 +704,10 @@ impl LockedFile {
|
||||||
))
|
))
|
||||||
})?;
|
})?;
|
||||||
|
|
||||||
debug!("Acquired lock for `{resource}`");
|
debug!(
|
||||||
|
"Acquired lock for `{resource}` at `{}`",
|
||||||
|
file.path().user_display()
|
||||||
|
);
|
||||||
Ok(Self(file))
|
Ok(Self(file))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -715,7 +721,10 @@ impl LockedFile {
|
||||||
);
|
);
|
||||||
match file.file().try_lock_exclusive() {
|
match file.file().try_lock_exclusive() {
|
||||||
Ok(()) => {
|
Ok(()) => {
|
||||||
debug!("Acquired lock for `{resource}`");
|
debug!(
|
||||||
|
"Acquired lock for `{resource}` at `{}`",
|
||||||
|
file.path().user_display()
|
||||||
|
);
|
||||||
Some(Self(file))
|
Some(Self(file))
|
||||||
}
|
}
|
||||||
Err(err) => {
|
Err(err) => {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue