# HG changeset patch # User Matt Harbison # Date 1728098604 14400 # Node ID 8d9767bf4adbeca9bc4b5ee4a1111ec2b286b019 # Parent fa7059f031a97d0a1b15e57945e23f2f55e717ef debugantivirusrunning: use bytes when opening a vfs file I noticed this when searching for "base85" to see if anything else in the previous commit needed to be annotated. This was added in 87047efbc6a6, after the mass byteification in 687b865b95ad. diff -r fa7059f031a9 -r 8d9767bf4adb mercurial/debugcommands.py --- a/mercurial/debugcommands.py Fri Oct 04 23:21:41 2024 -0400 +++ b/mercurial/debugcommands.py Fri Oct 04 23:23:24 2024 -0400 @@ -143,7 +143,7 @@ @command(b'debugantivirusrunning', []) def debugantivirusrunning(ui, repo): """attempt to trigger an antivirus scanner to see if one is active""" - with repo.cachevfs.open('eicar-test-file.com', b'wb') as f: + with repo.cachevfs.open(b'eicar-test-file.com', b'wb') as f: f.write( util.b85decode( # This is a base85-armored version of the EICAR test file. See @@ -154,7 +154,7 @@ ) # Give an AV engine time to scan the file. time.sleep(2) - util.unlink(repo.cachevfs.join('eicar-test-file.com')) + util.unlink(repo.cachevfs.join(b'eicar-test-file.com')) @command(b'debugapplystreamclonebundle', [], b'FILE')