nvtake: clean up old records from oldver file on saving

This commit is contained in:
lilydjwg 2023-12-04 17:46:26 +08:00
parent 4833135f87
commit eaac776a90
1 changed files with 3 additions and 0 deletions

View File

@ -41,6 +41,9 @@ def take() -> None:
oldvers = core.read_verfile(oldverf)
newvers = core.read_verfile(newverf)
for removed in set(oldvers) - set(newvers):
del oldvers[removed]
if args.all:
oldvers.update(newvers)
else: