mirror of
https://github.com/frej/fast-export.git
synced 2026-05-07 00:16:18 +02:00
Add tests for plugins setting file content to None
This commit is contained in:
15
t/plugins/removefiles_test_plugin/__init__.py
Normal file
15
t/plugins/removefiles_test_plugin/__init__.py
Normal file
@@ -0,0 +1,15 @@
|
||||
import subprocess
|
||||
import shlex
|
||||
import sys
|
||||
from mercurial import node
|
||||
|
||||
def build_filter(args):
|
||||
return Filter(args)
|
||||
|
||||
class Filter:
|
||||
def __init__(self, args):
|
||||
self.filter_contents = shlex.split(args)
|
||||
|
||||
def file_data_filter(self,file_data):
|
||||
if file_data['filename'].startswith(b'bad'):
|
||||
file_data['data'] = None
|
||||
Reference in New Issue
Block a user