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:
konstin 2025-11-03 16:22:26 -05:00
parent 7978122837
commit 75e5f69d44
1 changed files with 12 additions and 3 deletions

View File

@ -680,7 +680,10 @@ impl LockedFile {
);
match file.file().try_lock_exclusive() {
Ok(()) => {
debug!("Acquired lock for `{resource}`");
debug!(
"Acquired lock for `{resource}` at `{}`",
file.path().user_display()
);
Ok(Self(file))
}
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))
}
}
@ -715,7 +721,10 @@ impl LockedFile {
);
match file.file().try_lock_exclusive() {
Ok(()) => {
debug!("Acquired lock for `{resource}`");
debug!(
"Acquired lock for `{resource}` at `{}`",
file.path().user_display()
);
Some(Self(file))
}
Err(err) => {