Use clone as needed
This commit is contained in:
parent
b37ce7e86f
commit
5e5c081ec3
1 changed files with 4 additions and 4 deletions
|
@ -124,8 +124,8 @@ def load_state(statefile: Path) -> Vfs:
|
||||||
def simplify(old_fs: Vfs, new_fs: Vfs, /, exec_idempotent=True) -> Vfs:
|
def simplify(old_fs: Vfs, new_fs: Vfs, /, exec_idempotent=True) -> Vfs:
|
||||||
"""Try to reduce a new VFS using diff from the original VFS."""
|
"""Try to reduce a new VFS using diff from the original VFS."""
|
||||||
|
|
||||||
old_fs = old_fs.copy()
|
old_fs = old_fs.clone()
|
||||||
new_fs = new_fs.copy()
|
new_fs = new_fs.clone()
|
||||||
|
|
||||||
# Scrub anything in the new log that's in the old log
|
# Scrub anything in the new log that's in the old log
|
||||||
for txn in list(old_fs._log):
|
for txn in list(old_fs._log):
|
||||||
|
@ -154,8 +154,8 @@ def simplify(old_fs: Vfs, new_fs: Vfs, /, exec_idempotent=True) -> Vfs:
|
||||||
def scrub(old_fs: Vfs, new_fs: Vfs) -> Vfs:
|
def scrub(old_fs: Vfs, new_fs: Vfs) -> Vfs:
|
||||||
"""Try to eliminate files which were previously installed but are no longer used."""
|
"""Try to eliminate files which were previously installed but are no longer used."""
|
||||||
|
|
||||||
old_fs = old_fs.copy()
|
old_fs = old_fs.clone()
|
||||||
new_fs = new_fs.copy()
|
new_fs = new_fs.clone()
|
||||||
cleanup_fs = Vfs([])
|
cleanup_fs = Vfs([])
|
||||||
|
|
||||||
# Look for files in the old log which are no longer present in the new log
|
# Look for files in the old log which are no longer present in the new log
|
||||||
|
|
Loading…
Reference in a new issue